By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Asymmetric encryption (also called public-key cryptography) uses two mathematically linked keys—a public key (shared openly) and a private key (kept secret)—to secure data, verify identities, and establish secure communications. Unlike symmetric encryption (which uses the same key for encryption/decryption), asymmetric encryption solves the key distribution problem and enables digital signatures, secure key exchange, and authentication.
Why it matters:- Real-world incident: In 2014, the Heartbleed bug (CVE-2014-0160) exploited a flaw in OpenSSL’s implementation of the Diffie-Hellman key exchange, allowing attackers to steal private keys, passwords, and session cookies from vulnerable servers. This led to widespread breaches, including the compromise of Canada Revenue Agency’s tax data (900+ Social Insurance Numbers stolen).- Everyday use: Asymmetric encryption secures HTTPS (TLS/SSL), VPNs, SSH, PGP/GPG email encryption, and blockchain transactions.
Standards: NIST SP 800-56 (Recommendation for Pair-Wise Key Establishment), FIPS 186-5 (Digital Signature Standard).
RSA (Rivest-Shamir-Adleman): The most widely used asymmetric algorithm, based on the mathematical difficulty of factoring large prime numbers. Key sizes: 2048-bit (minimum secure), 3072-bit (recommended), 4096-bit (future-proof).
Tools: OpenSSL (openssl genrsa -out private.key 2048), GPG (gpg --gen-key).
openssl genrsa -out private.key 2048
gpg --gen-key
ECC (Elliptic Curve Cryptography): Uses elliptic curve mathematics over finite fields for stronger security with smaller keys (e.g., 256-bit ECC ≈ 3072-bit RSA). Faster and more efficient for mobile/IoT devices.
Curves: secp256r1 (NIST P-256), Curve25519 (used in Signal, SSH), secp384r1 (NIST P-384).
Diffie-Hellman (DH) / ECDH (Elliptic Curve DH): A key exchange protocol that allows two parties to securely derive a shared secret over an insecure channel (e.g., the internet). DH uses modular arithmetic; ECDH uses elliptic curves.
Tools: OpenSSL (openssl dhparam -out dhparams.pem 2048), WireGuard (uses Curve25519 for key exchange).
openssl dhparam -out dhparams.pem 2048
Digital Signature: A cryptographic proof that a message was created by a known sender (authentication) and not altered (integrity). Uses the sender’s private key to sign and the public key to verify.
Real-world use: Code signing (e.g., Microsoft Authenticode), TLS certificates, Bitcoin transactions.
PKI (Public Key Infrastructure): A framework for issuing, managing, and revoking digital certificates (e.g., X.509). Includes CAs (Certificate Authorities), RAs (Registration Authorities), CRLs (Certificate Revocation Lists), and OCSP (Online Certificate Status Protocol).
Tools: OpenSSL, Microsoft Active Directory Certificate Services (AD CS), Let’s Encrypt.
Forward Secrecy (PFS): A property where compromising a long-term private key does not compromise past session keys. Achieved using ephemeral keys (e.g., ECDHE in TLS).
Example: TLS 1.3 enforces PFS by default (no static RSA key exchange).
Hybrid Encryption: Combines asymmetric + symmetric encryption for efficiency. Example:
Used in: PGP, TLS, Signal Protocol.
Man-in-the-Middle (MITM) Attack: An attacker intercepts and alters communications between two parties. Asymmetric encryption prevents MITM if public keys are trusted (e.g., via PKI).
Defense: Certificate pinning (HPKP), TOFU (Trust On First Use, e.g., SSH), DNSSEC.
Quantum Computing Threat: Shor’s algorithm can break RSA and ECC by efficiently factoring large numbers or solving discrete logarithms. Post-quantum cryptography (PQC) (e.g., Kyber, Dilithium) is being standardized by NIST.
NIST PQC Standards: NIST PQC Project.
Key Escrow: A system where a third party holds copies of private keys (e.g., for law enforcement access). Controversial due to privacy risks (e.g., Clipper Chip, NSA’s PRISM).
Scenario: Securing a web application with HTTPS (TLS 1.3).
Use OpenSSL to create an RSA or ECC key pair: ```bash # RSA 2048-bit openssl genpkey -algorithm RSA -out private.key -pkeyopt rsa_keygen_bits:2048
# ECC (Curve25519) openssl genpkey -algorithm EC -out private.key -pkeyopt ec_paramgen_curve:prime256v1 ``` - Best practice: Use ECC (e.g., secp256r1 or Curve25519) for better performance.
Create a Certificate Signing Request (CSR)
bash openssl req -new -key private.key -out request.csr -subj "/CN=example.com"
Exam tip: The CN (Common Name) must match the domain name (e.g., example.com).
example.com
Obtain a Digital Certificate from a CA
certificate.crt
Free option: Use Let’s Encrypt with Certbot: bash certbot certonly --webroot -w /var/www/html -d example.com
bash certbot certonly --webroot -w /var/www/html -d example.com
Configure TLS on the Web Server
nginx ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; ssl_protocols TLSv1.3 TLSv1.2; ssl_ciphers 'TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES256-GCM-SHA384';
Best practice: Enforce TLS 1.2+, disable weak ciphers (e.g., RC4, DES, 3DES), and enable HSTS (HTTP Strict Transport Security).
Enable Forward Secrecy (PFS)
Example cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384.
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
Monitor and Rotate Keys
openssl ocsp
openssl rsa -in private.key -out encrypted.key -aes256
D) 3DES ✅ Correct Answer: B Explanation: RSA with SHA-256 is commonly used for digital signatures (authentication + integrity). AES/3DES are symmetric, and DH is for key exchange.
During a TLS handshake, a server and client negotiate a cipher suite using ECDHE_ECDSA_WITH_AES_256_GCM_SHA384. What security property does this provide?
D) Non-repudiation ✅ Correct Answer: C Explanation: ECDHE provides forward secrecy (ephemeral keys), and ECDSA provides authentication (digital signature). AES-GCM provides confidentiality + integrity, but the question focuses on the key exchange/signature.
An attacker intercepts a Diffie-Hellman key exchange and forces the use of weak 512-bit parameters. Which attack is this?
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.