By using SHA256 as a checksum and requiring a 32 to 1 ratio of entropy to checksum, we bound ENT to 8192 bits (1024 bytes), because CS has reached a maximum of 256 bits. Although it seems unrealistic, it is a hard limit, and not preventing it could lead to mnemonics that can't be decoded or other implementations can't verify.
Libraries that expose encoding/decoding a BIP39 mnemonic should check:
- whilst encoding, that the entropy size does not exceed 8192 bits, and that
entropyBits % 32 == 0 - whilst decoding, that the length of the encoded bit-string does not exceed 8448 bits
Context: https://github.com/bitcoinjs/bip39/pull/37 @dcousens @rubensayshi @voisine @prusnak