I recently released an update to x509Lab (a completely browser-based visual certificate chain builder) to support Ed25519 key generation and signing.
If you deal with modern TLS, SSH, or code signing, you know Ed25519 is becoming the standard. It uses much smaller keys than RSA and offers faster signing than ECDSA.
Here is how I implemented it entirely on the client side using the Web Crypto API, without any backend server.
π Try it live: https://x509lab.vercel.app
Visualizing and Generating Ed25519 Chains
The goal of x509Lab is to let you drag and drop Root CAs, Intermediate CAs, and Leaf nodes, connect them, and generate a valid PKI tree.
Now, when you click Generate Certs, you can select Ed25519 from the Key Algorithm dropdown. The app will instantly generate the keypairs, sign the certificates down the chain, and verify the trust loopβall in your browser.
The Technical Struggle: Web Crypto API & ASN.1 DER
Generating the keys using crypto.subtle.generateKey({ name: 'Ed25519' }) and signing them was the easy part. The real challenge was encoding the resulting certificates into a valid .pem format that OpenSSL would accept.
The Web Crypto API doesn't spit out X.509 certificates out of the box. You have to build the ASN.1 structure manually.
Here are a few technical hurdles I had to overcome:
-
Custom OID Implementation: I had to manually implement the DER encoding for the Ed25519 Object Identifier (
1.3.101.112) based on RFC 8410. -
The NULL Parameter Trap: When dealing with RSA, the signature algorithm sequence typically includes a
NULLparameter. However, for Ed25519, including thisNULLparameter violates the standard and breaks the certificate. - Raw Signatures: Unlike ECDSA, which requires converting the signature into a specific DER sequence, Ed25519 uses the raw 64-byte signature directly.
Auto-generating OpenSSL Commands
A visual tool is great, but eventually, you need to type commands into a terminal.
x509Lab analyzes your visual tree and generates the exact openssl CLI commands needed to recreate that setup. With this update, it now natively outputs the correct syntax for Ed25519:
openssl genpkey -algorithm Ed25519 -out root.key
If you're studying cryptography, setting up internal CAs, or just sick of remembering OpenSSL flags, give it a try. Let me know what you think in the comments!






Top comments (0)