|
|
|||||||
|
|
Tutorial
on public keys |
|
|||||
|
|
We use public keys for these reasons: Public keys enable the
formation of a shared secret. When two persons exchange public keys which they have created they can
calculate a value that only they know. A third person that sees the public
keys exchanged cannot calculate this value. This method is called
Diffie-Hellman key exchange according to its inventors Whitfield Diffie and
Martin Hellman.
Each public key has a corresponding private key. The creator of the
public key automatically knows this private key. The shared secret is
calculated by the help of this private key and the other person’s public key. Public keys enable the recovery
from attack. Now the third person that watches the exchange of public keys cannot
calculate the shared secret that the creators of the public keys can
calculate. However, if he successfully sends a spy program and steals a
private key from one of the parties then the shared secret becomes known to
him and he can decrypt messages created after this public key exchange.
The attacker must again be able to steal a private key – if he cannot
do this he cannot anymore decrypt new messages. EndCryptor creates a lot of public keys. Each encrypted message
contains new public keys of the sender. When a person whose private key has
been stolen sends a new message and when it is received by the other party
then a new shared secret can be calculated – the attacker has lost his
ability to decrypt messages sent to the victim.
Please note that a person may have received several messages without
sending new messages and then the stealing of the private key happens. How to
protect these messages received between a Diffie-Hellman key exchange and an
attack? The answer is a bit complicated
and we give here only the result:
Please note that the attacker may have collected the exchanged messages
and naturally after successful stealing of private keys tries to decrypt all
of them. More information about our
solution can be found on cryptographic technical
details page. Public keys enable the
formation of a digital signature. Each message has a digital signature as the last part of the message.
The signature is formed by first calculating the cryptographic hash value
(checksum or digest) of the actual message and then with the help of a private key the digital signature is
calculated and appended to the end of the message. The person who receives the message and the signature then verifies the
signature by also calculating the cryptographic hash value and then using the
corresponding public key the
verification is done. If the message or the signature itself has been modified by an attacker
during traversal in the net then the signature will not verify – only the
person who has the private key can create proper signatures which will verify
correctly only by the corresponding public key.
|
|
|||||