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!

  • TowardsTheFuture
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    9 months ago

    Look at it more like this. Say I tell you to pick any number, square it, and then add 5. Say I did this and my answer was 41. What was my original number? 90% of people will answer 6, but my answer was -6. Now only doing that once isn’t hard, but basically it’s because the inverse of the function is not a function that I can’t always get back to it. Now do that a few thousand different ways in the same problem and good fucking luck.

    While it’s not what is happening as it’s using pairs of primes, it’s an easy way to explain there’s not always a way to get to something from an equation.