Replies: 2 comments
-
Viem doesn’t use hedged signatures by default as this would be a breaking change in a non-major version. The consumer has to opt-in to it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Fault attacks / attacks against deterministic signatures have been discussed in SH16, BP16, RP17, ABFJLM17, SBBDS17, PSSLR17, SB18, WPB19, AOTZ19, FG19. Notwitstanding these papers, hedging was described in following specs:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Check existing issues
Viem Version
2.23.7
Current Behavior
Component: Signature Generation
Summary
The upcoming release of Viem will introduce non-deterministic "hedged signatures," deviating from the well-established RFC 6979 standard for deterministic ECDSA signatures. This change, driven by Paul Miller without apparent public discussion, research, testing, or cryptographic audits, poses significant privacy risks and breaks compatibility with protocols and applications relying on RFC 6979. I urge the Viem team to revert this change or make it opt-in until proper evaluation and community consensus are achieved.
Steps to Reproduce
Expected behavior
Signatures generated with the same private key and digest should be identical, adhering to RFC 6979 determinism.
Actual Behavior
Signatures vary across runs due to the introduction of randomness in the nonce (hedged signatures), breaking RFC 6979 conformance.
Impact
This change has far-reaching consequences:
Privacy Nightmare from Non-Deterministic Signatures
Non-deterministic signatures allow signers ~2^256 possible (r, s) pairs for a given input, enabling covert marking. For example:
A hardware wallet manufacturer could embed a secret device ID into signatures. By regenerating (r, s) until hash("salt" || r)[0..16] == device_id, they could link on-chain activity to a user's identity (e.g., tied to a credit card purchase). This is undetectable to users without access to the secret salt.
RFC 6979 prevents this by ensuring a single, deterministic (r, s) output, making signatures indistinguishable across conforming implementations.
Breaks Existing Protocols and Applications
Several protocols rely on RFC 6979 determinism for security and functionality:
Galxe Passport: Uses deterministic signatures for wallet-derived secrets.
zkPass: Relies on consistent signature output for key derivation.
KimlikDAO KPass: As a KimlikDAO contributor, I can confirm KPass derives symmetric encryption keys from deterministic signatures. Non-deterministic outputs in Viem will break this key derivation, rendering KPass unusable with affected wallets.
Unproven Security Benefits
The rationale for hedged signatures—adding randomness to mitigate implementation flaws—lacks substantiation:
RFC 6979 already provides fault tolerance by deterministically deriving the nonce from the private key and message, avoiding weak RNG issues.
Determinism enables rigorous testing: identical outputs across implementations (e.g., Viem vs. OpenSSL) confirm correctness, reducing the risk of subtle bugs.
No peer-reviewed research or public cryptographic analysis supports hedged signatures improving security over RFC 6979. Claims of resilience against side-channel attacks or fault injection remain speculative without evidence.
Lack of Transparency and Consensus
Paul Miller has aggressively pushed hedged signatures across multiple projects, including:
go-ethereum (Issue #30773)
Ethers.js (Issue #4885)
Ethereumjs (Issue #3801)
This feature was implemented months ago with no visible public discussion, testing, or audits. Miller, not a cryptographer, appears to be forcing adoption without stakeholder input—a "hammer vs. nail" approach unfit for such a critical cryptographic change.
Request: Revert Viem to RFC 6979-compliant deterministic signatures.
Long-Term Consideration: If hedged signatures are deemed valuable, make them an opt-in feature (e.g., via a config flag like useHedgedSignatures: true) after:
RFC 6979 has been battle-tested since 2013, offering a balance of security, testability, and interoperability. Deviating from it without justification risks fracturing the Ethereum ecosystem and exposing users to privacy violations.
Call to Action
I implore the Viem maintainers to prioritize user safety and ecosystem compatibility over unproven experimentation. Please address this in the next release and provide clarity on how this change was greenlit without broader input.
Expected Behavior
No response
Steps To Reproduce
No response
Link to Minimal Reproducible Example
No response
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions