Home › Categories › Security › Public-Key Cryptography

Public-Key Cryptography

From WikiTech, the encyclopedia of technology

Concept · Security · 4 min read · 805 words · Updated

Public-Key Cryptography
Concept
Also calledAsymmetric cryptography
Key materialPublic key and private key
Main usesKey agreement, encryption, digital signatures
Common algorithmsRSA, elliptic-curve schemes, EdDSA
Related protocolsTLS, SSH, secure messaging

Public-key cryptography, also called asymmetric cryptography, uses a mathematically related pair of keys. A public key can be shared openly, while the corresponding private key must remain under the owner's control. Depending on the algorithm, the pair can support encryption, key agreement or digital signatures. These methods are fundamental to secure communication on the internet, software signing and identity verification.

The basic model

In a public-key system, the public and private keys are related by a mathematical construction that is practical to use in one direction but difficult to reverse without the private information. For a digital signature, a signer uses a private key to produce a signature over a message or its cryptographic digest. Anyone with the corresponding public key can verify that signature. Verification provides evidence that the signature was produced using the associated private key and that the signed data has not changed, assuming the algorithm and implementation are sound.

Encryption and digital signatures solve different problems. Public-key encryption aims to make data readable only by a holder of the private key. A digital signature aims to authenticate the origin of data and detect modification. Key-agreement protocols let two parties derive shared secret material over a public network. Systems often combine these capabilities instead of using one public-key algorithm for every task.

Hybrid encryption and key agreement

Public-key operations are generally more computationally expensive than symmetric encryption. Secure protocols therefore use public-key cryptography to establish or protect a short-lived symmetric key, then use an efficient symmetric algorithm to encrypt the bulk data. This is called hybrid encryption. In TLS 1.3, ephemeral key agreement contributes to a shared secret from which traffic keys are derived; symmetric authenticated encryption then protects application records.

Ephemeral key agreement can provide forward secrecy. If a server's long-term authentication key is compromised in the future, previously recorded sessions can remain protected because their traffic keys depended on temporary secrets that were discarded. Forward secrecy depends on correct protocol operation, random-number generation and private-key handling; it is not a property that can be assumed merely because a connection uses encryption.

Certificates and trust

A public key alone does not tell a client who owns it. A digital certificate binds a public key to an identity through a statement signed by a certificate authority. Clients validate the certificate chain, the requested name, validity period and relevant usage constraints. This creates a system of trust anchors and delegated authorities. A certificate can be technically valid while the organisation or website itself is untrustworthy, so certificate validation should be understood as authentication of a key identity within a particular trust system.

Private-key protection is critical. Keys may be stored in operating-system keystores, hardware security modules or other protected environments. Access should be limited, rotation and revocation procedures should be planned, and backups should not expose the private material. A compromised private key can undermine the identities or signatures that depend on it.

Algorithms and security assumptions

RSA, elliptic-curve cryptography and modern signature schemes use different mathematical problems and parameter choices. Security depends on using current algorithms, suitable key sizes, sound implementations and correct protocol composition. Cryptography is sensitive to implementation errors such as weak random values, side channels and incorrect validation. Developers should rely on maintained cryptographic libraries and reviewed protocols rather than designing new primitives.

Quantum computing is a future-facing concern for some widely used public-key systems because sufficiently capable fault-tolerant quantum computers could threaten the assumptions behind RSA and elliptic-curve cryptography. Post-quantum algorithms are being standardised to address this risk. Migration involves more than swapping one algorithm: systems must inventory keys, protocols, certificates and long-lived encrypted data.

Relationship to secure web communication

Public-key cryptography is one component of a larger security design. TLS 1.3 uses key agreement and certificate authentication to establish a protected channel, while protocols such as SSH use keys for server and user authentication. Secure systems also need access control, patching, logging and safe application behaviour. Encryption does not repair vulnerable code or make untrusted data safe.

Further engineering considerations

Key lifecycle and practical threat models

A cryptographic system is only as trustworthy as the way its keys are generated, stored, used, rotated and retired. Private keys should be protected from unnecessary access, and sensitive operations may be performed inside dedicated hardware or managed key services. Certificates need renewal before expiry, and organisations need procedures for revoking credentials that may have been exposed. Losing a private key can make protected data inaccessible, while disclosing it can undermine the security of every system that trusts the corresponding public key.

Threat modelling clarifies what the mechanism is expected to protect. Encryption can provide confidentiality, signatures can support authenticity and integrity, and key agreement can establish shared secrets; none of these automatically proves that an endpoint is honest or that a device is free from malware. Implementations must use well-reviewed libraries and current protocol configurations rather than inventing custom cryptography. In web communication, public-key techniques work alongside symmetric encryption, certificate validation and protocol negotiation, as described in TLS 1.3.

See also

  • TLS 1.3 – The 2018 version of the Transport Layer Security protocol for encrypted network communication.
  • Big-O Notation – A notation describing how the resource use of an algorithm grows as the input size grows.
  • CAP Theorem – A result stating that a distributed data store cannot simultaneously guarantee consistency, availability and partition tolerance.
  • Domain Name System (DNS) – The distributed naming system that translates human-readable domain names into records used to locate internet services.
  • Event Loop – A programming construct that waits for and dispatches events or messages in a single thread of control.
  • Garbage Collection – Automatic memory management in which a runtime reclaims memory that a program can no longer reach.
  • Idempotency – The property of an operation that produces the same result whether it is applied once or many times.
  • Microservices – An architectural style that structures an application as independently deployable services communicating through explicit interfaces.

References

  1. ↑ NIST FIPS 186-5: Digital Signature Standard (csrc.nist.gov)
  2. ↑ NIST SP 800-56A Rev. 3 (csrc.nist.gov)
  3. ↑ RFC 8446: TLS 1.3 (rfc-editor.org)