sha256 – Seed Phrase checksum

0
9
sha256 – Seed Phrase checksum


I’ve a program that I am engaged on, in plain old style C, the place I get the consumer to flip a coin 128 occasions. This gives my 128 bits to run via SHA256. The primary byte of that hash (leftmost character?) ought to convert again to binary and append to the preliminary entropy. It will present 132 bits to type the 12 seed phrases. However the final phrase is rarely proper. One thing is flawed with my logic. Can any person please spot it and let me know what I have to do?? Right here is an instance. Say the consumer flipped heads 128 occasions. That might be 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111. After I run that via the hash, I get 5ac6a5945f16500911219129984ba8b387a06f24fe383ce4e81a73294065461b. The primary (leftmost) character is a hex ‘5’ so I convert that again to binary and get 0101. That makes the now 132 bits 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110101. That ought to give me a seed phrase of “zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrist” however that isn’t proper. Ian Coleman’s internet web page says the proper reply will not be “wrist” and Sparrow Pockets says “wrist” will not be a sound checksum. The place have I swerved off the street?

LEAVE A REPLY

Please enter your comment!
Please enter your name here