The safety in bits of a 12-word mnemonic that has a sound checksum as per BIP39 is just not 132 bits, however quite 128 bits, because the final 4 bits are decided based mostly on the primary 128 bits – the preliminary “entropy”.
- Regardless that the vary of two^132 of all attainable mnemonics is 16 occasions
bigger than 2^128 (the place(2^128)*16 = 2^132)
, the checksum can not
be predicted except an attacker can break SHA256, because the checksum is
computed based mostly on the hash digest of the main 128 bits formatted
as a byte array.
So the thought with the checksum was to sluggish an attacker from looking out by all attainable 12-word mnemonics of which there are 2^132 of them, regardless that the variety of legitimate ones is 2^128 when it comes to a sound checksum (as if decreasing the energy from 12 phrases to 11.6363636364 phrases, for the reason that checksum completes a part of the final phrase), as an attacker must run the SHA256 algorithm every time which is able to sluggish their brute-force search.
- Due to this fact, whereas 2048^12 = 2^132, the checksum implies that the vary
of checksum-valid mnemonics is 2048^11.6363636364 == 2^128.
In abstract, I believe a mnemonic with a sound checksum could be extra secure than one with out a checksum, on the premise that it is in all probability much less probably for SHA256 to be cracked anytime quickly which might in any other case velocity a possible brute-force search of all mnemonics.
- This implies an attacker nonetheless wants to look within the vary of two^132
with a view to discover one of many 2^128 legitimate ones (i.e. there is no such thing as a manner
to solely search the vary of legitimate ones, except SHA256 is damaged).
Word: In case you wished to sq. your safety (i.e. increase it to the facility of two), a 24-word mnemonic which represents 264 bits (minus an 8-bit checksum) could be the sq. of two 12-word mnemonics when it comes to bit safety as 2^128*2^128 == 2^256.
Such an enormous leap in safety may assist defend a person later from Grover’s algorithm working on a fast-enough quantum laptop which may carry out such an n-time brute-force search within the “sq. of n-time”, in contrast classical computer systems requiring n-time.
From: https://en.wikipedia.org/wiki/Groverpercent27s_algorithm:
Grover’s algorithm may brute-force a 128-bit symmetric cryptographic key in roughly 2^64 iterations or a 256-bit key in roughly 2^128 iterations.`
In different phrases, a 12-word mnemonic would have its safety diminished to 64 bits (thought-about unsafe) when it comes to classical laptop safety, whereas a 24-word mnemonic would solely scale back to 128 bits in the identical state of affairs.