0% found this document useful (0 votes)
1 views4 pages

Cyptographic keys

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 4

What is a cryptographic key?

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

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

The formula:

plaintext
+ key
= ciphertext

Keys in early forms of encryption

Before the advent of computers, ciphertext was often created by simply replacing one letter with another letter in
the plaintext, a method known as a "substitution cipher." For instance, suppose that someone sends a message
reading "Hello" to another person, and each letter is replaced with the one after it in the alphabet: "Hello"
becomes "Ifmmp."

H E L L O
+1 +1 +1 +1 +1
I F M M P

"Ifmmp" looks like a nonsensical string of letters, but if someone knows the key, they can substitute the proper
letters and decrypt the message as "Hello." For this example, the key is (letter) - 1, moving each letter down one
spot in the alphabet to arrive at the real letter.

I F M M P
-1 -1 -1 -1 -1
H E L L O

Such ciphers are relatively easy to break with simple statistical analysis, since certain letters will appear more often
than others in any given text (for instance 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 single-use-only key that has at least as many values as the plaintext has characters. In other
words, each letter will be replaced by a letter that's a unique number of letters removed from it in the alphabet.

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

H E L L O
7 17 24 9 11

Whereas before we simply moved up one position for each letter (letter + 1), now we 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 past Z, we simply go back to the beginning of the alphabet and keep adding.

H E L L O
7 17 24 9 11
O V J U Z

Starting from the plaintext "Hello," we now have the ciphertext "Ovjuz," using the key "7, 17, 24, 9, 11."

For communication via a one-time pad to work, both sides of the conversation have to use the same key for each
individual message (symmetric encryption), although a different key is used every time there's a new message.
Although to any third parties "Ovjuz" looks like random nonsense, the person who receives the ciphertext "Ovjuz"
will know to use the key "7, 17, 24, 9, 11" to decrypt it (subtracting instead of adding):

O V J U Z
7 17 24 9 11
H E L L O

Thus, a simple message can be altered by a string of random data, a key, in order to be encrypted or decrypted.

Keys in modern encryption

Although the above examples of early cryptography illustrate how using a random string of information to turn
plaintext into ciphertext works, cryptographic keys today are far more complex.

For instance, a website's public key might be 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
7F BA 6F 0C 05 53 74 C6 79 7F 81 12 8A F7 E2 5E 6C F5 FA 10 69 6B 67 D9 D5 96 51 B0 (Copied in 2019 from the
cloudflare.com SSL certificate)

This is much more complex than the "7 17 24 9 11" key we used above to encrypt "Hello."
Instead of simply adding or subtracting, modern encryption uses complex mathematical formulas known
as algorithms. And instead of a simple string of random numbers for a key, modern keys are typically randomized
even further.

This is the case for several reasons:

1. Computers are capable of far more complicated calculations in a shorter amount of time than human
cryptographers, making more complex encryption not only possible, but necessary.

2. Computers can alter information at the binary level, the 1s and 0s that make up data, not just at the
level of individual letters and numbers.

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

Combined with an encryption algorithm, a cryptographic key will scramble a text beyond human recognition.

Keyring (cryptography)
In cryptography, a keyring stores known encryption keys (and, in some cases, passwords). For example, GNU
Privacy Guard makes use of keyrings.

There are various types of keys are as follows −


Symmetric key −A symmetric key is one that can be used both to encrypt and decrypt information. This can define
that to decrypt information, one should have the same key that was used to encrypt it.
Symmetric encryption is generally more effective than asymmetric encryption and thus preferred when large
amounts of information need to be exchanged.
Asymmetric key − Asymmetric encryption is a type of encryption that required two separates yet mathematically
related keys to encrypt and decrypt data. The public key encrypts information while its correlating private key
decrypts it.
Asymmetric key authentication is a cryptographic technique that uses a different verification key in the CAD than
the proving key used by the smart card. This technique is generally executed using trapdoor one-way functions, in
which smart card makes a digital signature with its private key and the CAD required a public key to authenticate
the signature.
Public Key − Public-key is a form of cryptography in which a user has a set of cryptographic keys including public
key and a private key. The problem for public-key cryptography is proving that a public key is real, and has not
been tampered with or resaved by a malicious third party.
The main approach to this problem is to need a Public-key Infrastructure (PKI), in which one or more third parties,
known as certificate authorities, certify ownership of key pairs.
Private Key − A private key is a small bit of code that is paired with a public key to set off algorithms for text
encryption and decryption. It is generated as an element of public key cryptography during asymmetric-key
encryption and can decrypt and transform a message to a readable structure.
Public and private keys are paired for secure connection, including email. Private Key can be part of a public/
private asymmetric key pair. It can be used in asymmetric encryption as it can use the similar key to encrypt and
decrypt information.
Pre-Shared Key − In cryptography, a pre-shared key (PSK) is a shared secret which was shared among the two
parties using a secure channel earlier it is used. In cryptography, a pre-shared key or PSK is a shared secret which
was shared among the two parties utilizing some safe channel before it required to be utilized.
The method PSK is used in Wi-Fi encryption including WEP or WPA, where both the wireless access points and all
user share the similar key. The characteristics of this secret or key are decided by the system which uses it and
some system designs needed that such keys be in a specific format. It is a password, a passphrase, or a
hexadecimal string.

You might also like