-
If two persons, Alice and Bob wants to communicate with end-to-end encryption, each of them generates a key-pair consisting of a private and public key; Alice pair (Ka, Pa) and Bob’s pair (Kb, Pb). K=the private key and P=the public key. The private keys are random numbers (sometimes between 1…2^256). Each public key is generated from the respective private key.
When Bob creates an encrypted message that only Alice can decrypt, he uses Alice’s public key together with his private key to encrypt the message. Alice then uses her private key to decrypt the message.
-
There is public key encryption as described above and public key digital signatures. A digital signature is used to prove that whoever signed a message has the private key corresponding to the public key. There is a function; SIGN, that takes as arguments the private key K, the public key P and a message MESS so that SIGN(K, P, MESS) = SIGNATURE. Then the signer (Bob) sends (MESS, P, SIGNATURE) to Alice. Then there is a function called VERIFY than takes these three as arguments;
VERIFY(MESS, P, SIGN) = TRUE OR FALSE. If the function outputs TRUE, then the signature must have been made using the message, Bobs public key and Bobs private key.
This is not definitive proof that Bob did the signing (he could have given his private key to someone else), but it’s something 