Skip to content

Building

The Six-Digit Private Key

Paul Henderson,

Where is your bitcoin?

Most people who own a little of it would point at a USB stick in a drawer, or a hardware wallet, or a scrap of paper in a safe. Wrong. The coins are entries on a public ledger, held by everyone and no one. What sits in the drawer is the private key, the secret that proves you are allowed to move them. Lose the key and the coins are still there, recorded forever, and out of reach forever.

That one fact is the biggest thing standing between ordinary people and cryptocurrency, and it is a design problem before it is a technical one.

A bitcoin private key, written out in hexadecimal, is 64 characters long. Random, unpronounceable, impossible to remember. The industry's answer is the seed phrase, twelve or twenty-four words, which is better, and which most people write on paper and then worry about.

Now compare what everyone already knows how to do. You unlock your phone with six digits. You take cash out with four. The whole of consumer banking runs on a secret short enough to remember and simple enough to type with one thumb.

That gap, between the current orthodoxy and the hard, risky business of guarding a 64-character secret yourself, is where adoption stalls. As long as owning digital money means running your own operational security, most people will either not bother or hand the key to an exchange, which defeats the purpose of the whole thing.

My clever idea

So I tried to build a bridge. Could a short numeric PIN be linked mathematically to the private key, so the user only ever had to remember the PIN? My first go was a shifting scheme. Take the key and use each digit of the PIN in turn to shift its characters, left by the first digit, right by the second, and so on, so the key is scrambled into something safe to store and only the PIN can unscramble it.

Then I asked the obvious questions. What is a salt? Does this already exist, and is anybody using it commercially?

It does exist, in far more sophisticated form, and the reasons it exists in that form are exactly why mine does not work.

What did the cryptographers already know?

Password systems have fought this problem for decades. A salt is a random value added to a password before it is processed, so two people with the same password do not end up with the same stored result, and an attacker cannot use precomputed tables. A key derivation function, with names like PBKDF2, scrypt and Argon2, takes a short human secret and the salt and runs them through a deliberately slow, memory-hungry process to produce a long key. The slowness is the design: it makes every guess expensive.

But no amount of salting or stretching can add secrecy that is not there. A six-digit PIN has one million possible values, and that is the whole space. My shifting scheme was a variation on a cipher the Romans would have recognised, and a laptop could try all million possibilities in well under a second. A properly slow derivation function turns that second into hours, perhaps days, for a determined attacker holding the stored data. A million guesses is not enough. It was never going to be enough.

No amount of salting or stretching can add secrecy that is not there.

The brain wallet experiment proved it the expensive way. People derived keys from phrases they could remember, attackers ran dictionaries through the same derivation, and the coins were drained.

So where does the PIN work?

Where it is not guarding the key at all, but guarding a device that holds the key. Your bank card survives on a four-digit PIN because the chip stops answering after three wrong attempts. A hardware wallet works the same way: the key is generated and kept inside a secure chip, the PIN unlocks the device, and a handful of wrong guesses wipes it. Phones do the same with their secure enclaves. The security comes from the hardware rationing the guesses, not from the PIN.

That is the real bridge, and people are already building it: keys held in secure hardware, unlocked by something you can remember or by your face or fingerprint, with recovery handled by splitting the key across devices or trusted parties instead of writing it on paper.

So I reinvented, badly, something cryptographers solved properly a long time ago. I learned more from finding out why my version fails than I would have if it had worked, which is my excuse and I am sticking to it. It is not a bad way into any field: start with the user's problem, propose the naive fix, then go and find the people who have already broken it.

The problem has not gone away. Self-custody will not reach ordinary people until holding your own money is as easy as typing a PIN, and the answer will be hardware and design that make the 64 characters disappear, not a cleverer cipher.