What is an encryption key?

A key is a set of random characters in a specific order. Cryptographic protocols use a key to alter data so that it is scrambled, so no one without the key can decrypt the information.

cryptographic-keycryptographic-key

What is a cryptographic key?

In cryptography, a key is a string of characters used within an encryption algorithm to change data so that it appears random. Like a physical key, it locks (encrypts) data so that only someone with the right key can open (decrypt) it.

 

cryptographic-key-hellocryptographic-key-hello

The original data is known as plaintext , and the data after key encryption is known as ciphertext .

Format:

Plain text

+ key

= text Encrypted

 

Keys in Early Forms of Cryptography

Before the advent of computers, ciphertext was often generated simply by replacing one letter with another in the plaintext, a method known as “substitution cipher.” For example, suppose someone sends a message saying “Hello” to another person, and each letter is replaced by the next letter in the alphabet: “Hello” becomes “Ifmmp”.

 

H H L L M R The word “Ifmmp” looks like a meaningless string of characters, but if someone knows the key, they can substitute the appropriate characters and decrypt the message as “Hello”. In this example, the key is (letter ) – 1, moving each letter down one point in the alphabet to reach the actual letter. 128); H It is relatively easy to break these ciphers with simple statistical analysis, since some letters will appear more often than others in any given text (for example, the letter E is the most common letter in the English language). To combat this, cryptographers developed a system called the one-time pad.

 

A one-time pad is a key that is used only once and contains at least as many characters as the plain text. In other words, each letter will be replaced with a letter that represents a unique number of letters removed from it in the alphabet.

 

For example, suppose someone has to encrypt the message “Hello,” and that they use a one-time pad with the values 7, 17, 24, 9, 11.

HELL11 Whereas before we simply moved one position per letter (letter + 1), we now move a different number of places in the alphabet for each letter. We add 7 to the first letter, H; We add 17 to the second letter; and so on. For any calculations that take us beyond Z, we simply go back to the beginning of the alphabet and keep adding. L A 7 17 For communication over a one-time panel to work, both ends of the conversation must use the same key for each individual message (symmetric encryption), although a different key is used each time there is a new message. Although to any third party “Ovjuz” sounds like random nonsense, the person receiving the “Ovjuz” ciphertext would know to use the key “7, 17, 24, 9, 11” to decrypt it (subtracting instead of adding):

 

a H H L L Although the above examples of early ciphers show how a random string of information was used to convert plaintext into ciphertext works, today's encryption keys are much more complex.

For example, it might be noreferrer" target="_blank" style="color: rgb(0, 0, 128);">KeyGeneral forWeb Something like:

04 CE D7 61 49 49 FD 4B 35 8B 1B 86 BC A3 C5 BC D8 20 6E 31 17 2D 92 8A B7 34 F4 DB 11 70 4E 49 16 61 FC AE FA This is more complex than the “7 17 24 9” key. 11” which we used above to encrypt “Hello”.

Instead of simply adding or subtracting, modern cryptography uses complex mathematical formulas known as algorithms . Instead of a simple string of random numbers for a key, modern keys are usually more random. rel="noopener noreferrer" target="_blank" style="color: rgb(0, 0, 128);">much more complex calculations in a shorter period of time than human encoders, making more complex encryption not only possible, but necessary. 128);">Computers can change information at the binary level, the ones and zeros that make up the data, not just at the level of individual letters and numbers.

If the encrypted data is not random enough, a computer program will be able to decrypt it. True randomness is extremely important for truly secure encryption.

In combination with the encryption algorithm, the encryption key will scramble the text beyond human recognition.

How are keys used in SSL (HTTPS) encryption?

There are two types of encryption: symmetric encryption and asymmetric encryption, also known as public key encryption. In symmetric encryption, both sides of the conversation use the same key to convert plaintext into ciphertext and vice versa.

 

In asymmetric or public-key encryption, each side of the conversation uses a different key. One of the keys is called the public key, and one of the keys is called the private key – so named because one party keeps it secret and never shares it with anyone. When plaintext is encrypted with the public key, only the private key can decrypt it, not the public key.

 

SSL (or TLS, as it's called today), is an encryption protocol used to keep Internet communications secure, and website served over the HTTPS instead of HTTP this type of encryption. In TLS/SSL, a website or web application will have a public key and a private key. The public key is generally shared in the site's SSL certificate for anyone to see. The private key is installed on the original server and is never shared.

 

TLS / SSL communication sessions begin with a TLS handshake, where the website and client use the public key and the private key to create new keys called session keys. These session keys are then used by both sides to encrypt their messages back and forth.

 

Thus, TLS starts with asymmetric encryption (with two keys) and moves to symmetric encryption (with one key). Both sides use the same keys during a communication session, but when a new session is started, they will create new keys together.



Read also:

What is encryption? And its types

What is SSL? | Definition of SSL

What is a CDN? | How do CDNs work?

What is the Metaverse and why should you care?