Skip to content

bip85: Say when applications must use BIP85-DRNG - #2333

Open
BenWestgate wants to merge 2 commits into
bitcoin:masterfrom
BenWestgate:bip85-when-must-use-drng
Open

BenWestgate wants to merge 2 commits into
bitcoin:masterfrom
BenWestgate:bip85-when-must-use-drng

Conversation

@BenWestgate

Copy link
Copy Markdown
Contributor

There has been confusion during bip85 app proposals which entropy source to use, lets make their choice explicit in the standard.

What: An application that could need more than the 64 bytes of HMAC-SHA512 output for any of its derivation paths MUST use BIP85-DRNG for all of its derivation paths. All other applications MUST use the HMAC-SHA512 output directly.

How: Two sentences after the paragraph that introduces the HMAC output, a one-line rationale footnote, the version bump and a changelog entry.

Why: This is the per-application rule akarve proposed on #2295 (Sep 19 and Oct 12, 2026). Every existing application already follows it: RSA and DICE use BIP85-DRNG, and BIP39, HD-Seed WIF, XPRV, HEX, PWD BASE64, PWD BASE85 and Nostr never read more than the 64 bytes. No output changes. A new MUST is a backward-compatible change to the specification, so this is a MINOR bump to 2.2.0 per BIP 3.

Require applications that can need more than the 64 bytes of HMAC-SHA512
output for any derivation path to use BIP85-DRNG for all their paths.
Other applications use the HMAC-SHA512 output directly, keeping each
application on one entropy-source code path.

Existing applications already follow this rule, so their outputs do not
change. Bump the specification version to 2.2.0 and record the requirement
in the changelog.
@BenWestgate

BenWestgate commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

@akarve this tiny PR implements your entropy source selection suggestions. Ready for review at 0f2abb3

@fametrano fametrano left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK. An independent implementation, btclib-wallet's bip85.py, already follows the rule: only DICE and RSA read BIP85-DRNG, and every other application uses the HMAC output directly, so no output changes. Its 65 BIP85 tests, which include every vector the BIP publishes, pass. The RSA section still says the key generator "should" use BIP85-DRNG; a "MUST" there would match the new rule.

@jonatack jonatack added Proposed BIP modification PR by non-owner to update BIP content Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Oct 20, 2026
@BenWestgate

Copy link
Copy Markdown
Contributor Author

@fametrano 4dbd8c3 changes "should" to "MUST" use BIP85-DRNG in the RSA section as you requested.

@fametrano fametrano left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 4dbd8c3. The RSA section now says MUST, as the new rule at line 62 requires. The test vectors are unchanged, so the btclib-wallet check in my Concept ACK still holds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified Proposed BIP modification PR by non-owner to update BIP content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants