kids encyclopedia robot

Cryptography facts for kids

Kids Encyclopedia Facts
CNAM-IMG 0558
An early 20th century cipher wheel, used for hiding messages.

Cryptography is the special way of hiding information to keep it secret and safe. Think of it like a secret code! It's a mix of mathematics, computer science, and electrical engineering. Cryptography is used everywhere today, like when you use your ATM card, type in computer passwords, or shop safely on the internet.

When you send a secret message using cryptography, it gets changed, or encrypted. The way you change the message is called a "cipher". The changed message, which looks like gibberish, is called "ciphertext". This makes the message very hard for anyone else to read. To read it, someone needs to change it back, or decrypt it. The secret way to change it back is called the "key". Both the sender and receiver must know this secret key. If someone tries to figure out the secret key by studying the ciphertext, that's called "cryptanalysis" or "code breaking".

Different types of cryptography can be easier or harder to use. They also hide the secret message better or worse. The secret key is what truly hides the message. Many people can use the same cipher method but with different keys, so they can't read each other's messages. For example, a very old cipher called the Caesar cipher only has a few keys, so it's easy to crack. Modern ciphers can have billions of keys, making them much harder to break. In the 20th century, computers became the main tool for cryptography.

A Look Back in Time

For a long time, cryptography was mostly about keeping messages secret. This meant changing messages so only the right person could read them. It was used by spies, military leaders, and diplomats to keep their talks private. But today, cryptography does much more! It also helps check if a message has been changed, proves who sent a message, and creates digital signatures.

Ancient Secret Codes

Skytala&EmptyStrip-Shaded
Reconstructed ancient Greek scytale, an early cipher device.

The oldest types of ciphers are called "classical ciphers". There are two main kinds:

  • Transposition ciphers: These mix up the order of letters in a message. For example, 'hello world' might become 'ehlol owrdl'.
  • Substitution ciphers: These replace letters or groups of letters with other letters or symbols. For example, in a simple substitution, 'fly at once' could become 'gmz bu podf' if each letter is replaced by the next one in the alphabet.

A very old substitution cipher was the Caesar cipher. Julius Caesar used it by shifting each letter a fixed number of places down the alphabet. For example, if the shift was three, 'A' would become 'D', 'B' would become 'E', and so on. Another old cipher is Atbash, from ancient Hebrew. The very first known use of cryptography was carved into stone in Egypt around 1900 BCE.

The Greeks also knew about ciphers, like the scytale. This was a stick used by the Spartan military. You would wrap a strip of paper around the stick and write your message along the stick. When unwrapped, the letters would be jumbled. Only someone with a stick of the same size could read it.

Another way to hide messages was called "steganography". This means hiding the message's existence itself. For example, Herodotus wrote about a message tattooed on a slave's shaved head and hidden by regrown hair. More modern examples include invisible ink or digital watermarks.

In ancient Persia, there were two secret scripts for official and secret messages. Later, Arab scholars like Al-Khalil (717–786) were the first to write down methods for breaking codes.

Al-kindi cryptographic
First page of a book by Al-Kindi that talks about encrypting messages.

Around the 9th century, the Arab mathematician Al-Kindi discovered "frequency analysis". This method looks at how often letters appear in a ciphertext. Since some letters (like 'E' in English) are used more often than others, this helps break simple ciphers. After this discovery, most classical ciphers could be broken by someone who knew this trick. Today, these old ciphers are mostly used for puzzles.

Over time, people invented physical tools to help with ciphers. The scytale was one of the earliest. In the Middle Ages, the cipher grille was used. More complex tools came with "polyalphabetic ciphers" (ciphers that use multiple alphabets). These included the cipher disk and the Jefferson disk. In the early 20th century, mechanical encryption machines were invented, like the famous Enigma machine. This machine was used by the German government and military during World War II. These machines made code-breaking much harder after World War I.

Computers and Codes

During World War II, code-breaking efforts in the United Kingdom led to the invention of the Colossus. This was the world's first fully electronic, digital, and programmable computer. It helped break codes made by the German Army's Lorenz machine.

In the 1970s, IBM created the Data Encryption Standard (DES) algorithm, which became the first official cryptography standard in the United States. In 1976, Whitfield Diffie and Martin Hellman published the Diffie–Hellman key exchange algorithm. A year later, the RSA algorithm was published. Since then, cryptography has become a very important tool for communications, computer networks, and computer security.

Modern Cryptography

Modern cryptography uses a lot of mathematics, including statistics, abstract algebra, and number theory. Unlike older methods that worked with letters, many computer ciphers work with binary numbers (bits) in groups or blocks.

Symmetric Ciphers

In a symmetric-key algorithm, both the sender and receiver use the same secret key. The sender uses this key to hide the message. Then, the receiver uses the exact same key to reveal the message. For hundreds of years, most cryptography was symmetric. The Advanced Encryption Standard (AES) is a very common symmetric cipher used today.

Asymmetric Ciphers

Asymmetric cryptography is a bit more complex. Each person has two keys:

  • A private key: This key is kept secret and never shared.
  • A public key: This key can be shared with anyone.

If someone wants to send you a secret message, they use your public key to hide the message. Once encrypted with your public key, only your private key can reveal the message. Even the sender can't decrypt it! This means you don't need to share a secret key beforehand.

Asymmetric cryptography usually takes more computer power and time. So, it's not always used for encrypting entire messages. Instead, it's often used for computer signatures. This helps a computer know that data (like a file or a website) truly came from a specific sender. For example, software companies use digital signatures to prove that their updates are real, so hackers can't trick you with fake updates. Websites that use HTTPS (the 'S' means secure) use an algorithm like RSA to create certificates. These certificates show that the website is real and safe. Computers can also use asymmetric ciphers to securely share the keys for symmetric ciphers.

How Cryptography is Used Today

Cryptography is used all over the internet to protect your data and stop others from secretly listening in. Many systems use private key cryptography to keep information secret during sending. Public-key systems help keep things secret without needing one main master key for everyone.

Keeping Things Safe Online

Cryptography helps keep your online communications secure by encrypting them.

  • Websites: When you see "HTTPS" in a website address, it means the website uses encryption to protect your connection.
  • Messaging: Apps like WhatsApp, Signal, and Telegram use "end-to-end" encryption. This means only the sender and receiver can read the messages.
  • Passwords: Instead of storing your actual passwords, computer systems store a "hash" of your password. A hash is like a unique digital fingerprint. When you log in, the system creates a hash of the password you type and compares it to the stored hash. This way, your actual password is never stored or seen by anyone.
  • Full Disk Encryption: Sometimes, an entire computer hard drive can be encrypted. This makes all the data on the drive unreadable without the correct login. For example, University College London uses a program called BitLocker to encrypt their computers.

Images for kids

See also

Kids robot.svg In Spanish: Criptografía para niños

kids search engine
Cryptography Facts for Kids. Kiddle Encyclopedia.