DEV Community

Sean Niehus
Sean Niehus

Posted on • Edited on

Intro to Encryption

Encryption is the act of encoding data to keep it secure as it passes from the sender to the receiver. It is used to keep sensitive information private allowing it to only be viewed by authorized persons or organizations. Encryption is crucial to keeping data secure as it travels electronically through networks and over the internet. This blog will serve as a basic introduction that includes a brief history of the field, an exploration of how it works, and an examination of different methods that are used.

For nearly as long as humans have had the ability to write and share messages, they have been creating ways to keep the messages keep the messages from being viewed by others. Many of the earliest documented uses of encryption were efforts made by militaries to keep their enemies from deciphering their intercepted communications. The most famous is the Caesar Cipher where the intended receiver would know how many many letters (the key) to increment to decode the message. This was a fairly ineffective method though, as the number of attempts to crack the code is the number of letters of the alphabet. The Enigma machine, used by the Axis powers could electro-mechanically scramble the letters of a message. This device took in plain text and outputted cipher text, the receiving party knew the settings, which were changed daily, and use their own device when it was received to decrypt it. Poland was able to crack the code in 1932, which was instrumental in leading to the Allies' success.

Today, mathematical algorithms encrypt nearly all the data that travels electronically. The most common methods that programmers use are symmetric-key, asymmetric-key, and hash functions. Symmetric-key encryption is when the sender and receiver use the same key to gain scramble and unscramble the data. In order for the data to remain secure, both parties must keep the key private, which makes this method less reliable than more sophisticated methods.

Public-key encryption is the asymmetric alternative, which uses a public key and a private key. The public key is used to encode the data and the private key decodes it. With this method, only the private key must be secured to maintain security.

Today's computers need to be way more sophisticated than the early methods. Where the earliest encryption methods had cipher texts the same length as the raw messages today, the keys are made longer. Algorithms can be used to map every character to another the repeat the code mapping with a different function, this process is repeated many times over until the encryption is unlikely to be compromised by even the most powerful computer the standard length for modern keys is 256-bit.

With everyone sending banking information, passwords, and credit card over the internet it is crucial that the data remain out of the hands of hackers. Encryption methods continue to advance and become more and more sophisticated to protect all the sensitive data that is constantly being passed around the internet.

Top comments (0)