We take ideas and build, mould and shape them into commercial products and operating companies.
Dates back to ancient Egypt.
Live up until the 20th century, methods of encryption using pen and paper, sometimes small mechanical aid.
Kings had their chief cipherers.
Cryptanalysis starts to be taken more seriously, with more academics getting involved.
Cryptography plays a huge part in WW I, mostly used in the navy.
Total break - key is compromised
Global deduction - algo to break the code w/out the key
Instance deduction
Information deduction - Shannon information about the ciphertext
Distinguish algo - Differentiate between random characters and ciphertext
Electromechanical cipher machines became widely used.
Start to move away from one-time pads to mechanical ciphers.
These keys convert the messages and data into “digital gibberish” through encryption and then return them to the original form through decryption.
They use the same cryptographic keys for both encryption of plaintext and decryption of ciphertext.
Examples: AES, Twofish, Blowfish
Block cipher, except when changing keys.
The algorithm keeps two subkey arrays: the 18-entry P-array and four 256-entry S-boxes
64-bit block size; 32-bit - 448-bit key length
Uses Substitution Boxes to make an 8-bit input into 32-bit output
Based on combination of both substitution and permutation, and is fast in both software and hardware.
Specified with block and key sizes that may be any multiple of 32 bits.
Operates on a 4×4 matrix of bytes, termed the state.
It has a public and private key, this key pair is mathematically linked.
Public key is used for ditigal signature, encrypt plain text.
Private key is used to create signature, decrypt cipher.
RSA creates and then publishes a public key based on two large Prime numbers.
Usually some padding is applied before encrypting a message.
p = 61, q = 53, n = 3233;
φ(n) = 3120; # Euler-function
e = 17; # 1 < e < 3120
d = e (mod φ(n)) = 2753;
public key is (n = 3233, e = 17)
private key is (d = 2753)
To encrypt m = 65, we calculate
c = 65^17 mod 3233 # 2790
To decrypt c = 2790, we calculate
m = 2790^2753 mod 3233 # 65
Used for signing, encrypting and decrypting emails, texts, files, and documents. PGP combines symmetric-key encryption and public-key encryption.
Each public key is bound to a user's email address.
A function that is considered practically impossible to invert. The input data is often called the message, and the hash value is often called the message digest or simply the digest.
Examples: MD5, SHA-1
require 'digest'
salt = "G0rd0n/R4mSey" # Generated for the user and stored with the digest
pepper = "B33F-We11ingt0n" # Not stored anywhere near the digests/salts
message = "Ruby Ireland"
# simple
digest = Digest::MD5.hexdigest(message) # "ba7b9a8db08db9e98c3b7549db008f0b"
# seasoned
digest = Digest::MD5.hexdigest(salt + pepper + message) # "90ae1628a113a7b213756360a311d319"