How does asymmetric crypto work?
For example, if you use PGP in emails, you generate a private key that is known only to you and a public key, which is available to everyone.
Is there a simple way to explain, why you need a private key and why no one can decrypt the message with just the public key?
I think of an explanation like for example with prime numbers:
- If you multiply two large prime numbers, you get a huge non-prime number with only two (large) prime factors.
- Factoring that number is a non-trivial operation, and that fact is the source of a lot of Cryptographic algorithms. (See one-way functions for more information.)
- The product of the two prime numbers can be used as a public key
- The primes themselves as a private key. So the private key is the knowledge of two very large prime numbers
for easy understanding lets take the simple example (very large) prime numbers: 3 and 5:
- private key: the knowlege of 3 and 5
- the public key is just those numbers multiplied: 15
- you cannot find out 3 and 5, so the message encrypted with 15 is ...
Here is a quite good explanation already, but it is not clear enough:
Is there an intuitive explanation as to why only the private key can decrypt a message encrypted with the public key?
Can you please add an example with those numbers?