Nepedia
Back to Discover
Fluent Reader
💻

Key (cryptography)

technology Maturity 11-13 Next article →

A cryptographic key is a special piece of information. It is usually a string of letters or numbers. This key is stored in a file to help with data. You use the key with a math rule called an algorithm. The algorithm uses the key to encode or decode data. This process turns readable text into scrambled ciphertext.

Keeping the key secret is very important. A rule called Kerckhoff's principle says the whole system relies on the key being secret. If people find the key, they can read your private data. The strength of the key depends on its size and how it is made.

There are two main ways to use these keys. In symmetric cryptography, you use the same key for both jobs. That one key locks the data and unlocks it too. Asymmetric cryptography is different because it uses two separate keys. One is called a public key and the other is a private key. The private key must always stay a secret from others.

This second method is very useful for sending messages safely.

In 1976, two men named Whitfield Diffie and Martin Hellman changed things. They created the Diffie-Hellman algorithm. This was the very first public key algorithm. It allows two people to share a key over an unsafe path. Another famous system is called RSA. RSA uses three steps: key generation, encryption, and decryption.

These math tools help us move information around the world.

Key size is measured in bits. A larger key is much stronger than a small one. A larger key makes it harder for a brute force attack to work. In the past, keys were only 40 bits long. As computers got faster, those keys became too easy to break.

Now, 2048 bit RSA is a common size for many systems. For even more security, 3072 bits is often suggested. However, a powerful quantum computer could still crack current RSA keys quickly.

Keys must be made using random data so they are not guessed. A Random Bit Generator can make unpredictable bits for a key. You can even use ordinary dice to get high-quality randomness.

Sometimes, people use a password to help make a key. A password is something a human can remember. Because passwords can be easy to guess, we use a key derivation function. This is a math tool that turns a simple password into a strong key. This helps keep your personal information safe and secure.

411 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.