Ensuring high-quality randomness in cryptographic key generation

Henry Corrigan-Gibbs, Wendy Mu, Dan Boneh, Bryan Ford

Abstract

The security of modern cryptography relies on the unpredictability of secret keys. However, many embedded and IoT devices suffer from "weak entropy," leading to predictable keys and systemic vulnerabilities. This paper presents a collaborative protocol involving an external "Entropy Authority" (EA) and non-interactive zero-knowledge (NIZK) proofs to ensure that generated keys are cryptographically strong even when a device's local random number generator is compromised. Our implementation shows that this approach is practical for low-power hardware, with RSA key generation incurring only a 2.1x performance overhead.

Introduction

Cryptographic security assumes that secret keys are generated from truly unpredictable random numbers. In practice, this assumption often fails, particularly in embedded devices like home routers that lack sufficient hardware noise or user interaction to seed a strong Random Number Generator (RNG). Historical failures, such as the 2008 Debian OpenSSL bug, have demonstrated that tens of thousands of devices can end up using keys drawn from a dangerously small pool of values. Rather than relying on ad hoc patches, this research proposes a systemic solution to guarantee high-quality randomness during key generation.

System Architecture

The proposed solution introduces a collaborative framework between a Device and an Entropy Authority (EA). The goal is to ensure that the final cryptographic key incorporates entropy from the EA without the EA ever learning the device's secret key.

High-level architecture of the collaborative key generation system involving the Device, Entropy Authority, and Certificate Authority.

As shown in the architecture above, the process involves a multi-step interaction where the device commits to its own entropy, receives a contribution from the EA, and then proves that the resulting public key was correctly derived from both sources.

Collaborative Key Generation Protocol

The core protocol follows five primary steps:

  1. Commitment: The device generates local (potentially weak) random values and sends a cryptographic commitment to the EA.
  2. Contribution: The EA responds with high-quality random values.
  3. Combination: The device incorporates the EA's values into its secret keys (e.g., RSA primes or DSA private keys).
  4. Proof of Randomness: The device generates a Non-Interactive Zero-Knowledge (NIZK) proof demonstrating that the final public key incorporates the EA's randomness without revealing the secret key itself.
  5. Certification: The EA verifies the proof and signs the public key. Clients only trust keys that carry this "randomness certificate."

RSA and DSA Implementations

The researchers developed specific constructions for RSA and DSA/EC-DSA. For RSA, the challenge lies in proving that a modulus $n$ is the product of two primes that incorporate external entropy. To make this practical for low-power hardware, the authors optimized the search for primes by allowing the device to find small "offsets" ($\delta$) to reach the nearest prime numbers.

The RSA Key Generation Protocol detailing the interaction between the Device and Entropy Authority, including the use of NIZK proofs (MulProve).

Evaluation and Results

The protocol was evaluated on three hardware platforms: a commodity home router (300 MHz MIPS), a laptop, and a workstation. The results indicate that the system is highly practical for real-world deployment:

  • RSA Performance: On the 300 MHz router, generating a 2048-bit RSA key took approximately 104 seconds, representing a 2.1x slowdown compared to standard generation. This is roughly 25x faster than previous academic attempts.
  • EC-DSA Performance: For 224-bit Elliptic Curve DSA, the protocol took only 1.5 seconds on the router (a 4.4x slowdown).
  • Network Efficiency: On more powerful hardware, the computational cost becomes negligible, with network latency to the EA becoming the primary bottleneck.

Discussion and Conclusion

This collaborative approach provides a "best of both worlds" guarantee: if the device has strong entropy, the EA learns nothing; if the device's entropy is weak, the EA's contribution ensures the key remains secure. Furthermore, the protocol allows for definitive attribution of blame if a weak key is ever generated.

While the current protocol focuses on key generation, future work could extend these protections to other cryptographic operations requiring randomness, such as nonce generation for digital signatures. Despite the requirement for a new infrastructure of trusted Entropy Authorities, this system offers a robust, proactive defense against one of the most persistent vulnerabilities in modern network security.

Summary updated

BibTeX
@inproceedings{corrigangibbs2013ensuring,
  author = {Henry Corrigan-Gibbs and Wendy Mu and Dan Boneh and Bryan Ford},
  title = {{Ensuring high-quality randomness in cryptographic key generation}},
  booktitle = {CCS},
  year = {2013},
  doi = {10.1145/2508859.2516680},
}
Figure