# Deterministic ECDSA on secp256k1: the RFC 6979 assumption, a counterexample, and the state of deployed implementations

DevFeed: [Deterministic ECDSA on secp256k1: the RFC 6979 assumption, a counterexample, and the state of deployed implementations](<https://devfeed.tech/articles/deterministic-ecdsa-on-secp256k1-the-rfc-6979-assumption-a-counterexample-and-the-state-of-deployed-implementations-136053.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.18449>)

Author: Ilia Prosianoi

Published: 2026-11-16T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [ECDSA](<https://devfeed.tech/topics/ecdsa.md>), [cryptographic audit](<https://devfeed.tech/topics/cryptographic-audit.md>)

Tags: [audit](<https://devfeed.tech/tags/audit.md>), [compression](<https://devfeed.tech/tags/compression.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [dlp](<https://devfeed.tech/tags/dlp.md>), [ecdsa](<https://devfeed.tech/tags/ecdsa.md>), [rfc](<https://devfeed.tech/tags/rfc.md>)

## AI overview

The paper identifies the security assumption behind RFC 6979 deterministic ECDSA: with the public key known, signatures using derived nonces must be indistinguishable from signatures using uniform nonces. It shows this assumption differs from both ordinary PRF security and auxiliary-input PRF security, and gives constructions illustrating the gaps, including cases where signatures reveal the signing key. Under an ideal compression function, the assumption follows tightly from the discrete logarithm problem with a randomized-ECDSA signing oracle; using a nonce key independent of the signing key removes the assumption. An audit of 31 secp256k1 implementations found 28 deterministic signers without added entropy and a raw-message deviation from bits2octets still present in NBitcoin, dcrd, and btcec v2. The abstract also reports nonce-block distribution comparisons across curves and test vectors for the previously untested h >= n branch.

## Source excerpt

arXiv:2611.18449v1 Announce Type: new Abstract: RFC 6979 derives the ECDSA nonce as $k = F_x(h)$, with $F_x$ HMAC_DRBG keyed by the signing key x. We isolate the assumption its security rests on, A*: at known public key $Q = xG$, the signing transcript under nonces $F_x()$ is indistinguishable from the transcript under uniform nonces. A* suffices, and it is neither PRF security of HMAC nor auxiliary-input PRF security (AI-PRF) of $F_x$. A function $F'(x, h) = P_{Ext(xG)}(h)$ is a PRF under standard assumptions yet leaks x from one signature; the same holds for unmodified RFC 6979 over a compression function that keeps the PRF and dual-PRF properties used in proofs of HMAC, given a collision-resistance premise. A* and AI-PRF are separated in both directions. A* does not imply AI-PRF if the one-bit hidden number problem is hard. Conversely, in the standard model: any AI-PRF can be modified so that it stays one while two chosen-digest signing queries reveal x; under DDH with one public random point, or decisional square Diffie-Hellman without it, there is an AI-PRF whose key is recovered from signatures on two ordinary hashed messages; and a third function, under PRF security and DLP, violates A* while the scheme stays unforgeable. With an ideal compression function, A* follows tightly from DLP in the presence of a randomized-ECDSA signing oracle, and a nonce key independent of x removes the assumption. The secret HMAC message block is $2^{-127.65}$ from uniform on secp256k1, $2^{-32}$ on P-256 and 0.336 on brainpoolP256r1. An audit of 31 secp256k1 implementations finds that 28 sign deterministically without added entropy and that the raw-message deviation from bits2octets of libsecp256k1 before 0.2.0 survives in NBitcoin, dcrd and btcec v2. Low-R grinding needs no assumption beyond A*, and every nonzero Fourier coefficient of the low-R nonce set is below $2^{-116.9}$ unconditionally. We give test vectors for the untested $h >= n$ branch