RSA Keys in TLS/SSL Certificates

Understand how RSA keys are used in TLS/SSL certificates for HTTPS. Learn about certificate signing requests, certificate chains, and the role of RSA in the TLS handshake.

Use Cases

Detailed Explanation

RSA Keys in TLS/SSL Certificates

RSA is the most widely used algorithm for TLS/SSL certificates that secure HTTPS connections. An RSA key pair forms the cryptographic foundation of a server's digital certificate.

Certificate Creation Workflow

1. Generate RSA key pair
2. Create Certificate Signing Request (CSR)
3. Submit CSR to Certificate Authority (CA)
4. CA verifies identity and signs certificate
5. Install certificate + private key on server

Generating a CSR with OpenSSL

# Step 1: Generate private key
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:3072 -out server.key

# Step 2: Create CSR
openssl req -new -key server.key -out server.csr \
  -subj "/C=US/ST=California/L=San Francisco/O=Example Inc/CN=example.com"

# Step 3: Verify CSR contents
openssl req -in server.csr -noout -text

RSA's Role in the TLS Handshake

In a TLS 1.2 handshake with RSA key exchange:

  1. ClientHello — client sends supported cipher suites
  2. ServerHello — server responds with chosen suite and certificate
  3. Certificate — client receives the server's RSA public key (in the certificate)
  4. Key Exchange — client encrypts a pre-master secret with the server's RSA public key
  5. Finished — both sides derive symmetric session keys from the pre-master secret

In TLS 1.3, RSA is used only for authentication (signing), not key exchange. Key exchange uses ephemeral Diffie-Hellman (ECDHE), providing perfect forward secrecy.

Certificate Chain

Root CA Certificate (self-signed, RSA-4096)
  └── Intermediate CA Certificate (RSA-4096)
        └── Server Certificate (RSA-2048 or RSA-3072)

Key Size Recommendations for TLS

  • Server certificates: 2048-bit minimum, 3072-bit recommended
  • Intermediate CA: 4096-bit (longer validity period)
  • Root CA: 4096-bit (very long validity, rarely rotated)

Modern Considerations

While RSA certificates remain dominant, ECDSA certificates (using P-256 or P-384 curves) are gaining adoption due to smaller key sizes and faster operations. Many modern deployments use dual certificates (RSA + ECDSA) for maximum compatibility.

Use Case

Web developers and DevOps engineers work with RSA TLS certificates when deploying HTTPS websites, configuring load balancers, setting up reverse proxies (Nginx, Apache, Caddy), and managing certificate renewals with Let's Encrypt or commercial CAs. Understanding the RSA role in TLS is essential for troubleshooting SSL errors and security audits.

Try It — RSA Key Pair Generator

Open full tool