QA
Senior LevelWeb Security & Cyber Defense

Why is Elliptic Curve Cryptography (ECDSA / Ed25519) preferred over RSA in modern security systems?

❓ Interview Prompt: Compare Elliptic Curve Cryptography (ECC, Ed25519, ECDSA) vs RSA, mathematical hardness (ECDLP vs Integer Factorization), key size efficiency, and performance.

Modern cryptographic standards favor Elliptic Curve Cryptography (ECC) over legacy RSA:

Key Size & Performance Comparison:

•
256-bit ECC Key (Ed25519 / P-256): Provides equivalent cryptographic strength to a massive 3072-bit RSA Key!
•
Handshake Speed: Smaller ECC keys result in significantly faster TLS handshakes, lower CPU usage, and smaller X.509 certificate wire sizes.
•
Ed25519: Modern Edwards-curve algorithm immune to timing side-channels and invalid-curve attacks.

Code Implementation Example

typescript
import crypto from 'crypto';

// Generate fast, secure Ed25519 Asymmetric Key Pair
const { publicKey, privateKey } = crypto.generateKeyPairSync('ed25519');

// Sign data using Ed25519
const signature = crypto.sign(null, Buffer.from('Payload'), privateKey);
console.log(signature.toString('hex'));
💡Generating and signing data with Ed25519 elliptic curve keys in Node.js.
🎯 Interview Key Takeaway

Adopt Ed25519 or ECDSA P-256 elliptic curve keys over legacy RSA for faster handshakes and superior security per key bit.

More Web Security & Cyber Defense Interview Questions

Beginner LevelSecurity & Web Security

Explain OWASP Top 10 vulnerabilities (XSS, CSRF, SQL Injection) and their defenses.

Beginner LevelSecurity & Web Security

What are the 3 types of XSS (Stored, Reflected, DOM-based) and how do they differ?

Beginner LevelSecurity & Web Security

How do Parameterized Queries (Prepared Statements) prevent SQL Injection attacks?