AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

doc: say the sha256 compression callback processes secrets

Public commit record

What the developer wrote

Authored by Ferdinando Ametrano

81/100 · Strong
doc: say the sha256 compression callback processes secrets

The function set by secp256k1_context_set_sha256_compression hashes
secret keys, for example when deriving RFC 6979 nonces. Say so, and
require it to run in constant time and not to keep or log its input.

Fixes #1958.

Assisted-by: my usual tools (LLM, Internet, computer). Mistakes are mine.
Signed-off-by: Ferdinando Ametrano <ferdinando@ametrano.net>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This is a documentation-only change. It adds a warning to the public header file telling developers that the optional SHA256 compression callback may receive secret key material, and therefore any custom implementation must run in constant time and must not retain or log its input. The change itself does not alter any code behavior, fix a bug, or add a security control. It only clarifies a security requirement that was already implicit in the API design.

Recommended action

No immediate action is required. Developers who provide a custom SHA256 compression callback should review their implementation to confirm it already runs in constant time and does not retain or log inputs. Downstream consumers do not need to upgrade for security reasons, but may wish to incorporate the documentation clarification in their own API bindings or documentation.

Security signals we found

01

Documentation clarifies that a pluggable cryptographic callback receives secret material

02

Documentation imposes constant-time and no-logging requirements on callback implementers

03

References RFC 6979 nonce derivation as an example of secret-key processing

04

No functional code change; no patch to an implementation flaw

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.