This research analysis shows how the classic cryptographic attack from the 2015 paper on the “kleptographic” leak in ECDSA relates to the modern context of quantum threats and post-quantum migration. The practical recommendations are defensive in nature. The 2015 paper “How Perfect Offline Wallets Can Still Leak Bitcoin Private Keys” describes an important paradox: an offline wallet may have no network channel, avoid explicit side-channel leaks, and still transmit the private key via protocol-allowed data—by choosing a nondeterministic nonce k in ECDSA. An attacker with a special implementation forces the wallet to generate two sequential signatures such that, given the two published values r and their secret trap, they can reconstruct k the second signature. Knowledge of one k immediately yields the private key d.
In Bitcoin, which uses a single curve secp256k1, the classic kleptographic attack’s “pre-knowledge of the group” limitation is weakened. A deterministic nonce according to RFC 6979 is only partially helpful: it is impossible to verify the correctness of such a nonce without a private key. We link this line of research to issues of post-quantum migration: quantum cryptanalysis threatens ECDSA at the mathematical level, but a kleptographic leak threatens it at the implementation, delivery, and device trust levels. These are different threat models, and protection is needed simultaneously.
1. Intrigue: how a “perfectly offline” device still communicates with the attacker
A common intuition: if the wallet is disconnected from the network, has no Wi-Fi, Bluetooth, and doesn’t store history, then there’s nowhere to steal the key. The PDF article contradicts this intuition. The leak occurs not through a hidden radio channel or through stray electromagnetic radiation, but through the legitimate output of the cryptographic protocol —the signature. The signature appears random and correct; it passes verification; an outside observer cannot distinguish it from a regular one. But someone who knows the secret of the implanted trap extracts from it k, and then d.
The central question being tested in our work is:
Can an ECDSA wallet, seemingly correct and working offline, leak a Bitcoin private key without explicit side channels—only through a non-deterministic choice k in two consecutive signatures?
According to the PDF, yes, provided the signature implementation is malicious or compromised, and the attacker knows the signature curve and generator in advance. This doesn’t mean every offline wallet is vulnerable. It does mean that network isolation is no substitute for implementation verifiability .
2. Testable questions and hypotheses
Below are questions selected and reformulated using the framework from the file “Questions for Research on Quantum Technologies.” Specifically, numbers 1, 2, 4, 5, 11, 18, 31, 37, 38, 43, 44, 49–56, 63, 64, 69, 70, 74, and 75 were used.
| ID | Question to be tested | Hypothesis | What could refute |
|---|---|---|---|
| Q1 | Are two consecutive ECDSA signatures sufficient for leakage k by a malicious implementation? | Yes, if the nonce is generated according to the scheme c1,c2 from the PDF and the attacker knows d the traps. | Show that the recovery procedure does not yield c2 any t, or that the distribution c2 is detectable by a check without a secret. |
| Q2 | Why does Bitcoin make attacking more practical than classic DL systems? | The fixed curve secp256k1 makes it easier for the attacker to choose the trap parameters in advance. | Show that a Bitcoin wallet is required to support multiple curves or that the curve parameters are unpredictable for an attacker. |
| Q3 | Does RFC 6979 solve the problem completely? | No. A deterministic nonce restricts freedom, but verification of correctness requires a private key or a trusted external device. | Provide a publicly verifiable proof of the nonce’s correctness without revealing the key or causing new leaks. |
| Q4 | Can a supervisor protocol prevent leakage? | Yes, if at least one side is honest; but interactivity and new assumptions appear. | Show that even with an honest supervisor, the signer can encode information in t_i or out of order. |
| Q5 | Are the quantum ECDSA threat and the kleptographic threat the same? | No. These are different threat models: mathematical cryptanalysis versus implementation and supply chain. | Show that the post-quantum algorithm automatically eliminates the problem of trust in nonce and implementation. |
| Q6 | What evidence is needed to claim that “the wallet is not leaking”? | A verifiable build, code audit, test vectors, nonce analysis, and, preferably, independent reproduction are needed. | Limit yourself to the manufacturer’s statement without source code, assembly, or independent verification. |
3. The minimal ECDSA mechanism and why the nonce is a secret
In ECDSA, a user has a private key d < n and a public key Q = dG, where G is the order generator n. For a message m and a hash function, H a signature is created as follows: k ← random < n; R = kG = (r₁,r₂); r = r₁ mod n; s = k⁻¹(H(m) + d·r) mod n; σ = (r,s)
Verification uses public keys Q and σ does not require knowledge k of or d. But if an attacker finds out k for one signature, he calculates: d = (H(m) − s k) r⁻¹ mod n
That’s why k it must be secret and unpredictable. In classical ECDSA, k the key is chosen anew for each signature. This non-determinism is the point at which the trap is introduced.
4. Kleptogram for Elliptic Curves: PDF Construction
PDF constructs a “kleptogram”—a malicious but apparently correct procedure that hides information in the random number selection. Assume the attacker has a private key d and a public key Q = dG. Fixed constants are chosen α, β, ω, and ω odd numbers are used. A cryptographically strong PRNG with a hidden seed is used.
4.1. First round
The implementation selects a random c₁ < n, calculates M₁ = c₁G, stores it c₁ in non-volatile memory and outputs M₁.
4.2. Second round
The hidden bit is selected t ∈ {0,1}. Then we calculate: Z = (c₁ − ω t)G + (−α c₁ − β)Qc₂ = PRNG(Z); M₂ = c₂G
M₁ and are issued externally M₂. In ECDSA, this corresponds to two consecutive nonces kG in two signatures.
4.3. Attacker’s Recovery
The attacker knows his d, sees M₁,M₂ and does: R = α M₁ + β G Z₁ = M₁ − d R if M₂ = PRNG(Z₁) G, then c₂ = PRNG(Z₁) otherwise Z₂ = Z₁ − ω G; if M₂ = PRNG(Z₂) G, then c₂ = PRNG(Z₂)
Next, the user’s c₂ private key is calculated using the second signature d . Important: an outside observer without the secret d cannot distinguish this signature from a regular one if the PRNG and distribution Z are chosen so as to c₂ be indistinguishable from random.
Subtlety. In PDF R , both the period and the PRNG are denoted by a letter. In our presentation, the PRNG is denoted by PRNG, to avoid confusion.
5. Bitcoin: Why One Curve Amplifies Risk
The classic kleptographic attack by Yang and Yung from 1997 required the attacker to know the group and generator in advance. In classic Diffie–Hellman, each user could generate their own group Zₚ*, which complicated the attack. In ECDSA, generating a new curve is expensive; standardized curves are typically used. Bitcoin only uses [ secp256k1unclear]. According to PDF, this significantly reduces the limitation: the attacker can prepare decoy parameters in advance for a known curve.
A Bitcoin transaction references previous outputs and is signed with private keys. If a single transaction contains two inputs associated with the same address, then two signatures can appear in the same transaction. This is sufficient for the PDF scheme. The transaction is externally valid; signature verification passes; and an observer sees no leakage.
An offline wallet won’t save you: the leak occurs at the moment of signing, through an authorized output. This is precisely the key point of the PDF: “perfectly offline” doesn’t mean “perfectly verifiable.”
6. Deterministic nonce: a partial, but not complete solution
A known issue: if two nonces are linearly related, k₂ = a·k₁ + b, the private key can be derived from the two signatures without knowing the two signatures themselves k. Therefore, deterministic schemes emerged: RFC 6979 and EdDSA, where k is derived from the message and the private key. This eliminates randomness and reduces the risk of nonce reuse.
But the PDF specifies a limitation: the correctness of a deterministic nonce cannot be verified without the private key. If the user wants the key to never leave an offline device, they cannot verify the signature on a second computer without revealing the key. Therefore, a deterministic nonce reduces the attack surface, but does not provide public verifiability.
7. Proposed measures and their limits
| Measure | What does it give? | Limitation |
|---|---|---|
RFC 6979 / deterministic k | Removes nonce randomization; the same message produces the same signature. | Verification requires a private key; it does not prove the absence of a malicious implementation. |
| Disposable addresses | Reduces the possibility of collecting two signatures with one key. | Not always applicable: public donation addresses are reused. |
Zero-knowledge proof of correctness k | Theoretically, it allows one to prove that k it was generated according to a rule. | The proof protocol itself can become a new leakage channel; it must be designed very carefully. |
| Supervisor with commitment | Neither the signing party nor the supervisor can choose unilaterally k; if at least one party is honest, leakage k is difficult. | Interactivity or pre-preparation is required; issues of leakage through selection t_i and refusals remain. |
| Verifiable assembly and audit | Reduces the risk of malicious implementation. | Difficult for large projects like OpenSSL and smartcard chips; it’s difficult to prove that executable code matches the source code. |
8. History and connection of works: sequential chain
- Young, Yung 1996 — “The Dark Side of Black-Box Cryptography”: raising the question of trust in the black box.
- Young, Yung 1997 — Kleptographic attacks on DL systems: covert channel idea via parameters and randomness.
- Goldwasser, Micali 1984 – the concept of polynomial indistinguishability is important for the argument that the signature looks ordinary.
- Nakamoto 2008 — Bitcoin: ECDSA
secp256k1, transactions and signatures. - RFC 6979 – Deterministic Nonce as a Response to Reuse and Linear Relationships
k. - Bernstein et al. 2012 — EdDSA: A deterministic signature with a different construction.
- Verbücheln 2015 — PDF: Transferring the kleptographic idea to ECDSA and Bitcoin; demonstrating that an offline wallet can leak a key via two signatures.
- NIST FIPS 203/204/205, 2024; NCCoE – Post-Quantum Migration: A New Context Where Implementation Trust Doesn’t Disappear, but Becomes Even More Important.
9. Evidence base: what exactly is confirmed
| Statement | Source | Status and confidence |
|---|---|---|
An ECDSA signature is non-deterministic if k it is chosen randomly. | PDF, §4.1; ECDSA standard description | High; this is the definition of the scheme. |
Two signatures with specially linked nonces allow k the second signature to be recovered given the trap. | PDF, §3–4 | High within the PDF design; this is a theoretical demonstration, not a statistical experiment. |
Knowing k one signature gives d. | PDF, §4.1 | High; follows directly from the signature formula. |
Bitcoin uses secp256k1, which reduces the “need to know group” restriction. | PDF, §4.2–4.3 | High; fact about Bitcoin. |
| RFC 6979 does not provide public verifiability without a private key. | PDF, §4.4 | High as a logical constraint; details depend on the verification protocol. |
A supervisor can prevent leakage through kif at least one party is honest. | PDF, §5.1 | Average; depends on the implementation of commitment and the model of honesty. |
| A quantum computer threatens ECDSA in a different way than a kleptographic attack. | PDF + NIST PQC context | High as a conceptual distinction; quantitative estimates of quantum resources are not tested here. |
10. Quantum context: two different threats, not one
The PDF is a 2015 paper on the classic kleptographic attack. It doesn’t use quantum computing. The quantum threat to ECDSA is related to Shor’s algorithm: a large, fault-tolerant quantum computer could theoretically solve the discrete logarithm problem on an elliptic curve group, which would undermine ECDSA. But this is a different model: mathematical security versus computational power.
The kleptographic threat is already active today and doesn’t require a quantum computer. It requires a malicious or compromised implementation and knowledge of the trap. Post-quantum migration replaces signature mathematics, but doesn’t eliminate the need to verify nonces, randomness, source code, builds, and distributions. Moreover, new post-quantum schemes also have their own implementations, parameters, and leakage channels.
| Criterion | Quantum cryptanalysis of ECDSA | Kleptographic nonce leak |
|---|---|---|
| Threat model | External attacker with a large quantum computer | Malicious implementation or vendor; attacker knows the secret of the trap |
| When is it possible? | With sufficient quantum resources, this is an assessment of future risk | Potentially already now, with a compromised implementation |
| What breaks? | Mathematical stability of ECDSA | Trust in generation k and in the device |
| Visibility to the observer | The attack may be made public after success. | The signature appears normal; the leak is hidden in the legitimate output. |
| Protection | Post-quantum algorithms, migration, hybrid schemes | Implementation verifiability, auditing, deterministic nonces with caution, supervisor, one-time addresses |
11. Practical conclusions for protection
- Don’t confuse offline isolation with trust. Being offline doesn’t guarantee the absence of signature leaks.
- Verify the implementation. Source code, build, versions, test vectors, independent audit. For large projects like OpenSSL, this is difficult, but that complexity is part of the risk.
- Limit address reuse. This is beneficial both for privacy and to reduce the possibility of creating two signatures with the same key.
- Be careful with deterministic nonces. They’re useful, but they don’t prove the absence of a malicious implementation.
- Design protocols with supervision and commitment carefully. A fairness model, failure analysis, and protection against election leakage are needed
t_i. - Plan post-quantum migration as an engineering problem, not just a mathematical one. New algorithms require new implementation checks.
12. Limitations of our analysis
- The PDF does not contain a full numerical experiment; it is a construction and a cryptographic argument. We do not claim to have independently reproduced the code.
- We do not analyze specific wallets or blame any manufacturers.
- The quantum estimates are not recalculated in the article; they are used only as context for distinguishing threat models.
- The supervisor protocol is described briefly in the PDF; its security depends on the details of commitment, authentication, and error handling.
- This article does not replace legal, financial or audit expertise.
13. Open questions and next experiments
- Build a training implementation of ECDSA on a small curve and reproduce the recovery
c₂using PDF formulas – without using real Bitcoin keys. - Formally check under which distributions
Zand properties of a PRNG the signature remains computationally indistinguishable to an observer without the secret. - Simulate the protocol with a supervisor and check whether the signer can encode information in
t_i, delays, or failures. - Compare RFC 6979 and EdDSA for the “public verifiability without revealing the key” criterion – both are likely limited, but in different ways.
- Assess how post-quantum signature schemes inherit or eliminate nonce and implementation trust issues.
- Develop an offline wallet audit checklist: randomness generation, nonce, build, delivery, updates, test vectors.
14. Work Integration Matrix
| Field | What to extract | What to check when merging |
|---|---|---|
| Question and hypothesis | Can a seemingly correct ECDSA implementation leak the key via a nonce? | Are we replacing the quantum threat with a classical kleptographic attack? |
| Object and scale | ECDSA, Bitcoin secp256k1, two signatures, offline wallet | Are the models comparable: a laboratory design and a real wallet? |
| Method | Cryptographic Construction and Analysis of PDFs; NIST PQC Context | Are we confusing proof, simulation and prediction? |
| Metrics | Number of signatures, knowledge k, computational indistinguishability, need for a private key for verification | Are “leakage” and “verifiability” defined in the same way? |
| Resources | Secret of the trap, knowledge of the curve, access to implementation | Is the entire supply chain taken into account? |
| Uncertainty | Dependence on PRNGs, constants, and fairness models | Is the conclusion stable when the assumptions change? |
| New contribution | The connection between kleptography and post-quantum migration | Does synthesis yield a new testable question, rather than just a patchwork? |
15. Article working card
| Topic and audience | Cryptography, Bitcoin, implementation trust; audience: researchers, wallet developers, security specialists. |
|---|---|
| The central question | Can an offline ECDSA wallet leak private key via a nondeterministic nonce? |
| Hypothesis and refutation | Yes, with malicious implementation and knowledge of the trap; refutation is the impossibility of recovery c₂ or public detection of the leak. |
| Method and baseline | Analysis of PDF construction; comparison with RFC 6979, EdDSA, and supervisor protocol. |
| Metrics | Number of signatures, need for secrecy, computational indistinguishability, public verifiability. |
| Restrictions | There is no independent experiment; quantum estimates are not recalculated; the supervisor’s protocol depends on the details. |
| Next experiment | Small-curve training implementation and formal indistinguishability verification. |
16. Conclusion
The PDF paper reveals a powerful and inconvenient result: a cryptographic signature can be valid, verifiable, and seemingly random, yet still contain hidden information. An offline wallet protects against network attacks, but not against a malicious implementation that exploits the protocol’s permitted randomness. Bitcoin, with its single-curve implementation, secp256k1 makes this threat particularly clear. Deterministic nonces and one-time addresses are useful, but they don’t provide a complete solution. Post-quantum migration adds new mathematics, but doesn’t address the old question: can the device that creates the signature be trusted?
The key takeaway for the reader: the security of a cryptosystem is not only the strength of the algorithm, but also the verifiability of the implementation, randomness, and supply chain . It is at the intersection of quantum threats, classical kleptography, and trust engineering that the most interesting and practically important research question arises.
17. Sources and reference materials
- Verbücheln S. How Perfect Offline Wallets Can Still Leak Bitcoin Private Keys . 2015. PDF:
1501.00447v1.pdf. Used §3–5. - Young A., Yung M. The Dark Side of “Black-Box” Cryptography or: Should We Trust Capstone? CRYPTO ’96.
- Young A., Yung M. The Prevalence of Kleptographic Attacks on Discrete-Log based Cryptosystems . CRYPTO ’97.
- Goldwasser S., Micali S. Probabilistic Encryption . JCSS, 1984.
- Nakamoto S. Bitcoin: A Peer-to-Peer Electronic Cash System . 2008.
- IETF. RFC 6979: Deterministic Usage of DSA and ECDSA .
- Bernstein DJ, Duif N., Lange T., Schwabe P., Yang B.-Y. High-speed high-security signatures . J. Cryptographic Engineering, 2012.
- National Quantum Initiative: Quantum Science Directions. URL: quantum.gov .
- NIST. FIPS 203, 204, 205 approved , August 13, 2024. URL: csrc.nist.gov .
- NIST NCCoE. Migration to Post-Quantum Cryptography . URL: nccoe.nist.gov .
- The file “Questions for Research on Quantum Technologies”: used as a methodological framework for posing testable questions.
