One-time pad
Adapted from Wikipedia · Discoverer experience
The one-time pad (OTP) is an encryption technique that cannot be cracked in cryptography. It uses a special key that is used only once and is as long as the message itself. This key is made up of random numbers or letters, and each part of the message is mixed with a part of the key to create the secret code.
For the one-time pad to work perfectly, four important rules must be followed. The key must be at least as long as the message, it must be completely random, it can never be used again, and it must be kept a secret between the people who need to send and receive the message. When these rules are followed, the one-time pad is the only encryption method that has been proven to be completely unbreakable.
Even though it is very secure, using the one-time pad can be difficult because of the challenge of sharing the secret key safely. It was first described by Frank Miller in 1882 and later improved by Gilbert Vernam and Joseph Mauborgne. Sometimes, the keys were written on special paper that could be burned after use to keep them safe.
History
Frank Miller was the first person to explain how the one-time pad could be used to keep telegraph messages safe, back in 1882.
Later, in 1917, Gilbert Vernam created an electrical version using machines that could print letters. He worked with Joseph Mauborgne, an officer in the U.S. Army, who suggested using completely random numbers to make it even harder to break.
During World War II, some German experts made special pads with random numbers to protect secret messages. They used these pads just once and then destroyed them.
Finally, in the 1940s, Claude Shannon showed just how strong this method was. He proved that when used correctly, the one-time pad keeps messages completely safe.
Example
Suppose Alice wants to send the message hello to Bob. They both have special pads with random letters, and they agree to use one page from these pads for this message.
Alice writes the message and adds the letters from her pad in a special way. For example, if her pad starts with XMCKL and her message is hello, she changes each letter to a number, adds the numbers from the pad, and then uses the remainder after dividing by 26. This creates a secret code EQNVZ that she sends to Bob.
Bob uses his matching pad to subtract the numbers in reverse, turning EQNVZ back into hello. After they finish, both Alice and Bob destroy their used pad pages so no one else can use them again.
Perfect secrecy
One-time pads are a very strong way to keep messages safe. They were first created during World War II by Claude Shannon. When used correctly, one-time pads keep messages secret, even from someone who can try every possible way to break the code.
Unlike other ways to hide messages, one-time pads do not rely on hard math problems. Instead, they use a special key that is used only once. This makes them safe, even if someone has very powerful computers to try to break the code.
Problems
Even though the one-time pad is very secure, it has some big problems in real use. It needs truly random numbers, which are hard to make with regular computers. These random numbers must also be shared safely between the people who want to use them, and they need to be as long as the secret message itself.
Because of these problems, one-time pads are not often used today. Better and easier ways to keep messages safe exist now. These newer methods do not need such long, random numbers and are simpler to use.
Uses
The one-time pad is a special way to keep messages secret. It works best when people can do the work by hand, without a computer. This was important before computers were common. Even today, it might be useful in places where computers are not trusted or available.
One-time pads are also used in special kinds of communication that need very strong security. They can be linked with other advanced methods to make sending secret messages even safer. Some important systems have used one-time pads to protect their messages.
Related articles
This article is a child-friendly adaptation of the Wikipedia article on One-time pad, available under CC BY-SA 4.0.
Safekipedia