# 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