Code 401 Class 18 Reading Notes
Encryption, Decryption & Hacking
- Caesar Cipher: The earliest encryption techniques invented by Julius Caesar more than 2k years ago to communicate messages to his allies
- Known plaintext: Encrypted messages starting with similar beginnings
Encryption, decryption, and cracking
- Encryption: Scrambling the data according to a secret key
- Decryption: recovering the original data from scrambled data by using the secret key.
- Code cracking: Uncovering the original data without knowing the secret, by using a variety of clever techniques.
Cryptography Crash Course
cryptography: crypto + graphy = secret writing
- Defense in Depth: A strategy that leverages multiple security measures to protect and organization’s assets.
- Columnar Transposition Cipher: Writing the plaintext out in rows, and then reading the ciphertext off in columns one by one. Substitution Cipher: Any character of plain text from the given fixed set of characters is substituted by some other character from the same set depending on a key.
- Data Encryption Standard: Used binary keys that were 52 bits long. There are are 2 to the 56 or about 72 quadrillion different keys. This form is outdated
- Advanced Encryption Standard: Designed to use keys that are 128, 192, 256 bits long.
- AES chops data up into 16-byte blocks, and then applies a series of substitutions and permutations, based on the key value, plus some other operations to obscure the message, and this process is repeated ten or more times for each block.
- AES balances performance and security to provide practical cryptography.
- Key exchange: An algorithm that lets two computers agree on a key without every sending one.
- Accomplished with one way functions: Mathematical operations tha are very easy to do in one direction, but hard to reverse.
- Diffie-Hellman key exchange: One way function is modular exponentiation
- Take a base number and an exponent, taking the remainder when dividing by a third number, the modulus.
- B^YX mod M
Key Parts of Modern cryptography
- Symmetric encryption: algorithms that use same cryptographic keys for both the encryption of plaintext and the decryption of ciphertext
- Key exchange: A method by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. Sender and receiver exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received.
- Public-key cryptography: Uses pairs of keys, each pair consists of a public key and a private key. The generation of such key pairs depends on cryptographic algorithms which are based on mathematical problems termed one-way functions.