Skip to content

Public-key cryptography

Also called: public key cryptography, asymmetric cryptography, asymmetric encryption, public-key encryption

Published:

How does public-key cryptography work?

NIST describes it as a form of cryptography that uses two related keys, a public key and a private key, chosen so that deriving the private key from the public key is computationally infeasible [1]. One key encrypts or digitally signs the data; the other decrypts it or verifies the signature [1]. The approach also lets parties establish keys securely without sharing a secret beforehand [1]. That is why it also goes by the name asymmetric cryptography [1].

What do RSA's public and private keys look like?

RFC 8017 from the IETF gives recommendations for implementing public-key cryptography based on the RSA algorithm [2]. Concretely, an RSA public key has two parts, the modulus n and the public exponent e. The private key is held either as the pair (n, d) or as a set of parameters built from the prime factors [2].

The document defines both encryption and signature schemes. New applications must support RSAES-OAEP for encryption and RSASSA-PSS for signatures; the older PKCS1-v1_5 schemes remain only for compatibility with existing applications [2].

How do the keys work in a digital signature?

For signatures, the direction flips. The owner signs with the private key they keep secret, and anyone holding the public key can verify that signature [1]. That is how you can check that a software update or a document really came from its claimed source without any secret key changing hands.

Frequently asked questions

Is asymmetric cryptography the same as public-key cryptography?

Yes. NIST uses both names for the same concept.

Can the private key be computed from the public key?

No. The scheme's security rests on that derivation being computationally infeasible.

Sources

  1. public key cryptography (PKC) - Glossary — NIST CSRC
  2. RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2 — IETF

Related terms