liveBook · Manning

Private key

As explained in Real-World Cryptography

A private key is the secret value in a public-key cryptographic key pair used for decryption or other private-key operations.

A private key is the secret half of a public-key cryptographic pair. Its owner must protect it, while the associated public key can be shared. Depending on the primitive, the private key helps derive a shared secret, decrypt messages, or create signatures. section 1.4.1 section 1.4.2 section 1.4.3

Private keys support several distinct asymmetric-cryptography operations:

  • Key exchange: combine your private key with a peer’s public key to derive the same shared secret the peer obtains with the reciprocal pair. section 5.1
  • Asymmetric encryption: decrypt ciphertext created by anyone using the corresponding public key; decryption can fail for incoherent ciphertext. section 6.1
  • Digital signatures: sign a message so others can verify it with the public key, message, and signature. section 1.4.3
  • Asset control: sign transactions to authorize spending associated with the public key, making private-key security central to protecting funds. section 12.2.1

Sending and signing

A sender encrypts a message with a recipient’s public key; only the recipient’s associated private key should decrypt it. Separately, a signer uses a private key to produce a signature, which anyone can verify with the public key and original message. Sharing the public key does not reveal the private key. section 1.4.2 section 1.4.3

A private key does not by itself authenticate the public key received from another party. An unauthenticated key exchange can remain vulnerable to an active man-in-the-middle attacker, who impersonates both participants. section 5.1

How Real-World Cryptography covers it

How deep it goes
Explains key-pair roles and protocol flows, with practical Python signing and C key-exchange examples, but defers implementation-level key management.
Examples
Uses Diffie-Hellman shapes, encrypted messages, Python Ed25519 signatures, C key exchange, and Bitcoin transaction signing.
What it assumes
Assumes basic symmetric encryption and introduces public-key and private-key roles before connecting them to higher-level protocols.
What you can do after
Apply it via cryptographic libraries to decrypt messages, derive session secrets, sign data, and authorize Bitcoin transactions.
How it connects
Connects private keys to public keys, key exchange, asymmetric encryption, digital signatures, authenticated encryption, and man-in-the-middle attacks.

Also explained in

Compare how 13 books explain private key →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.