arXiv Science⌕ Search

arXiv · 2611.18449

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

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

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Ilia Prosianoi. 2026-11-13. Deterministic ECDSA on secp256k1: the RFC 6979 assumption, a counterexample, and the state of deployed implementations. https://arxiv.science/abs/2611.18449

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

HE-LRM: Encrypted Deep Learning Recommendation Models using Fully Homomorphic Encryption

FHE inference systems primarily target models with dense inputs, while Deep Learning Recommendation Models (DLRMs) contain sparse categorical features that require lookups into embedding tables. Encrypted lookups are challenging because indexing is not natively supported and must be expressed using SIMD arithmetic. A direct one-hot formulation does not scale. Prior work addresses parts of this problem through embedding compression or compact encrypted queries. However, it does not address complete DLRM inference, leaving open how private lookup interacts with downstream computation and memory constraints. We present HE-LRM, the first end-to-end FHE system for private DLRM inference. We use deterministic compositional embedding compression with client-side digit decomposition, avoiding expensive homomorphic selector construction while consuming only one multiplicative level. We further develop a block-diagonal packing strategy that performs lookups across multiple embedding tables using optimized BSGS linear transformations and produces encrypted embeddings directly compatible with downstream inference. We extend Orion with a high-performance GPU backend and achieve 9 ms for single-inference embedding lookup. We also show that GPU memory capacity limits batching and therefore the latency-bound throughput in such systems. On Criteo, HE-LRM achieves complete encrypted inference with server-side latencies of 154-247 ms on a single GPU. We open-source HE-LRM at https://github.com/baahl-nyu/orion

cs.CR↗

PSM: Prompt Sensitivity Minimization via LLM-Guided Black-Box Optimization

System prompts are critical for guiding the behavior of Large Language Models (LLMs), yet they often contain proprietary logic or sensitive information, making them a prime target for extraction attacks. Adversarial queries can successfully elicit these hidden instructions, posing significant security and privacy risks. Existing defense mechanisms frequently rely on heuristics, incur substantial computational overhead, or are inapplicable to models accessed via black-box APIs. This paper introduces a novel framework for hardening system prompts through shield appending, a lightweight approach that adds a protective textual layer to the original prompt. Our core contribution is the formalization of prompt hardening as a utility-constrained optimization problem. We leverage an LLM-as-optimizer to search the space of possible SHIELDs, seeking to minimize a leakage metric derived from a suite of adversarial attacks, while simultaneously preserving task utility above a specified threshold, measured by semantic fidelity to baseline outputs. This black-box, optimization-driven methodology is lightweight and practical, requiring only API access to the target and optimizer LLMs. We demonstrate empirically that our optimized SHIELDs significantly reduce prompt leakage against a comprehensive set of extraction attacks, outperforming established baseline defenses without compromising the model's intended functionality. Our work presents a paradigm for developing robust, utility-aware defenses in the escalating landscape of LLM security. The code is made public on the following link: https://github.com/psm-defense/psm

cs.CR↗

Arithmetic limiting laws over shifted primes: Hausdorff dimension zero, Fourier decay, and absolute continuity

We study the classical limiting laws of $φ(n)/n$ and $σ(n)/n$ over integers and shifted primes $p-1$. Let $μ_G$ denote the shifted-prime totient law and $μ_f$ its image under $x\mapsto-\log x$. The law $μ_G$ has Hausdorff dimension zero, while every Borel set of positive $μ_G$-measure has packing dimension one. All four ratio laws and their logarithmic images have lower and upper Shannon information dimensions satisfying $0.550<\underline{d}_1\le\overline{d}_1<0.571$. The law $μ_G$ gives full mass to absolutely normal Liouville numbers. Both $μ_G$ and $μ_f$ have quantitative Fourier decay. For $μ_f$, we obtain sharp concentration asymptotics and localize maximizing intervals. For $U_T$ uniform on $[0,T]$, $(\log T)\widehat{μ_f}(U_T)$ converges in distribution to a random Euler product with an independent uniform phase. For a uniform square matrix over $\mathbb{F}_p$, the probability of a primitive-root determinant tends, as the matrix size grows, to $c(p)=\frac{φ(p-1)}{p-1}\prod_{j\ge1}(1-p^{-j})$. Over primes, $c(p)$ has limiting law $μ_G$. In every fixed reduced progression, the empirical laws of $c(p)$ and $φ(p-1)/(p-1)$ over primes $p\le x$ converge to their common progression law with sharp Kolmogorov order $1/\log x$. We also obtain transport estimates in growing progressions. Strongly additive functions with prime values $(\log\ell)^{-A}$ have absolutely continuous integer and shifted-prime laws for every $A>0$, disproving the Erdős--Kátai singularity conjecture for $A>2$. Applications include extremal determinant bounds and certified prime selection without complete factorization of $p-1$. These results are unconditional; further quantitative refinements assume the generalized Riemann hypothesis for Dirichlet $L$-functions.

cs.CR↗