How does encryption work?

Encryption is the process by which a plain text is converted into a ciphertext. The ciphertext can only be converted back to plaintext with a matching key. The transformation is the finest mathematics and is not explained here. The field of research dealing with this is called cryptography.

Cryptography has four main objectives:

  • Message confidentiality: Only the authorized recipient should be able to read the contents of an encrypted message.
  • Data integrity of the message: The recipient should be able to determine whether the message has been modified during transmission.
  • Authentication: The recipient should be able to clearly verify whether the message actually originates from the specified sender.
  • Commitment: The sender should not be able to deny that the message is coming from her.

Symmetric encryption
Symmetric encryption uses only one password for encryption and decryption. It’s basically like a combination of numbers on a bicycle lock. All communication partners must know this combination of numbers (i.e. the password). This can be very complex and complicated. The password must always be transmitted in a tap-proof manner. All those who know the password must keep it secret from non-involved persons. If someone is to be denied access, the password must be changed and retransmitted securely to all parties involved. On the Internet, especially when encrypting e-mails, such a system is simply impossible.

Asymmetric encryption
This is why so-called asymmetric encryption is used for e-mails. Two different keys are used: a public and a secret (private) key. This system is also used in Bitcoin blockchain technology.

The principle of asymmetric encryption is essentially based on the fact that the communication partners each generate their own key pair. One of the keys is kept secret, the so-called private key and the other, the so-called public key, is made accessible to every being willing to communicate. The big advantage of this method compared to symmetric encryption is the simple distribution of the public key. This can really be freely accessible to everyone without making the procedure insecure.

The following metaphor is used to simplify the presentation: the public key is regarded as a lock and the private key as a suitable key for this lock.

Let’s say Peter wants to send a message to Jennifer. Jennifer doesn’t want her father to read what Peter writes for messes. First she will make some locks that can only be opened by one (her) key. Then she will distribute her (open!) locks to her friends, so also to Peter. Peter now has an open lock from Jennifer, which he can close, but cannot open again without the right key (Jennifer will not give out her key at any price, of course). So Peter starts writing his letter, puts it in a box and locks it with Jennifer’s lock.

Jennifer can be absolutely sure that nobody could read the letter after closing the box. Even Peter no longer had the opportunity to read the letter, let alone change it, since only Jennifer had the right key to the lock. The advantage of public key transfer is that anyone can use a Jennifer lock to lock boxes, but only she is able to open them again. So Jennifer doesn’t have to meet Peter in private to exchange ideas, which her father would never allow.

A disadvantage, however, is that Jennifer can’t be sure if the message really comes from Peter or if someone just took one of her locks and locked some box with it. Peter has to come up with something.

Leave a Reply