I’ve been trying to get my head around this and I’ve watched a few videos but they don’t seem to specifically answer my question.

According to what I’ve found online, messages encrypted with a public key can only be decrypted with a private key. But in practice, how is that possible?

Surely a public key contains a set of instructions, and anyone could just run those instructions in reverse to decrypt a message? If everything you need to encrypt a message is stored within a public key, then how is it a one-way process?

It’s likely that I’m misunderstanding a core element of this!

  • Thorry84@feddit.nl
    link
    fedilink
    arrow-up
    11
    ·
    9 months ago

    Encryption uses pairs of primes, where you know the resulting number, but not the primes used to comprise that number. You can calculate the result given the primes very quickly, but given the result it’s very slow to figure out what the primes were. This asymmetry is the key to this kind of encryption.

    Given enough computational power you can do it, that’s why we’ve moved on to more complex algorithms and bigger keys throughout the years to keep up.