• Thunderwolf@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    9 days ago

    I think encrypting with a public key is mostly used in client -> server traffic (client encrypts with server’s public key, server decrypts with private), and not code signing. However, I’m no TLS/asymmetric crypto savant.

    • Xanza@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      9 days ago

      Encryption can only be done with the PGP public key. Even if you specifically use the private key, it contains the public key, and GPG already knows to use the public key for encryption. You cannot create encrypted cipher text using a GPG private key.

      Likewise, you cannot decrypt data using the public key, nor can you sign statements with a public key. For those processes you must use a private key.

      I had no idea people found GPG this confusing…