← New search

Other meanings of Private key

Cryptography

Private key

In cryptography, a private key is a secret piece of data that, in asymmetric (public-key) cryptosystems, is paired with a mathematically related public key. Possession of the private key allows its holder to decrypt messages encrypted with the corresponding public key, create digital signatures, and authenticate identity. The security of the entire system rests on the private key remaining confidential; if compromised, the associated public key operations are no longer secure. Private keys are generated randomly and are typically large numbers (e.g., 256-bit for elliptic-curve cryptography or 2048-bit for RSA). They are used in protocols such as TLS/SSL, SSH, and blockchain transactions. The concept was introduced by Whitfield Diffie and Martin Hellman in 1976, and independently by James H. Ellis, Clifford Cocks, and Malcolm Williamson at GCHQ a few years earlier.

1976
Year public-key cryptography was publicly introduced
Diffie–Hellman key exchange
256 bits
Typical private key length for elliptic-curve cryptography
e.g., secp256k1
2048 bits
Recommended minimum RSA key length
NIST guidance
2^256
Number of possible 256-bit private keys
Approximately 1.16 × 10^77
1

Fundamentals and mathematical basis

Private keys are generated as random integers within a specific range determined by the cryptosystem. In RSA, the private key is a large prime-derived exponent, while in elliptic-curve cryptography (ECC) it is a scalar used to multiply a base point on the curve. The public key is derived from the private key via a one-way function: for ECC, it is the point multiplication of the base point by the scalar; for RSA, it is the modular exponentiation of a chosen exponent. The security relies on the computational infeasibility of reversing these functions—discrete logarithm for ECC and integer factorization for RSA.1 The private key must be kept secret, and its generation must be cryptographically secure to prevent prediction.

2

Applications and protocols

Private keys are integral to digital signatures, where the signer uses their private key to produce a signature that can be verified by anyone with the corresponding public key. This is used in code signing, email encryption (e.g., PGP), and blockchain transactions, where a private key authorizes the transfer of assets. In TLS/SSL, private keys are used to authenticate servers and establish encrypted sessions. SSH uses private keys for user authentication. Hardware security modules (HSMs) and secure enclaves (e.g., TPMs) are used to store private keys to protect against extraction. The loss of a private key can result in permanent loss of access to encrypted data or funds, as seen in cryptocurrency wallets.

3

Management and security

Proper private key management involves secure generation, storage, and backup. Keys should be generated on trusted devices and stored in encrypted form, often using password-based key derivation functions. Best practices include using hardware wallets or HSMs for high-value keys, implementing key rotation, and using multi-party computation to split keys across multiple parties. The compromise of a private key can lead to impersonation, data breaches, and financial theft. Side-channel attacks, such as timing or power analysis, can extract keys from poorly implemented systems. Quantum computers pose a future threat, as Shor's algorithm could efficiently factor RSA and compute discrete logarithms, prompting the development of post-quantum cryptography.2

4

Lesser-known aspects

Beyond the common uses, private keys have niche applications. In identity-based cryptography, a private key is derived from a user's identity (e.g., email address) by a trusted authority, eliminating the need for public key distribution. In attribute-based encryption, private keys are associated with attributes, enabling fine-grained access control. The concept of a private key also appears in zero-knowledge proofs, where a prover uses a private key to prove knowledge without revealing it. Historically, the first public-key cryptosystem was invented at GCHQ by James Ellis, Clifford Cocks, and Malcolm Williamson in the early 1970s, but it was classified until 1997. The RSA algorithm was also independently developed by Rivest, Shamir, and Adleman in 1977. Private keys can be encoded in various formats, such as PEM, DER, or WIF (Wallet Import Format) for Bitcoin, and can be represented as mnemonic phrases (BIP39) for easier backup.

Glossary

Asymmetric cryptography
A cryptographic system using pairs of keys: public and private.
Digital signature
A mathematical scheme for verifying the authenticity and integrity of a message.
Elliptic-curve cryptography (ECC)
A public-key cryptosystem based on the algebraic structure of elliptic curves.
RSA
A public-key cryptosystem based on the difficulty of factoring large integers.
Hardware security module (HSM)
A physical device that safeguards and manages digital keys.

Private keys are the cornerstone of modern digital security; their protection is paramount.