bitcoin-dev

Proposal to update BIP-32

Proposal to update BIP-32

Original Postby Eric Lombrozo

Posted on: April 21, 2016 15:28 UTC

Jochen Hoenicke proposed an update to BIP-32, which specifies that if for some node in the hierarchy the computed hash is larger or equal to the prime or 0, then the node is invalid and should be skipped in the BIP-32 tree.

He suggested modifying the procedure by repeating the hashing with slightly different input data until a valid private key is found. This way, the library will always return a valid node for all paths. The chance of this affecting anyone is less than 10^-30. Jochen believes that the backward compatibility issues are minimal. The current requirement shifts the burden to the application developer instead of being able to handle it in the BIP-32 library. He also suggests updating other derivation functions in a similar manner. Many app developers feel like the additional complexity of properly handling this case is not worth the effort, but if the handling of this case is simple to implement and easy to isolate in the program flow, he is in favor of doing something along those lines.