Why Online Key Generation is Dangerous
RSA and ECC asymmetric cryptography power SSH, SSL certificates, JWT auth, and blockchain transactions. Most online generators execute openssl on their backend servers and transmit the private key across the internet, exposing you to server-side logging and interception.
Hardware-Accelerated Web Crypto API Security
Lucentool executes entirely via W3C window.crypto.subtle, leveraging native OS cryptographic primitives and hardware security instructions. Key generation, PKCS#8 formatting, and cryptographic operations occur 100% inside your browser’s sandboxed thread.
PKCS#8 and SPKI PEM Formats
- PKCS#8 Private Key: The standard syntax for storing private key information, wrapped in
-----BEGIN PRIVATE KEY-----. - SubjectPublicKeyInfo (SPKI): The standard X.509 structure for public keys, wrapped in
-----BEGIN PUBLIC KEY-----.
What happens in the page
generateKeys() calls crypto.subtle.generateKey with RSASSA-PKCS1-v1_5, your chosen modulus length and the standard public exponent 65537, then exports both halves: the public key as SPKI and the private key as PKCS#8. ab2b64() and b642ab() move between ArrayBuffers and Base64, formatPem() wraps the Base64 in the familiar header and footer with 64-character lines, and the result can be copied or downloaded as .pem files.
Where it breaks down
Key generation happens in the browser, so 4096-bit keys can take seconds and block the interface while they work — the entropy comes from the platform's CSPRNG, which is the right source but not a hardware module. Only RSASSA-PKCS1-v1_5 is offered; ECDSA and Ed25519 are different calls. Web Crypto requires a secure context, so the page refuses to run from a file:// URL. And a key generated in a browser tab is a key you must store yourself — there is no keychain here.
Privacy: no data leaves this tab
Key material is produced by the platform’s cryptographic random source on your device and never sent anywhere. Because it lives in page memory, treat any key generated here as a test key.
Frequently asked questions
Are these keys safe to use in production?
The cryptographic source is the platform CSPRNG, which is sound. The risk is handling: a key that touched a browser tab has been in memory and possibly in a clipboard — treat it as a test key.
Why does it pause on 4096-bit?
RSA key generation is expensive and runs on the main thread. Expect several seconds; the page cannot repaint meanwhile.
Can I generate EC keys?
Not here. ECDSA and Ed25519 need different Web Crypto parameters; this page is deliberately RSA-only so the output format stays predictable.