RSA public key cryptosystem based on integer factorization hardness. First practical asymmetric encryption enabling secure communication without shared secrets. Implements the RSAEP and RSADP primitives with EME-PKCS1-v1_5 encoding from RFC 8017 over fixed demonstration key pairs.
| Property | Value |
|---|---|
| Category | Asymmetric Ciphers |
| Sub-category | Public Key Cryptosystem |
| Security status | 🎓 Educational Only |
| Complexity | Intermediate |
| Inventor | Ron Rivest, Adi Shamir, Leonard Adleman |
| Year | 1977 |
| Origin | 🇺🇸 United States |
| Source | algorithms/asymmetric/rsa.js |
| Parameter | Supported values |
|---|---|
| Key sizes | 1024 bytes (8192 bits) |
Status: 🎓 Educational Only
| Issue | Description | Mitigation |
|---|---|---|
| Bleichenbacher’s Attack | — | EME-PKCS1-v1_5 leaks whether a ciphertext decodes correctly. Use RSAES-OAEP (RFC 8017 Section 7.1) where an attacker can observe decryption failures |
| Published Demonstration Keys | — | The key pairs in this file are printed in the source and confer no confidentiality. Supply real key material through the publicKey/privateKey properties for any use beyond demonstration |
2 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — RSA-1024 RSAES-PKCS1-v1_5 round-trip (RFC 8017 Section 7.2)
| Field | Value |
|---|---|
key |
0400 |
input |
48656c6c6f20525341 |
expected |
48656c6c6f20525341 |
Vector 2 — RSA-1024 RSAES-PKCS1-v1_5 round-trip with leading zero octets
| Field | Value |
|---|---|
key |
0400 |
input |
0000000102030405 |
expected |
0000000102030405 |