Hyrje
RSA and Elliptic Curve Cryptography are the two main families of public-key cryptography in wide use today.
Teoria
RSA is based on the difficulty of factoring large composite numbers and has been in production since 1977. Its public key is a pair (n, e) where n is the product of two large primes; the private key is derived from those primes. RSA is simple to understand and well-supported, but the keys are large — 2048 bits minimum, 3072 or 4096 for new deployments — and operations are slow compared to ECC. RSA is still fine for low-volume use like signing TLS certificates, but it has largely lost the key-exchange race.
ECC is based on the difficulty of the discrete logarithm problem on elliptic curves. The same security level as a 3072-bit RSA key is achievable with a 256-bit ECC key, which means smaller certificates, faster handshakes, and less CPU load. Curve25519 (X25519 for ECDH, Ed25519 for signatures) is the modern default and is used by TLS 1.3, SSH, Signal and WireGuard. Curves NIST P-256 and P-384 are common in corporate PKI and government environments.
A practical note: both RSA and ECC are vulnerable to large-scale quantum computers, which would break them via Shor's algorithm. NIST is standardizing post-quantum alternatives (Kyber for KEMs, Dilithium for signatures), and hybrid deployments combining classical and post-quantum algorithms are starting to appear in TLS and SSH. Expect this to become mainstream in the next 3–5 years.
Mjetet
Mjete:
openssl genrsa,openssl ecparam.- Python
cryptography. - libsodium për Curve25519/Ed25519.
Praktika
Gjenerim i çelësave:
# RSA-3072 (minimumi modern)
openssl genrsa -out rsa.key 3072
openssl rsa -in rsa.key -pubout -out rsa.pub
# ECC P-256
openssl ecparam -name prime256v1 -genkey -noout -out ec.key
openssl ec -in ec.key -pubout -out ec.pub
# Ed25519 (i rekomanduar për signatures moderne)
openssl genpkey -algorithm ed25519 -out ed.keyKrahasim performance (ECDSA zakonisht 5-10× më i shpejtë se RSA për të njëjtën siguri).
Ushtrime
- Gjenero një çift RSA-2048 dhe një çift ECC P-256. Krahaso madhësinë e çelësave dhe kohën e signature.
- Shpjego në 2 paragrafë pse Ed25519 po zëvendëson RSA për SSH dhe TLS.
Burime
- NIST SP 800-186 — Discrete Logarithm-Based Cryptography (ECC).
- Dan Bernstein — djb.net (Curve25519, Ed25519).
Vlerësimet dhe komentet
Kyçu për të lënë një vlerësim.
Ende pa komente. Bëhu i pari!
Diskutime
Ende pa diskutime. Hap një temë të re