Have you ever wondered how your data and information are kept secret on the world wide web or how things like bitcoin and passwords are prevented from being lifted by anyone who can intercept some information? Look no further than encryption. Encryption is the age-old practice of taking human-readable information and scrambling it so any old joe schmoe can't read your message by robbing your messenger. Now, this robbing can range from actual robbing an on-foot messenger centuries ago, to intercepting data over the connections but if your data is encrypted, then unless the thief has a key they can't access your information.
Encryption uses a cipher to change this data. The cipher is the set of instructions or algorithm that is used to scramble the data into its unreadable format. This data then requires a key to be able to be decrypted back into its readable format. Before modern computer encryption, secret codes have long been a thing. The scytale, a leather strap with characters and a wooden rod, used by the Spartans. The leather strap would wrap around the wooden rod and the code could only be read if you were in possession of a stick with the correct size. Then there was Caeser's cipher, where Julius Caesar, shifted the positioning of each letter three spaces ahead.
In 1553, Giovan Bellaso created the first cipher with a decryption key. His system slid the lower half of an alphabet a random amount of places in relation to the upper half. In the 20th century, Edward Hugh Hebern invented the Hebern Rotor Machine. This was created by hooking up a mechanical typewriter to an electric typewriter with a metal rotor in between. Each letter on the typewriter you type with goes through the rotor which enters a corresponding letter on the scrambled message. It also slightly changes its rotation with each letter typed. To decode it, you flip the rotor over and type in the encrypted messages and the decrypted message will show up on the other end.
Bellaso's rotor machine paved the way for the Enigma machine. This was the rotor machine but with multiple rotors making it much more secure than a single rotor. The Germans were able to use this to securely communicate orders via radio, allowing for the planning of their signature blitzkrieg attacks. Then in 1932 polish mathematician and cryptoanalyst, Marian Rejewski was able to crack the enigma engine. This information was then passed on to the allies and their cryptographers such as Alan Turing allowed in the invention of the Bombe machine which was made to decrypt the enigma's code, making it crucial to the eventual allied victory in WW2.
Then in 1945 Claude E. Shannon, known as the "father of information theory", wrote "A mathematical theory of cryptography" which many consider being the starting point of modern cryptography.
In the 1970s, IBM's "crypt group" designed a block cipher to protect its customers' data, creating the Data Encryption Standard. DES is the process of using block ciphers - or algorithms that takes plaintext data in bits and transforms it into another piece of data the same length in bits. This use of bits to encrypt data makes it incredibly difficult if not impossible to brute force attack encrypted data. A brute force attack is the attempt to crack a code by trying every possible combination. In 1997, the EFF (electronic frontier foundation), in order to prove that the DES key size was not secure enough, created a machine called "deep crack" which cracked DES's 2 56-bit keys.
The Diffle-Hellman key exchange was the protocol that then set the new standard for key exchange. With symmetric-key exchange in the past, the two parties would have to exchange keys with each other in a manner that was outside of the online data exchange. The advanced encryption standard in the year 2000, increased the key size of the DES.
Finally, the Elliptic-curve cryptography, which came into wide usage in 2004-2005, is an advanced public-key scheme that allows for short keys and uses techniques such as point multiplication to satisfy the requirements of decryption. This allows for shorter keys, less processing power, and shorter physical keys are more difficult to break. This is the preferred method of encryption for crypto currency, bitcoins.