A Short Primer on Cryptography

Mitchell Goodwin
2 min readFeb 6, 2020

--

In the modern world, where everyone is sending messages many times a day to people, websites, and services everywhere, there is a much larger need to find ways to keep those accessible messages and data secure. In order to do so, most websites and apps use something called Cryptography, which is the practice of obscuring, or encrypting, information to not be readable by an unwanted viewer.

Cryptography is not new. It’s been around for as long as people have wanted to send secret messages. The basic way it works is this: person A wants to send a message to person B. Person A writes a message according to a standard, or “key”, that person B is either aware of or has access to, and then sends it to person B who is able to translate it back into a readable message. Person C along the way is unable to read the message, as all they see is nonsense. In an early basic form of Cryptography, the ancient Greeks would write messages on paper wrapped around sticks, unwrap the paper, then send that message to someone who has a stick of the same size and shape, who can rewrap the message around their stick to be readable.

In modern times with computers, the need to send hidden data has grown exponentially, as well as the ability of people to break encryptions. Making a secure key pair has to be done by building algorithms with computers that are difficult enough to not be broken, and shoot straight into the theoretical. One of the most popular formats is the public/private key system which was theorized and made popular in 1976, two years before it was practically created.

Rails has built in cryptography in how it manages its cookies. But ruby also has many gems that can be used with their own encryption methods, like OpenSSL, and attr_encrypted. Cryptography is a very complicated math and science chimera that is difficult to get in to, but it’s still very exciting and lost of smarter people have put a lot of time into figuring it out.

--

--