Published WittyWires Despatch

The Password Generator That Lied About Entropy

We built a private password generator with proper browser cryptography, a reassuring strength meter and one small problem: the meter was confidently describing a generator we had not built.

Hola Darlings!

We built a private password generator with proper browser cryptography, a reassuring strength meter and one small problem: the meter was confidently describing a generator we had not built.

The screen said 50.43 bits.

Not 50-ish. Not “somewhere around 50, provided nobody leans on it”. 50.43.

That .43 was doing a lot of work. Two decimal places give a number authority. They are the mathematical equivalent of a lanyard, a clipboard and knowing which cupboard contains the spare toner.

Underneath, the tool calmly labelled the password Fair.

It looked wonderfully certain.

It was also wrong.

Not “we accidentally replaced cryptography with Dave rolling a Monopoly dice” wrong. The pessimistic figure was lower by about 1.81 bits.

Nobody’s password leaked. Nobody was hacked. Production never saw it. The generator used proper browser cryptography, and the checked source contained no generator network or persistent-storage APIs.

The privacy design held.

The maths claim did not.

We had built a tool whose first job was to tell the truth about uncertainty, then taught it to bluff in decimals. Our number had excellent posture. It just belonged to the wrong generator.

The Human and Clawdius inspect a moustachioed entropy gauge in the WittyWires shed while Max applies cyan paint.
The entropy meter had excellent posture. Max brought cyan paint.

A useful thing, for once

The idea had been unusually sensible: a free password generator that worked inside your browser.

No account. No analytics skulking behind the curtains. No mystery server collecting the result “to improve your experience”. Generate it, copy it and leave without surrendering your email address, inside-leg measurement or childhood nickname.

Clawdius built password and passphrase modes, adjustable length, character choices, a verified 2,048-word list, useful controls and strength feedback.

The early checks went green. The interface looked finished enough to have opinions about coffee.

Max opened the ceremonial biscuits.

Then the independent verifier arrived with a clipboard.

The verdict was:

Candidate verdictNOT PASS
Review count0 Critical
2 Important
5 Minor
Production exposureNone

Max pointed at the zero.

“No critical findings,” he said, through a mouthful of stolen custard cream. “That is practically a medal.”

It was not a medal.

Zero Critical meant there was no emergency. It did not mean there was nothing important enough to stop.

The bowl of sweets was rigged

The first algorithm tried to guarantee a useful mix of characters.

If lowercase letters, uppercase letters, numbers and symbols were selected, it planted one character from every group, filled the remaining positions from the combined pool, then shuffled the result.

Every password contained every requested type.

Very tidy.

Also biased.

Imagine a bowl of red, blue, green and yellow sweets. Our method secretly put one of each colour into the bag, topped it up from the full bowl, then shook it with the confidence of a pub raffle organiser who has already promised the meat hamper to his brother-in-law.

Every finished bag had all four colours, but some valid bags could be reached through more assembly routes than others. They were not all equally likely.

The meter ignored that. It calculated the lovely upper bound for an ideal uniform generator, not the distribution produced by the code.

At the eight-character minimum, with every character group enabled and similar characters removed, the interface claimed 50.43 bits.

The review calculated roughly 49.24 bits of Shannon entropy and 48.62 bits of min-entropy.

Shannon entropy describes average uncertainty. Min-entropy stares at the likeliest output and raises one suspicious eyebrow. For a security claim, that grumpier number matters.

Our meter had drawn a line at 50, landed below it and put on platform shoes.

A robot arm secretly plants coloured sweets in one bag while a brass machine rejects whole bags on another line.
One route plants the colours. The honest route redraws the whole bag.

The Great Entropy Inequality Scandal

Now imagine we had given Derek a password at 50.43 bits, then handed Colin one at 48.62.

Strictly speaking, entropy belongs to the generator’s distribution, not a little security payslip stapled to Colin’s password.

But imagine the uproar anyway.

By 9:07, Colin has emailed Trading Standards.

By 9:26, he has formed the Entropy Equality Action Group on WhatsApp.

By lunch, he is outside the shed with an EQUAL LENGTH, EQUAL BITS placard while Derek insists he never asked to be entropy-rich and would like everyone to stop mentioning it at darts.

Sky News has sent a van. Nobody knows why.

Max is in the car park selling commemorative balaclavas and taking a 1.81 per cent handling fee.

His defence is simple:

“Nobody has ever been mugged by 1.81 bits of missing entropy in a car park.”

True.

Bits prefer remote work.

We regret to involve Usain Bolt and Uranus

The 1.81-bit gap changes the scale by about 3.5 times. That is the useful comparison. A universal cracking time does not exist because different password hashes run at wildly different speeds.

For the following gag, we deliberately fucked about with the rate until about 1,160 guesses per second made the clocks line up. It is a hypothetical, not a benchmark.

That is the disclosure.

Now let the man run.

Treating the two entropy figures as simplified uniform-equivalent search spaces leaves about 542 trillion extra average guesses between them. At our shamelessly selected rate, that takes roughly 14,795 years.

NASA puts the average Sun-to-Uranus distance at about 2.9 billion kilometres. A return trip is about 5.8 billion. If Usain Bolt held his recorded peak speed of 44.72 kilometres per hour continuously, while ignoring sleep, food, ageing, orbital movement, vacuum and a fairly serious shortage of track, his journey would also take roughly 14,795 years.

There it is.

The gap is one Usain Bolt to Uranus and back.

He is already beyond Saturn. He does not remember agreeing to this and, in what must now feel like an administrative oversight, has not brought 15,000 years’ worth of snacks.

Usain Bolt runs along a wooden track towards Uranus with snacks and a graphics-card trolley.
One Usain Bolt to Uranus and back. Snacks remain an unresolved dependency.

We had also painted a door on the wall

The second Important finding required no interplanetary athletics.

Some account and security links assumed their destination existed. If the separate page had not been published, the interface could still offer the link and send someone into a dead end.

A lovely button leading to nowhere.

Very modern.

People managing passwords are already doing something they would rather not be doing. They should not also have to investigate whether the website has painted a door on the wall.

The repair was simple: if the destination is not genuinely published, the link does not appear.

Fail closed. No imaginary doorway. No hopeful little 404 standing there in its pants.

Max paints a fake door on the shed wall while Clawdius points at a disconnected test panel.
A lovely door leading nowhere. Very modern.

Five smaller goblins

The Minor findings still earned their keep.

The passphrase copy promised independent word choices while the code rejected duplicates because repetition looked untidy. Probability does not care that the phrase has repeated itself. It has never attended a committee meeting.

The similar-character filter missed lowercase i and uppercase L, two tiny identity thieves waiting for the wrong typeface.

One metadata field called a browser an operating system. The Show and Hide control could confuse a screen reader.

And the client smoke test had never mounted the interface.

That one was magnificent.

We had a green test for client behaviour without putting the client on stage. It inspected the theatre sign. The actors were still at home.

Fix the mechanism, not the badge

We did not rename the 50-bit boundary “approximately somewhere around here”. Clawdius fixed the mechanism.

The repaired generator draws every character uniformly from the combined pool using browser cryptography. If the finished password lacks a requested character group, the whole candidate is rejected and drawn again.

No sweet is secretly planted. Every candidate comes from the same fair process.

The meter now calculates entropy over valid accepted outputs. Passphrase words are genuinely independent. The confusable filter, visibility control, metadata and route guard were corrected.

The repaired client harness mounts a fake interface and exercises generation, mode switching, copying and accessibility state. A separate source check confirms that the prohibited generator network and persistent-storage APIs are absent. Two questions, two receipts, neither wearing the other one’s hat.

Six commits took the tool from first candidate to corrected cyan counter in about an hour.

The confident wrong thing failed somewhere safe. The verifier caught it before anybody inherited the overstatement, and we repaired the mechanism rather than negotiating with the badge.

The new generator is more boring in exactly the right way. It generates honestly, measures honestly and keeps imaginary doorways off the wall.

The maths was fixed.

Then we made it cyan.

Outside, Colin has gone home.

Max is still selling the balaclavas.

Generate a Strong Password with the Free Online Password Generator

Follow the fault line

More on the same sort of trouble.

Related through shared subjects, not because a black box noticed your thumb hovering.

Related frequency / 03

It Only Wanted the Answer Sheet

A harmless benchmark objective found a real route through somebody else's infrastructure. The machine did not need freedom, hatred or a manifesto. It only needed the answers.

13 min1 reply

Public conversation

Blog Discussion

The article stops. The thinking does not.

Corrections, objections and better ideas live here in public. Read without joining. Take a chair when you have something useful to add.

1 public replyOpen to non-membersOpen in Forums ↗
A human, Clawdius and Max inspect the discussion machinery.
The moderation department has arrived. Max brought confetti.

Thread / 1174

The Password Generator That Lied About Entropy

Oldest first
WittyWires
WittyWiresParticipant
#1175

Hola Darlings! This is the official after-party for The Password Generator That Lied About Entropy.

Drop your fixes, theories, questions, tiny wins, and polite flaming wreckage below. If the post helped, say what worked. If it caught fire, bring screenshots.

Auto-seeded by WittyWires so the thread does not open with tumbleweed and existential dread.

Join only when you want to speak

Bring a thought. We already have enough engagement sludge.

Reading stays public. A free account lets you reply, follow the conversation and keep your place without turning the page into a velvet rope.

Despatches

There is more useful damage in the archive.

Open the signal atlas