From Architectural Traces to Conditional Key-Recovery Bounds for Deterministic secp256k1 ECDSA
Ilia Prosianoi
cs.CR
Nov 27, 2026 · v1
TL;DR
Security reductions for deterministic secp256k1 ECDSA key recovery are kernel-checked in a 13-module Lean 4.8.0 development using core Lean only, without Mathlib.
Abstract
RFC 6979 derives the ECDSA nonce from the signing key $d$ and the 32-byte digest $h$ via HMAC_DRBG. Earlier work (arXiv:2611.18449) isolated the assumption $A^*$ for multi-query unforgeability on $\mathbb{Z}_n^*$ and reduced $A^*$ in the ideal-compression model to discrete logarithm with a signing oracle. Here we ask when the instruction and memory-address trace $T$ of an AArch64 secp256k1 signer, observed with one low-$s$ signature $(r,s)$ on a fixed digest $h$ under a prior $J$ on $(d,h,z)$ - such as $D_j = [2^{j-1},2^j)$, where $H(d\mid Q)=0$ and restriction from $\mathbb{Z}_n^*$ loses $(n-1)/|D_j| \approx 2^{257-j}$ - helps recover $d$. For a pinned AArch64 build of Bitcoin Core v0.14.0, SLEIGH p-code and Z3 proofs partition runs of at most $H$ attempts into $M_H = 2(4^H-1)/3$ trace templates ($3^H-1$ when $h \equiv 0 \pmod n$). Under uniform nonces on secp256k1, $T$ is publicly simulable from $(r,s)$ up to $\mathbb{E}_J[q_X^H] < 1.395\cdot 10^{-77}$ at $H=2$. Relative to signature-free recovery $S_Q^{\mathrm{native}}$, we prove Lean 4 reductions for $b$-bit views of $s$, verification-point views $(Q,r,T_{\mathrm{ver}})$, and two-stage bounded-degree polynomial solvers; meta-reductions and a $(n-1)/(2n)$ liftability test rule out random symmetric coordinate tables. Passing to HMAC_DRBG reduces to nonce-prefix indistinguishability ($\mathrm{LR\text{-}PRF}_Q$), which under ideal compression reduces to $S_Q^{\mathrm{native,IC}}$ via $256 q_f$ key checks with no signing oracle and no $(n-1)/|D_j|$ loss, and after initialization splits into $2$- and $3$-query HMAC-PRF hybrids. Physical side channels, historical attribution, general full-$s$ native reductions, and fixed-SHA-256 initialization bounds remain open.
Problem
Deterministic ECDSA (RFC 6979) derives the nonce from the signing key and digest. The question is whether the instruction and memory-address trace of a compiled AArch64 secp256k1 signer, observed alongside one low-s signature on a fixed digest under a prior on the key (such as short-key intervals), helps recover the key beyond signature-free recovery.
Approach
Pinned AArch64 binaries of Bitcoin Core v0.14.0 are lifted to SLEIGH p-code and analyzed with Z3, which partitions runs of up to H attempts into M_H = 2(4^H-1)/3 trace templates. Under uniform nonces the trace is shown to be publicly simulable from the signature. Reductions to native discrete-log recovery are proved in Lean 4.8.0 for b-bit views of s, verification-point views, and two-stage polynomial solvers. A nonce-prefix indistinguishability notion (LR-PRF_Q) bridges uniform nonces to the HMAC_DRBG signer.
Results
The trace is simulable up to error below 1.395e-77 at H=2. Meta-reductions and a liftability test with advantage (n-1)/(2n) rule out idealized random symmetric coordinate tables. Under ideal compression, LR-PRF_Q reduces to native recovery via 256·q_f key checks, with no signing oracle and no short-interval loss factor. Physical side channels and fixed-SHA-256 initialization bounds remain open.