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

chore(python): generate CoSi nonces randomly by default

Public commit record

What the developer wrote

Authored by M1nd3r

85/100 · Strong
chore(python): generate CoSi nonces randomly by default

- Deterministic nonce derivation is persisted, it is safe for publicly known keys only. It is used for reproducible CoSi signing with dev keys.

[no changelog]

(cherry picked from commit 65fa3edbf020dc1fe356a905b944da92a1b55766)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit changes the Trezor Python library's collective signing (CoSi) helper so that, by default, it generates random nonces instead of deriving them deterministically from the private key and message. The old deterministic mode is kept only for publicly known development keys, because using it with real secret keys is dangerous: a malicious coordinator could trick the same key into signing the same message twice with different combined nonces, which would leak the private key. The patch itself is a security improvement, not an exploit, but it fixes a latent vulnerability in the library's API design.

Recommended action

Treat this commit as a security-hardening fix. Ensure downstream users of trezorlib's cosi.sign_with_privkeys() are on a version containing this change, and verify that no third-party code relies on the old deterministic default for non-public keys. Review any custom callers that pass deterministic=True to confirm they only use publicly known development keys.

Security signals we found

01

Unsafe deterministic nonce default removed from CoSi signing API

02

Random nonce generation now uses os.urandom(64) reduced modulo curve order

03

Deterministic mode explicitly restricted to public-knowledge development keys

04

Code comment documents private-key leakage risk of deterministic mode under coordinator-chosen global commitments

05

All production/development callers updated to opt into deterministic mode where reproducibility is required

Risk score

Why this scored 60/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/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.