Skip to main content
QUICK REVIEW

[Paper Review] How Perfect Offline Wallets Can Still Leak Bitcoin Private Keys

Stephan Verbücheln|arXiv (Cornell University)|Jan 2, 2015
Cryptography and Data SecurityComputer Science3 references5 citations
TL;DR

This paper demonstrates how ECDSA signatures in Bitcoin can leak private keys through non-deterministic randomness selection, even in air-gapped, offline wallets. By embedding hidden trapdoors in the random number generation process, a malicious implementation can exfiltrate private keys via signatures that appear cryptographically indistinguishable from legitimate ones.

ABSTRACT

ECDSA has become a popular choice as lightweight alternative to RSA and classic DL based signature algorithms in recent years. As standardized, the signature produced by ECDSA for a pair of a message and a key is not deterministic. This work shows how this non-deterministic choice can be exploited by an attacker to leak private information through the signature without any side channels, an attack first discovered by Young and Yung for classic DL-based cryptosystems in 1997, and how this attack affects the application of ECDSA in the Bitcoin protocol.

Motivation & Objective

  • To expose a critical vulnerability in ECDSA-based systems like Bitcoin, where non-deterministic signing can be exploited to leak private keys.
  • To demonstrate that even air-gapped, offline wallets are not secure if the signing implementation is maliciously backdoored.
  • To show that such attacks are undetectable by users and third parties, as the malicious signatures are polynomially indistinguishable from honest ones.
  • To propose a practical kleptographic setup for elliptic curve cryptography that enables private key extraction through signature analysis.
  • To emphasize the need for verifiable implementations in high-security applications like Bitcoin wallets and hardware security modules.

Proposed method

  • Uses a kleptographic setup where a malicious ECDSA implementation embeds secret information in the choice of the nonce (random number) during signing.
  • Employs a hidden pseudo-random number generator with a secret seed to generate nonces that are mathematically linked to the private key through elliptic curve operations.
  • Constructs a signature generation process where the first output (M₁) is a standard point on the curve, and the second (M₂) is derived from a combination of M₁ and the public key using fixed constants.
  • The attacker can later recover the private key from two consecutive signatures by solving a system of equations involving the hidden constants and the signature components.
  • Proposes a two-party protocol involving a signer and a supervisor to prevent leakage, where the supervisor verifies the correctness of the nonce using a pre-shared list of commitments.
  • Introduces a prearranged protocol with a list of commitments to T_i values, enabling verification of the nonce without exposing the private key, while maintaining security against leakage.

Experimental results

Research questions

  • RQ1Can ECDSA signatures in Bitcoin leak private keys even when the wallet is completely offline and isolated from networks?
  • RQ2To what extent can a malicious implementation of ECDSA hide a trapdoor in the random number generation process without being detected?
  • RQ3Is it possible to construct a kleptographic setup for ECDSA that allows an attacker to extract private keys from signatures while maintaining indistinguishability from honest signatures?
  • RQ4How can the security of offline signing be preserved when the signing device itself may be compromised with a backdoored implementation?
  • RQ5What practical protocols can be designed to detect or prevent such key-leaking attacks in air-gapped systems?

Key findings

  • A malicious ECDSA implementation can embed private key information into the choice of the nonce during signature generation, enabling long-term key recovery without side channels.
  • The resulting signatures are computationally indistinguishable from those produced by a correct implementation, making detection impossible for users or third parties.
  • Even in air-gapped environments, such as offline Bitcoin wallets or hardware security modules, private keys can be exfiltrated through the signature output alone.
  • The attack is feasible with standard ECDSA parameters and requires only a small modification to the signing process, making it stealthy and hard to detect.
  • The proposed two-party protocol with a supervisor and pre-shared commitments can prevent such leakage by verifying the correctness of the nonce without exposing secret data.
  • The findings imply that users cannot trust any ECDSA implementation they cannot fully verify, especially closed-source or embedded systems like smartcards or Bitcoin hardware wallets.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.