kingRayhan/crypto-mid

โ˜… 0Forks 0GitHub โ†—Compare

README

๐Ÿ“˜ Lecture 1: Basics (VERY IMPORTANT)

From agenda (page 5)

Must know:

  • What is cryptography

  • Security goals:

    • Confidentiality
    • Integrity
    • Authentication
  • Why crypto is needed (ATM, web, etc.)

Likely questions:

  • Define cryptography
  • Why is cryptography important?

๐Ÿ“˜ Lecture 2: Number Theory (HIGH PRIORITY)

From agenda (page 2)

Must know:

1. Prime Numbers

  • Definition
  • Example
  • Why important (RSA)

2. GCD + Euclidean Algorithm

  • How to calculate GCD (step-by-step)

3. Modular Arithmetic

  • mod operations
  • (a + b) mod n
  • (a ร— b) mod n

4. Fermat Theorem

  • aแต– โ‰ก a (mod p)

5. Miller-Rabin (concept only)

  • probabilistic test

Crypto part:

  • Substitution cipher
  • Transposition cipher
  • One-time pad

๐Ÿ“˜ Lecture 3: Crypto Systems (IMPORTANT)

From slides (page 2โ€“4)

Must know:

1. Types of encryption

  • Symmetric
  • Asymmetric

2. Core principles:

  • Substitution
  • Transposition

3. Block vs Stream cipher

  • Block โ†’ fixed size
  • Stream โ†’ continuous

4. Attacks:

  • Brute force
  • Cryptanalysis

5. Security:

  • Unconditional security (OTP only)
  • Computational security

๐Ÿ“˜ Lecture 4: AES (VERY VERY IMPORTANT โญ)

This is your main topic.

Must know:

1. AES basics

  • Block size = 128 bit
  • Key = 128 / 192 / 256
  • Rounds = 10 / 12 / 14

2. AES Steps (must memorize)

Initial:
AddRoundKey

Rounds:
SubBytes
ShiftRows
MixColumns
AddRoundKey

Final:
SubBytes
ShiftRows
AddRoundKey

3. Each operation

  • SubBytes โ†’ S-box
  • ShiftRows โ†’ shifting
  • MixColumns โ†’ matrix multiply
  • AddRoundKey โ†’ XOR

4. Internal structure

  • 4ร—4 matrix (state)

5. Key Schedule (IMPORTANT)

  • W[i] formula
  • g() = RotWord + SubWord + Rcon

6. Decryption (basic idea)

  • inverse operations

7. Modes (concept)

  • ECB (bad)
  • CBC
  • CTR

๐Ÿ“˜ Lecture 5: Public Key Crypto (IMPORTANT)

Must know:

1. Asymmetric crypto

  • public key + private key

2. Key idea

  • trapdoor function
  • easy forward, hard reverse

3. Examples:

  • RSA
  • Diffie-Hellman
  • ECC

4. Digital Signature

  • sign with private key
  • verify with public key

๐Ÿง  What to prioritize (VERY IMPORTANT)

If time is low, focus on:

๐Ÿ”ด Must study

  • AES full flow
  • Key schedule
  • Symmetric vs Asymmetric
  • Prime + mod + GCD

๐ŸŸก Medium

  • Attacks
  • Modes (ECB, CBC, CTR)
  • Digital signature

๐ŸŸข Low

  • History slides
  • long examples

โšก Final exam strategy

  • Practice:

    • XOR
    • mod arithmetic
    • AES steps order
  • Memorize:

    • AES flow
    • definitions

Contributors

kingRayhan

Issues