Day 071 / Security / Model Assumptions

Password Entropy Lens

View source ↗Scroll to explore ↓
Password Entropy Lens project cover
/ Overview

Compare theoretical entropy for uniform random password-generation recipes without entering a password.

NamePassword Entropy Lens

ClientIndependent daily build

IndustriesSecurity education

DateDay 071 · November 11, 2026

/ Challenge

A character count can be mistaken for a password strength verdict. A meaningful entropy calculation needs explicit assumptions about how choices were made, and an educational comparison does not need a real secret.

/ Provided services

Clear thinking.
Practical delivery.

01

Model the recipe

Length counts draws and pool counts equally likely choices; a draw may represent a character or word.

02

Compare lengths

The comparison reports additional theoretical bits for the same pool without estimating attack time.

03

State the limits

Human choices, bias, reuse, leaks and account protection are outside the model.

Password Entropy Lens feature visual
/ Solution

A Python standard-library CLI accepts only numeric length and pool parameters, computes length times log2(pool), and optionally compares a second length. It assumes independent uniform draws with replacement. JSON output includes that assumption; bounded integer validation rejects invalid parameters. It neither generates passwords nor measures human-chosen passwords, predicts crack times or claims that a credential is safe.

/ Impact

No secret input

Explicit uniform-draw model

Optional length comparison

Bounded numeric validation

Nine passing tests

/ Tech stack

Python standard library

Argparse, math and JSON provide a dependency-free CLI.

Nine tests

Known binary, dice and word-list results, boundaries, invalid inputs and CLI behavior are covered.

Next project

Bug Reproduction Template

View case study ↗