Short answer
A public key encrypts data or verifies a signature, and the private key decrypts or signs. NIST's glossary states that split for an asymmetric key pair. RFC 8017, published in November 2016, specifies the same split for RSA encryption and signature schemes. A typical encryption use in that RFC is delivering key material. The RFC discusses the SSL/TLS handshake in RFC 5246 only for the older PKCS #1 v1.5 scheme. This guide does not state a key size.
Last verified against the sources listed below.
Key takeaways
- NIST calls the public key the part that typically verifies signatures or encrypts data.
- The private key is the secret part that typically signs or decrypts.
- RFC 8017 defines an RSA public key as the pair (n, e) and a private key as (n, d) or a CRT form.
- SP 800-57 Part 1 Rev. 5, May 2020, also lists key agreement as a public-key use.
- RFC 8017 says a new application should keep one RSA key pair in one scheme.
- The RFC names SSL/TLS only for RSAES-PKCS1-v1_5, which is kept for old applications.
What is public key encryption used for, in NIST’s glossary and in RFC 8017, is a two-key job: the public key encrypts or verifies, and the private key decrypts or signs. The NIST glossary entry for public key collects definitions from several NIST publications, and they agree on that direction.
RFC 8017, PKCS #1 version 2.2, was published in November 2016 and obsoletes RFC 3447. It is an Informational RFC for RSA encryption schemes and signature schemes with appendix. The sections below stay inside those pages and NIST SP 800-57 Part 1 Revision 5, dated May 2020. No key length is added, because none of those pages states one required size.
What is the public key for?
The public key is the shareable half of an asymmetric pair, and it is the half that encrypts or checks a signature. NIST’s glossary, citing FIPS 201-3, says: “The public part of an asymmetric key pair that is typically used to verify signatures or encrypt data.”
The matching private-key entry says: “The secret part of an asymmetric key pair that is typically used to digitally sign or decrypt data.” A second glossary entry, asymmetric cryptography, calls the same idea public-key cryptography: two separate keys, one to encrypt or digitally sign, and one to decrypt or verify.
SP 800-57 Part 1 Revision 5 is more specific about algorithms. Its glossary says a public-key algorithm uses two related keys, and determining the private key from the public key is computationally infeasible. The public key may be known by anyone. Depending on the algorithm, it may verify a signature, encrypt keys that the private key can decrypt, or help compute a shared secret in key agreement.
That is the definition of the use, not a product checklist. A favicon on a site is unrelated to the key pair. The favicon generator only makes the icon. Serving the site over HTTPS is a separate layer, and the RFC names TLS only in the narrow case below.
How does the RSA process split the keys?
RFC 8017 section 5 pairs encryption with decryption, and signature with verification. Encryption and signature checks use the public key, while decryption and signing use the private key.
An RSA public key in that document is the pair (n, e). The modulus n is a product of at least two distinct odd primes, and the public exponent e is an integer between 3 and n minus 1 that meets the coprime test in section 3.1.
A private key may be the pair (n, d), or a second form that uses the Chinese Remainder Theorem so decryption and signing can be split across the prime factors.
The encryption schemes are RSAES-OAEP and RSAES-PKCS1-v1_5. The RFC requires RSAES-OAEP for new applications and keeps RSAES-PKCS1-v1_5 only for compatibility with existing ones.
Section 7 says a typical application is a key-establishment protocol, where the message holds key material. It points to PKCS #7 as an example of delivering a content-encryption key.
| Operation | Key that does it | Where it is defined |
|---|---|---|
| Encrypt a message | Recipient’s RSA public key | RFC 8017, section 7 |
| Decrypt that ciphertext | Recipient’s RSA private key | RFC 8017, section 7 |
| Produce a signature | Signer’s RSA private key | RFC 8017, section 5.2 |
| Check a signature | Signer’s RSA public key | RFC 8017, section 5.2 |
| Encrypt keys, or agree a shared secret | Public key, by algorithm | SP 800-57 Part 1 Rev. 5 glossary |
The signature schemes in the RFC are RSASSA-PSS and RSASSA-PKCS1-v1_5. Verification uses the corresponding public key. The primitive names are RSASP1 for signing and RSAVP1 for verification. They are the same exponentiation as the decryption and encryption primitives, with different names because the purposes differ.
Where does the RFC mention TLS?
The RFC does not present TLS as a general definition of public key encryption. It mentions SSL/TLS in the security notes for the older encryption scheme. Section 7.2 says the security of the SSL/TLS handshake protocol in RFC 5246, which uses RSAES-PKCS1-v1_5 and certain countermeasures, can be related to a variant of the RSA problem.
That sentence is about one handshake design and one RSA encryption scheme. It is not a claim about every cipher suite, and it is not a key-size table. The same section says encrypting an arbitrary message with RSAES-PKCS1-v1_5, as opposed to a randomly generated key, is not recommended. New applications are pointed to RSAES-OAEP instead.
Ordinary website security depends on more than this one RFC. The pages opened here do not list a required RSA modulus length, so none is stated. If a later TLS document uses a different key-establishment method, that document has to be read on its own.
What advantages do the sources actually state?
The advantage these pages state is that the public key may be made public, while the private key is not. SP 800-57 says the two keys have the property that determining the private key from the public key is computationally infeasible. Anyone who has the public key can encrypt keys for the owner, or check a signature the owner made, without receiving the private key.
RFC 8017 adds a narrower performance note, not a general slogan. It supports multi-prime RSA, where the modulus may have more than two prime factors, and it names a lower computational cost for decryption and signing when the Chinese Remainder Theorem is used. That note is about private-key operations, and it is not a published bit length.
The asymmetric-cryptography glossary entry says the two keys exchange data: one encrypts or signs, and the other decrypts or verifies. That is the whole advantage the glossary entry claims. It does not rank algorithms, and it does not name a year after which an old scheme must be turned off.
What mistake does RFC 8017 warn about?
Using one RSA key pair for two schemes is the mistake the RFC spends a section on. It says a generally good practice is to employ a given key pair in only one scheme, so a weakness in one scheme does not compromise the other, and so a security proof still applies.
The document is explicit about the older pair of schemes. RSAES-PKCS1-v1_5 and RSASSA-PKCS1-v1_5 have traditionally been used together, and the RFC says that combined use is not recommended for new applications. It also walks through a case where a weak implementation of RSAES-PKCS1-v1_5 could be used against messages encrypted with RSAES-OAEP if both schemes share a key pair.
A second mistake is reversing the keys. In this RFC, encryption uses the recipient’s public key and signing uses the signer’s private key. NIST’s SP 800-57 glossary lists the same directions and adds key agreement as a third example of what a public key may be used for.
Keys travel with the rest of the internet only in the sense that a handshake or a signed message is ordinary network data. The cryptographic rule stays the one in the table: public encrypts or verifies, private decrypts or signs, and one new RSA key pair stays in one scheme.
Frequently asked questions
What is public key encryption used for?
It is used so one key can be shared and another key stays secret. NIST's glossary says the public part of an asymmetric key pair is typically used to verify signatures or encrypt data, and the secret part is typically used to digitally sign or decrypt data. RFC 8017 applies that split to RSA. The public key produces ciphertext or checks a signature. The private key recovers the message or produces the signature. SP 800-57 also lists computing a shared secret during key agreement.
Which key encrypts, and which key signs?
In RFC 8017, an encryption primitive produces ciphertext under the public key, and the decryption primitive recovers the message under the private key. A signature primitive produces a signature under the private key, and the verification primitive recovers the message representative under the public key. NIST's SP 800-57 glossary uses the same directions: the public key can verify a signature or encrypt keys, and the private key can sign or decrypt those keys. Swapping the directions is not what those pages describe.
Does RFC 8017 say TLS uses public key encryption?
It names one case, not every TLS design. Section 7.2 says the security of the SSL/TLS handshake protocol in RFC 5246, which uses RSAES-PKCS1-v1_5 and certain countermeasures, can be related to a variant of the RSA problem. The same section says RSAES-PKCS1-v1_5 is included only for compatibility with existing applications. New applications are required to support RSAES-OAEP. This guide does not treat that handshake note as a description of every later TLS version.
Can one RSA key pair both encrypt and sign?
RFC 8017 says a generally good practice is to employ a given RSA key pair in only one scheme. That avoids a weakness in one scheme compromising the other, and it may be needed for a security proof. The RFC says RSAES-PKCS1-v1_5 and RSASSA-PKCS1-v1_5 have been used together, and that combined use is not recommended for new applications. If you need both jobs, the document's advice is separate key pairs, not one pair doing both.
What are the two parts of an RSA public key?
RFC 8017 section 3.1 says an RSA public key consists of n, the modulus, and e, the public exponent. In a valid key, n is a product of at least two distinct odd primes, and e is an integer between 3 and n minus 1 that meets the gcd condition in that section. The private key may be the pair (n, d) or a second form that uses the Chinese Remainder Theorem. The RFC does not print a required bit length, so this guide does not add one.
Sources
- Public key · NIST CSRC, 2026
- Private key · NIST CSRC, 2026
- Asymmetric cryptography · NIST CSRC, 2026
- PKCS #1: RSA Cryptography Specifications Version 2.2 · RFC Editor, 2016
- Recommendation for Key Management, Part 1, Revision 5 · NIST, 2020
- RFC 8017 datatracker record · IETF, 2016