Where the twelve comes from
Thirty two to the twelfth power is about 1.15 million million million attempts. Assume an attacker a thousand times faster than the desktop used on the earlier pages, so a billion keys per second sustained. That is still around thirty six years of continuous search for one address.
Push the attacker to a million machines and it becomes a couple of weeks, at a cost that no market forgery could ever repay. Which is the honest way to put it: twelve characters is not impossible in the mathematical sense, it is uneconomic by a margin so wide that the distinction stops mattering.
Twelve is a chosen marker, not a discovered one. Eleven would be nearly as safe and thirteen would be safer. The value of naming one is that it gives you a length to compare against without having to redo the arithmetic each time.
328 = 1,099,511,627,776
3212 = 1,152,921,504,606,846,976
Twelve against the other two thresholds
The three markers on this site sit at four, eight and twelve, and the gaps between them are not intuitive. Four to eight is a factor of about a million. Eight to twelve is another factor of about a million. Every character you add multiplies the work by thirty two, so a difference that looks like a few extra letters is a difference between an afternoon and a geological age.
That is why the ladder is worth memorising rather than recalculating. Four is free. Eight is a project. Twelve is nothing anybody is doing. If you can place a comparison you are making somewhere on that ladder, you know roughly what an attacker would have had to spend to beat it, and you can stop guessing.
What twelve characters buy you
Certainty about one narrow question. If two addresses share twelve characters anywhere, they came from the same generator. Not probably, effectively certainly. That turns a fuzzy visual comparison into a firm one.
In practice this matters when you are comparing a candidate address against one you already trust. You do not need to check all fifty six characters to be sure they match, though checking all of them costs nothing if you paste rather than squint. Twelve is the point where you can stop worrying about coincidence.
What people get wrong about it
The big misunderstanding is direction. Twelve matching characters tells you two strings are the same string. It says absolutely nothing about whether that string belongs to the market. If your reference copy was already the attacker's address, comparing twelve characters against it confirms the forgery beautifully.
This is the trap that catches careful people. They build a reliable comparison habit on top of an unverified reference. The habit is fine. The reference is the problem, and only a signature fixes the reference.
The smaller error is assuming a market would ever publish a twelve character vanity address. Almost none do, because the generation cost is real for them too. Recognisable openings in this subject run to five or six characters, not twelve.
What would move it
A fundamental break in the underlying elliptic curve would make the whole exercise moot, and that would be a much larger problem than address forgery. Short of that, nothing on the horizon moves this number.
Quantum computing gets raised here and is largely beside the point. A machine that could attack the key directly would not need to search for prefixes at all.
Questions people ask
Why not just compare all 56 characters?
You should, and pasting into a text comparison is the way to do it. Twelve exists as the answer to how much is enough when you are doing it by eye.
Is there any address with a twelve character vanity prefix?
Vanishingly few, and none in this subject. The cost is the reason.