Expand description
BIP 93 codex32 BCH primitives for HRP "md" (regular code only).
Extracted from the v0.x encoding module; v0.11 needs only the regular-code
checksum + verify (long code dropped along with v0.x).
Constants§
- GEN_
REGULAR - BCH(93,80,8) generator polynomial coefficients (5 × 65-bit).
- MD_
REGULAR_ CONST - MD-domain target residue (NUMS-style, top 65 bits of
SHA-256("shibbolethnums")).
Functions§
- bch_
create_ checksum_ regular - 13-symbol regular-code BCH checksum over
hrp_expand(hrp) || data || [0; 13]. - bch_
verify_ regular - Verify a regular-code BCH checksum over the data-part-with-checksum.
- hrp_
expand - BIP 173-style HRP expansion:
[c >> 5 for c in hrp] ++ [0] ++ [c & 31 for c in hrp]. - polymod_
run - Run the BCH polymod over
valuesstarting fromPOLYMOD_INIT.