Reading 18
Cryptography
- Cryptography is the science of systematically scrambling information to keep its contents hidden from anyone not authorized to view it.
- Plain-text - the intended message or unscrambled data
- Ciphertext - the encrypted data
- Cipher - the exact method or algorithm used to manipulate the plain-text
- Polymorphism - a cipher that changes itself with each use ( like the German Enigma Machine ).
Example, The Ceasar Cipher
When Julius Caesar ruled over the Roman Empire, he used a simple cipher to encrpyt his messages. The Caesar Cipher, as it is known, shifted all letters of the alphabet up or down a predetermined number of spaces. Caesar typically used a shift of 3, therefore, A -> D, E -> H, L -> O and so on. This simple ciphering method is widely known and easy to crack, therefore, cannot be used in any serious application.
Modern Cryptography
Today, we use more sophisticated methods to encrypt our important data. Diffie-Hellman key exchange uses Modular Exponentiation. What this means is the sender and receiver each apply a secret number as an exponent in a formula. When each secret exponent is applied to the same formula the result is the same. In the example below, the sender uses X as their secret exponent, and the receiver uses Y:
B^x mod M <———–> B^y mod M results in (B^xy mod M)
A shared key is established!
Symmetric Encryption vs Asymmetric
- Symmetric - Both parties receive a private key
- Asymmetric - One party receives a private key and the other only receives the public key (RSA encrpytion)
sources:
- https://www.youtube.com/watch?v=jhXCTbFnK8o
- https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:online-data-security/xcae6f4a7ff015e7d:data-encryption-techniques/a/encryption-decryption-and-code-cracking
- https://en.wikipedia.org/wiki/Caesar_cipher