Cryptographic Algorithms & Attacks

Linear Congruental Generator (LCG)

  • Formula: (using Seed = 0).
  • Characteristics: Fast, simple implementation, but predictable output distribution.

Blum Blum Shub (BBS) Mitigations

  • Non-uniform distribution issues require smoothing, averaging, or taking every second output value.
  • Entropy Extraction: Restrict output evaluation to specific bit positions (e.g., last 2 digits).

Square & Multiply

  • Efficient algorithm used for exponentiation (e.g., ).
  • Side-Channel Vulnerabilities: Execution time, power consumption, and stack movement leak state data during execution.
  • Mitigation: Implement dummy multiplications (multiply by 1 when bit is 0), disable compiler optimizations, mask jumps, and complete execution loops even when remaining operations are zero.

Cryptanalytic Concepts

  • Meet-in-the-Middle: Reduces time complexity bounds (comparing vs ).
  • Block Cipher Modes: Electronic Codebook (ECB) mode reveals structural patterns in identical plaintext blocks.
  • Feistel Networks: Non-linear structures containing fixed points; linear functions within linear components produce linear outputs, yielding poor entropy characteristics.