Review report

bitcoin/bitcoin: PR #36812

1 suggestion

Optional improvements

Link

[suggestion] · Six-label HKDF vectors lack expected-value provenance

The new fixed outputs do not identify their source, so readers cannot distinguish an independent correctness check from a snapshot of the implementation's output.

Location: src/test/crypto_tests.cpp:1080 (head).

Details and suggested fix

The six-label block specifies the IKM and mainnet salt but does not explain how its expected bytes were computed. If they came from Core's own HKDF, they provide a regression snapshot rather than independent validation. Existing BIP324 reference-vector tests exercise these labels through Initialize, although the new block usefully adds localized primitive-level assertions. Add a short comment recording the actual generation method, such as an independent Python hmac/hashlib calculation if that was used, or identify the values as pre-optimization regression outputs if that is their source.


Coverage details