Univerzita Tomáše Bati ve Zlíně

Open in navigation

Chapter 6 – Encryption and electronic signature

Some information that is stored in computer systems or sent by them over the network is secret or sensitive, and no one who is not authorized should be able to read it. This would violate an essential element of security – data confidentiality.
The greatest danger is during transmission over a computer network or when a device containing data is stolen. Therefore, various encryption methods are used to make information unreadable.
It is often necessary to be sure who created or confirmed the content of a document. In everyday life, such identification and confirmation are signatures. Analogous to signing paper documents, the electronic signature was created in the world of computers.

1. Introduction

Some information stored in computer systems or sent by them over the network is sensitive, and no unauthorized person should be able to read it. This violates the essential element of security – data confidentiality. The greatest danger is during transmission over a computer network or when a device containing data is stolen. Therefore, various encryption methods are used to make information illegible. Furthermore, it would be useful to know who created and sent the data in many cases. Analogous to the typical signing of paper documents, the electronic signature was created in the world of computers.

2. Encryption

Since time immemorial, there has been a need, especially in business and military circles, to ensure that an important message can be read only by the intended recipient and no one else. The ways to achieve such illegibility for unauthorized persons have evolved from the relatively primitive substitution of letters for other characters to today’s relatively sophisticated encryption algorithms.

Example of a historical cipher

Caesar’s cypher – the Roman emperor used a simple procedure to make his communications with his generals unreadable, replacing each letter in the alphabet with a letter three places further down (e.g. A -> D,B -> E,…X -> A).

Encryption itself is the conversion of clear text (data in general) into incomprehensible text by a specific procedure, an algorithm. The opposite method is called decryption. In both cases, the (de)encryption procedure is influenced by a secret parameter called the (de)encryption key. Only someone who knows the decryption key can access the original message.

The cypher must be resistant to attempts to decrypt without knowing the key (breaking). Cybercriminals use potent computers and methods, but if the cypher is of high quality, breaking it takes so long that it is not worth trying.

We are talking about symmetric encryption when the same key is used to encrypt and decrypt a message. This type of encryption function is relatively fast. For standard encryption functions (e.g. AES), most modern computers have dedicated special hardware to enable fast (de)encryption of large amounts of data. Typically, data storage devices (hard drives, portable USB devices, etc.) are encrypted in this way, where only the device owner knows the relevant key and in the event of theft, the attacker cannot read the stored information. If we wanted to send encrypted data to someone, we would have to share the key with the other party in advance. The disadvantage is that each communicating pair must have agreed on its key so for example, 100 people communicating with each other would need 4950 keys (see calculation below), which is not very practical.

Calculating the number of encryption key pairs

nx (n-1)/2 , kde n = 100
100x (100-1)/2 = 9900/2 = 4950

Fortunately, encryption experts (cryptologists) have also discovered so-called asymmetric encryption, where the algorithm uses a pair of keys created by a special procedure. With the help of a complicated mathematical apparatus, it is ensured that data encrypted with one of the aforementioned keys can only be decrypted with the other key. And vice versa. Everyone who wants to communicate creates a pair of keys, one of which will be known only to themselves (which is why it is called private), and the other will be provided to others (which is why it is called public). Communication between 100 people, therefore, requires only 100 pairs of keys.

Verifying the owner of the key

If we want to send someone an encrypted message, we have to encrypt it with their public key (only the owner of the relevant private key can decrypt it). However, it would be wrong to use the wrong public key so that our intended communication partner could not read the message, but on the contrary, someone else could read it. In the case of encrypted e-mail, the usual communication partner is a living person, but we can also communicate with computers, for example, websites.

Therefore, it is necessary to be sure who owns the corresponding private key for a given public key. One option is a personal visit and subsequent verification. However, too many people and web servers exist for such a solution, so it is only used to a limited extent. The usual way is to rely on someone trustworthy to perform this verification for us – a so-called CA, a certification authority. In practice, this works so that either a person for or a website operator creates a pair of keys for the website and then sends their public key and identification data to the certification authority, which checks everything and writes these facts into a so-called certificate. Anyone who trusts a given certification authority has certainty, based on the certificate issued, who owns the given public key.

Encrypted communication

Today, communication encryption is considered a common standard and is performed by practically every Internet user without knowing it (all you need to do is visit a secure page whose URL begins with https:// (see the chapter Safe use of the web). Kromě webů se s ní běžně potkáte také u vzdáleného přístupu k počítači přes tzv. vzdálenou plochu (RDP) nebo pomocí vzdálené příkazové řádky (SSH). In addition to websites, you will also commonly encounter it when accessing a computer remotely via the so-called remote desktop (RDP) or using a remote command line (SSH). Encryption can also be used in electronic mail, and the messages sent can be encrypted so that only the recipient (or the owner of the private key to the public key with which we encrypt) can read them.

The actual encryption process is performed by the applications we use – web browsers, terminal or e-mail clients, etc. They are also able to store our private key and the associated certificate and verify the validity of the other party’s certificate. The user is either only informed about the encryption (for example, the browser shows with a lock that it is encrypting) or actively decides whether he wants to encrypt the message being sent (for example, in an e-mail client).

When is it appropriate to encrypt communications??

Paranoiacs would say always. Realists believe encryption is necessary when the information is intended for only one recipient or a limited group and is not intended for others to know.

Encrypted data storage

Encryption is often also applied to data that is not sent anywhere and is only stored on a computer, external drive, etc. The goal is to ensure the stored data’s confidentiality even when someone gains control of a switched-off device or external drive – the person in question cannot read the encrypted data.

It is, therefore, worthwhile to encrypt our stored data wherever there is a risk of theft of the hardware on which the data is located – laptops taken on business trips, USB flash drives carried in pockets, etc. Current encryption tools also allow you to encrypt only part of the device to divide the data into important encrypted data (internal documents, plans, license keys, etc.) and unencrypted other data (downloaded music clips, e-books, etc.)

3. Electronic signature

For all documents, it is pretty often advisable to be sure who created them. We can put our stamp, seal or signature on paper documents, indicating that we have made the document or at least confirmed its content (for example, when a secretary prepared it for us).

Fortunately, for all electronic data (for example, e-mail messages), we can use the apparatus described above for encryption. However, we will use the opposite properties, i.e. data encrypted with our private key can only be decrypted with our public key. We calculate its fingerprint (hash) from the signed data and encrypt it with our private key (which only we have). So we have the original document and its encrypted fingerprint. We added a certificate containing our public key, and we can send this package to the addressee.

The addressee (or his application) then checks the certificate to see who the public key belongs to. He uses this key to decrypt the fingerprint and compares the result with the calculated fingerprint of the sent document. If the fingerprints match, it is clear that the document was electronically signed by the person listed in the certificate as the public key owner. At the same time, it is also clear that the document has not been altered along the way (otherwise, the fingerprints would not match).

What is a hash/fingerprint?

A hash, or fingerprint, is a unique cluster of numbers and letters obtained by a hash function corresponding to the original document. If the original document changes even slightly, the fingerprint changes fundamentally. The hash function is one-way, so the original document cannot be restored from the fingerprint.

What is a certificate??

A certificate is also an electronic document and is electronically signed by a certification authority. To verify the validity of the signature, we must have another certificate that verifies that the given key belongs to the said certification authority. This is again electronically signed, and to prevent infinite chaining, applications have so-called root certificates of trusted certification authorities written in them that can verify the validity of certificates signed by them.

4. Summary

In today’s Internet, you cannot rely on the fact that no one will read or change the data sent over the network. Therefore, it is essential to encrypt the transmitted data – this ensures that no one unauthorized can access it. Asymmetric encryption is used to make it easier to distribute encryption and decryption keys and verify the ownership of private keys; certification authorities confirm ownership by issuing certificates. As a result, thanks to current applications, it is easy to send a message to a specific person or communicate with a particular website in an encrypted manner, as well as decrypt a message sent to us or decrypt data from a website. Encryption should be used wherever the data sent is intended only for a limited group of recipients.

Encryption can also be used to protect stored data from unauthorized reading, which is especially useful in cases where the device is at risk of being stolen, and we do not want a thief to be able to read our confidential data. In this scenario, the device owner only uses it and knows it. Data stored on work laptops or uploaded to portable media (USB flash drives, external drives, etc.) should be encrypted. Another problem with the Internet is the certainty of the authorship of sent messages because cybercriminals like to impersonate someone else (for example, in e-mail). To verify authorship, an electronic signature is used on the same basis as encryption. The relevant applications (typically e-mail clients) allow outgoing messages to be signed and verify the presence and validity of the electronic signature in incoming messages.

Encryption and electronic signatures should be a matter for every Internet user who works with data that needs to be kept confidential. Symmetric encryption is used because the encryption and decryption keys are the same.

Faculties and departments

Close