• HubertManne@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    18 days ago

    yeah I just don’t see how you can encrypt something with a key and not be able to decrypt it with the same key (I looked at the khan academy thing and have seen others. I never got the math around it).

    • Waraugh@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      18 days ago

      While the public and private key are separate, they are mathematically related.

      Say two large prime numbers are generated. Their product is used as part of the public and private keys. When you multiply two prime numbers together it is extremely difficult to “guess” what those two prime numbers were from the product, but if you have the private key you know the missing part of the equation that makes it difficult to reverse so you can easily reverse the equation and decrypt the message.