Public-private key pair
A public-private key pair consists of mathematically related public and private cryptographic keys used together for asymmetric cryptographic operations.
Software Security for Developers
A public-private key pair is a mathematically related pair of asymmetric cryptographic keys in which the private key signs data and the public key verifies it.
- How it is used
- Solves key distribution for encryption, signatures, service authentication, certificates, and passwordless hardware-key login.
- How deep it goes
- Explains key roles, compromise response, certificates, and Java or OpenSSL generation, but defers mathematical proofs and protocol internals.
- Examples
- Uses Java RSA services, OpenSSL Ed25519 files, X.509 certificate issuance, signed service requests, and hardware-key login challenges.
- What you can do after
- Build it from scratch using Java or OpenSSL, then apply it to encryption, signature verification, certificates, and service requests.
Read how Software Security for Developers explains public-private key pair →
Hacking Cryptography
A key pair consists of mathematically related public and private keys used together in asymmetric cryptography.
- How it is used
- Enables confidential encryption, public verification of signatures, and certificate-based extension of trust.
- How deep it goes
- Derives RSA public and private components, then implements ECDSA key generation and signing while deferring signature-validation implementation.
- Examples
- Uses Alice and Bob encryption, RSA prime generation, contract signing, website certificates, and Go ECDSA code with a fixed nonce.
- What you can do after
- Evaluate/understand which key encrypts, decrypts, signs, or verifies, and recognize nonce reuse as a private-key risk in ECDSA.
Read how Hacking Cryptography explains public-private key pair →
Real-World Cryptography
A key pair is a linked public key and private key used together in public-key cryptography.
- How it is used
- Supports asymmetric encryption, shared-secret key exchanges, digital signatures, and Bitcoin transaction authorization.
- How deep it goes
- Explains generation, key roles, encryption, exchange, signing, and failure modes, while deferring detailed authentication protocols.
- Examples
- Uses Alice-and-Bob exchanges, Python Ed25519 signing, C session-key setup, and Bitcoin transfers as concrete examples.
- What you can do after
- Apply key pairs to encrypt messages, derive shared secrets, verify signatures, and authorize Bitcoin transactions.
Read how Real-World Cryptography explains public-private key pair →
Secure APIs
A public-private key pair consists of mathematically related cryptographic keys, with the private key used for signing and the public key used for verification.
- How it is used
- Supports asymmetric JWT signing, letting issuers sign with a private key and APIs validate with a public key.
- How deep it goes
- Explains signing roles, OpenSSL generation, Python loading, and validation safeguards, but does not detail cryptographic mathematics.
- Examples
- Uses an OpenSSL RSA-generation command, PEM key files, Python key loading, and a PyJWT PS256 token-issuance fragment.
- What you can do after
- Build it from scratch by generating an RSA pair, loading the private key, signing JWTs, and validating them with the public key.
Fundamentals of Cybersecurity
An asymmetric key pair is a mathematically related public key and private key used for complementary cryptographic operations.
- How it is used
- Protects communication over untrusted networks without requiring parties to share a secret key first.
- How deep it goes
- Explains key roles, message flows, trade-offs, and public-key trust without detailing cryptographic mathematics.
- Examples
- Uses Alice and Bob’s confidential message and compares key requirements for a company with 100 employees.
- What you can do after
- Understand when key pairs support confidentiality, signatures, key exchange, and authentication rather than bulk encryption.
Read how Fundamentals of Cybersecurity explains public-private key pair →
Build Python Web Apps with Streamlit
A key pair is a matched private key and public key used for asymmetric authentication.
- How it is used
- Supports authenticated and encrypted SSH access to remote Elastic Beanstalk instances.
- How deep it goes
- Explains local and remote key roles, but defers public-key cryptography theory and detailed SSH connection instructions.
- Examples
- Uses an EB CLI initialization transcript showing RSA generation, passphrase entry, and public-key upload.
- What you can do after
- Operate SSH setup through the EB CLI while keeping the private key secret and uploading only its public counterpart.
Read how Build Python Web Apps with Streamlit explains public-private key pair →
Amazon Web Services in Action, Third Edition: An in-depth guide to AWS
A key pair is a matching public key and private key used for asymmetric authentication to a system.
- How it is used
- Uses asymmetric authentication when administrators log in to EC2 instances.
- How deep it goes
- Defines the credential and explains its single-user limitation, but stops short of cryptographic mechanics.
- Examples
- Demonstrates proceeding without a key pair and connecting to an EC2 instance through Session Manager.
- What you can do after
- Operate/configure EC2 access by choosing a key pair or replacing it with temporary Session Manager credentials.
Also covered in
- Acing the CCNA Exam: Volume 2 Advanced Networking and Security
- The Cloud at Your Service: The when, how, and why of enterprise cloud computing
- Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more
- API Design Patterns
- Practical Automation with PowerShell: Effective scripting from the console to the cloud
- Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu
- Rust Servers, Services, and Apps
- Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools
What to know first
- SSHSSH is a cryptographic network protocol that provides authenticated, encrypted remote access and other secure network services.
- digital signatureA digital signature is a cryptographic value associated with data that can be verified to provide evidence of the data’s origin and integrity.
- private keyA private key is secret cryptographic key material associated with a corresponding public key and used for operations such as signing or decryption.
- public keyA public key is the openly distributable key in an asymmetric cryptographic pair, used for operations such as encrypting data or verifying signatures.
Related concepts
- private keyhas part · A private key is secret cryptographic key material associated with a corresponding public key and used for operations such as signing or decryption.
- public keyhas part · A public key is the openly distributable key in an asymmetric cryptographic pair, used for operations such as encrypting data or verifying signatures.
- public key cryptographyused by · Public-key cryptography is cryptography based on mathematically related public and private keys that support complementary operations such as encryption and decryption or signing and verification.
- gpgproduced by · GPG is a command-line implementation of the OpenPGP standard for encryption, decryption, digital signatures, verification, and cryptographic key management.
- credentialkind of · A credential is information or an artifact presented to verify an entity’s identity or establish its authorization to access a system or resource.
- end-to-end encryptionused by · End-to-end encryption is a communication security technique in which only the originating and intended receiving endpoints can decrypt protected content.
Questions about public-private key pair
What is public-private key pair?
A public-private key pair consists of mathematically related public and private cryptographic keys used together for asymmetric cryptographic operations.
Which Manning books explain public-private key pair?
Software Security for Developers, Hacking Cryptography, Real-World Cryptography, Secure APIs, Fundamentals of Cybersecurity, Build Python Web Apps with Streamlit and Amazon Web Services in Action, Third Edition: An in-depth guide to AWS.
What should I know before learning public-private key pair?
Manning books that teach public-private key pair usually introduce SSH, digital signature, private key and public key first.
What is public-private key pair a kind of?
Public-private key pair is a kind of credential. A credential is information or an artifact presented to verify an entity’s identity or establish its authorization to access a system or resource.
What are the parts of public-private key pair?
Public-private key pair includes private key and public key.
What is public-private key pair also called?
Public-private key pair is also called asymmetric key pair, cryptographic key pair or public and private key pair.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.






