Cybersecurity Risk Analyzer: Architecture & Shannon Entropy Engine
A test-backed Python risk evaluation utility that audits credentials and habits using Claude Shannon's 1948 mathematical information theory, NIST SP 800-63B guidelines, and simulated 100 GH/s GPU brute-force modeling.
1. Problem Statement & Threat Model
Traditional password strength meters rely on superficial heuristic rules—such as requiring one uppercase letter, one digit, and one symbol. These simplistic rules create a false sense of security while encouraging predictable patterns like P@ssword1!.
Modern adversaries utilize dedicated GPU hash cracking rigs (e.g. 8x NVIDIA RTX 4090 clusters) capable of computing upwards of 100 Billion NTLM/MD5 hashes per second (~100 GH/s, based on published Hashcat benchmark figures). To accurately assess resistance against such attacks, software must model true information-theoretic entropy rather than arbitrary heuristic checklists.
2. System Architecture & Component Breakdown
Entropy Engine
Calculates pool cardinality R and theoretical bits E = L · log₂(R) with character frequency penalties.
NIST 800-63B Auditor
Enforces modern NIST digital identity guidelines, flagging common patterns and truncation traps.
GPU Cluster Simulator
Projects brute-force duration across hash rates from 10k/s (online) to 100 GH/s (offline cluster).
3. Mathematical Formulation
Claude Shannon's fundamental theorem of information entropy establishes the average information content per symbol:
For a password of length L drawn from an effective character pool of size R:
Where R is determined dynamically by analyzing character classes: lowercase (26), uppercase (26), digits (10), and ASCII punctuation (32), giving a maximum pool size of R = 94.
4. Testing Methodology & Benchmarks
The repository is backed by automated unit tests validating edge cases:
- Null and Single-Character Strings: Asserts graceful zero-entropy fallbacks without divide-by-zero exceptions.
- Repetitive Patterns (e.g. "aaaaaaaa"): Asserts penalty application reducing theoretical 38-bit entropy to near-zero practical resistance.
- Execution Latency: Benchmarked on local workstation under Python 3.12 at <0.45 milliseconds per single-string evaluation, enabling real-time keystroke reactivity in Streamlit forms.
5. Limitations & Production Mitigations
While Shannon entropy provides a rigorous upper bound on brute-force difficulty, human-generated passwords frequently exhibit grammatical biases not captured by naive uniform distribution models. In production environments, this analyzer is intended to complement—not replace—multi-factor authentication (MFA) and salted key-derivation functions (Argon2id, bcrypt).