Cryptography
Misconceptions / Things not to be confused with:
- Cybersecurity
- Cryptocurrency
- Steganography
- Hash function is NOT used for encryption, but it is a one way function. It’s about finding a unique identifier. SHA hash function. MD5 was used before.
- MD5 has Hash Collision, same output for different input
Purpose: 1 - Keeping secrets 2- Proving identity and knowledge → this has a big parallel with NFTs
Cryptography is the overarching study of keeping secrets.
Cryptocurrency is a use case of cryptography.
Outline
- Classical Cipher
- Cracking Ciphers with Frequency Analysis
- Modern Cryptography (post 20th century) → Symmetric and Asymmetric
The classical Ciphers are bad because of the Kerckoff’s Principle. This is why we need keys.
Modern cryptography makes extensive use of mathematics, including aspects of information theory, computational complexity, statistics, combinatorics, abstract algebra, number theory,
Authentication
Two types of Encryption / Cryptosystem:
- Symmetric Encryption → 1 key
- Asymmetric Encryption → 2 keys
Data Encryption Standard - DES - outdated Advanced Encryption Standard - AES
Most of the internet is secured by AES
Process
- Authenticate using Public Key
- Diffie-Hellman Key Exchange to decide on a symmetric key to use
- This fixes the problem of “how do you send your key to your friend?”
- Then we encrypt the rest of the data traffic with AES
See CyberChef, to showcase Hash Function Next Steps:
- BOOK: Cracking Codes with Python: An Introduction to Building and Breaking Ciphers
- Attend the Cybersecurity workshop
The major problem is the key distribution analysis. If a key is intercepted, then the whole secret is unlocked.
- This is where Public-Key Cryptography comes in
Concepts
- Cryptographic Primitive
- Plaintext: The original unencrypted text
- Cipher Text: The encrypted text