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!

  • TheBananaKing@lemmy.world
    link
    fedilink
    arrow-up
    100
    ·
    9 months ago

    If you turn a sausage machine backwards, you don’t get a pig coming out the top.

    If I add a dozen numbers together, there’s only one total.

    But if I only have that total, there’s no way to tell what the original dozen numbers were.

    Same kind of principle.

    You can brute-force it, but when it comes to the product of stupendously large primes, it would take until the heat death of the universe to do so, by which time you probably don’t care any more.