crypto.subtle.generateKey(). Private key material is never sent to any server or stored locally.
Test your generated RSA key pair immediately in the browser using the Web Crypto API to ensure correct round-trip functionality.
π Web Crypto Hardware Acceleration
Key generation runs in browser-native C++/Rust via crypto.subtle. Unlike slow pure-JavaScript libraries, Web Crypto leverages OS entropy pools and constant-time execution paths.
π¦ SPKI vs. PKCS#8 Format Standards
Public keys are formatted as SubjectPublicKeyInfo (SPKI) and private keys as PKCS#8 (RFC 5208)βthe universal modern standard for OpenSSL, OpenSSH, AWS, and Node.js.
β‘ 2048 vs 3072 vs 4096 Bits
2048-bit provides ~112-bit symmetric equivalent security. NIST recommends 3072-bit (~128-bit equivalence) for data requiring protection beyond 2030. 4096-bit offers a high security margin with increased compute time.
π‘οΈ Why Not Reuse Keys?
Using the same RSA key for both encryption (OAEP) and signing (RSASSA/PSS) is dangerous. Dual-use keys weaken cryptographic security proofs and can allow attackers to obtain signatures on chosen plaintexts.