Return
Root Certificate Lab
Everything runs in your browser with the Web Crypto API. Keys are never sent anywhere. Certificates made here are for learning and local testing: do not install them in a real trust store. Each level can be downloaded as PEM, as a password-protected .p12, or all together as one text file.

Paste one or more PEM certificates to see every field explained, plus the raw ASN.1 structure.

Paste a chain with the leaf first, then intermediates, then the root. This repeats the checks a browser does.

Generate a self-signed root with each key type and compare speed and size in your own browser. RSA 4096 can take several seconds.

What a root certificate is

A root certificate is a self-signed certificate: its issuer and subject are the same, and it is signed with its own private key. It sits at the top of a chain and acts as the trust anchor. Nothing inside it proves it is legitimate. It is trusted only because a browser, operating system or administrator put it in a trust store. For example, Mozilla treats a CA certificate as trusted only while it is unexpired, not listed in OneCRL, and either included in its root store or chained to a certificate that is. [Mozilla Wiki, CA Audit Statements]

Because a root is only a certificate that people choose to trust, anyone can make one in seconds, which is what the Generate tab does. A root made here is trusted by nobody until someone installs it. Local development tools such as mkcert do the same thing and then install the root in your system trust store, and their documentation warns that the root key gives complete power to intercept secure requests on that machine. [GitHub, FiloSottile/mkcert]

How public roots earn trust

Public roots are admitted through root store programs with formal requirements. Mozilla requires audits of its included roots and of intermediates that can issue server or email certificates. The audits must be repeated at least annually with no gaps between periods, done by independent, qualified auditors against standards such as WebTrust or ETSI. If a CA stops providing audit statements, the certificate can be removed from the store and added to OneCRL. [Mozilla, Root Store Policy] [Mozilla Wiki, CA Audit Statements]

Offline roots and intermediates

A CA protects its root key by using it rarely. Let's Encrypt keeps its root key material offline and issues subscriber certificates from intermediates, and it has said the root and intermediate private keys are stored on hardware security modules. This is why the Generate tab builds a three-level chain: the root signs the intermediate once, and the intermediate signs leaf certificates. [Let's Encrypt, Chains of Trust] [Let's Encrypt, Let's Encrypt Root and Intermediate Certificates]

One certificate can have more than one valid chain. For ECDSA subscriber certificates, Let's Encrypt offers a chain ending at ISRG Root X1, which is larger but works with the oldest clients, and a chain ending at ISRG Root X2, which is smaller but needs clients with newer trust stores. [Let's Encrypt, Chains of Trust]

Path length limits control how deep a chain may go. The path length constraint gives the maximum number of non-self-issued intermediate certificates that may follow a CA certificate, and it only applies when the CA flag is set. In this tool the root allows one intermediate and the intermediate allows none, so it can only sign leaf certificates. A certificate whose key usage includes certificate signing must also have the CA flag set. [IETF, RFC 5280: Internet X.509 PKI Certificate and CRL Profile]

What the Validate tab checks

The Validate tab checks that each certificate is inside its validity period, that each issuer name matches the next certificate, that each signature verifies with the issuer's public key, that every issuer has the CA flag, and optionally that the leaf covers a hostname. It is a teaching model. It does not check path length, name constraints, key usage on CA certificates or revocation, so a chain that passes here may still be rejected by a real browser.

For hostnames, the Common Name must not be used to identify a service. Clients match the name against the DNS entries in the subject alternative names. A wildcard is valid only as the whole left-most label and covers exactly one label, so *.example.test matches www.example.test but not a.b.example.test. [IETF, RFC 9525: Service Identity in TLS]

Lifetimes and revocation

Public TLS certificates are getting shorter lives. CA/Browser Forum ballot SC-081v3 sets a schedule that reduces the maximum validity from 398 days toward 47 days, starting in March 2026 and finishing in March 2029. The generated leaf lasts 200 days, a short life in keeping with that trend, while the CA certificates last years. [CA/Browser Forum, Ballot SC081v3]

Revocation tells clients to stop trusting a certificate before it expires. Let's Encrypt turned off its OCSP service on August 6, 2025 and now publishes revocation information only through certificate revocation lists. It named privacy as the main reason: with OCSP the CA learns which sites a visitor checks. This tool does not model revocation. [Let's Encrypt, OCSP Service Has Reached End of Life]

DER and certificate fields

Certificates are ASN.1 structures encoded in DER, where every element is a tag, a length and a value. A length under 128 fits in one byte, and a longer length starts with a byte saying how many length bytes follow. Integers are signed, so a positive number whose first byte is 128 or more gets a leading zero byte. The Raw ASN.1 view in the Decode tab shows this nesting.

Two details from the certificate profile are easy to miss. Validity dates are written as UTCTime through 2049 and as GeneralizedTime from 2050 onward. Serial numbers must be positive and no longer than 20 bytes, and this tool uses 96 random bits for each one. [IETF, RFC 5280: Internet X.509 PKI Certificate and CRL Profile]

PEM and PKCS#8

PEM is the base64 text form of those bytes between BEGIN and END lines, wrapped at 64 characters. The label CERTIFICATE marks a certificate, PRIVATE KEY marks an unencrypted PKCS#8 key, and ENCRYPTED PRIVATE KEY marks an encrypted one. File extensions such as .pem, .crt and .key are only conventions. [IETF, RFC 7468: Textual Encodings of PKIX, PKCS, and CMS Structures]

PKCS#8 was first defined in RFC 5208. RFC 5958 replaced it and renamed the structure OneAsymmetricKey, while keeping the version 1 format identical. The Web Crypto API exports private keys as PKCS#8 and public keys as SubjectPublicKeyInfo, only when the key was created as extractable, and the export is not encrypted. That is why the .pem key downloads here are plain text secrets. [IETF, RFC 5958: Asymmetric Key Packages] [MDN, SubtleCrypto.exportKey()]

ECDSA signatures: raw versus DER

The browser returns an ECDSA signature as two fixed-width numbers joined together, r followed by s, each padded to the size of the curve: 32 plus 32 bytes for P-256 and 48 plus 48 for P-384. An X.509 certificate stores the signature in a different structure, a DER sequence of two integers. The generator converts the raw form into DER, and the validator converts it back before verifying. [MDN, SubtleCrypto.sign()]

PKCS#12 (.p12) files

PKCS#12 is a transfer format for private keys and certificates. The top-level structure has a version of 3, a container of bags, and an optional MAC that protects integrity. The MAC key is derived from the password and is not stored in the file. Certificates go in certificate bags and private keys in shrouded key bags, and a friendly name can label each one. [IETF, RFC 7292: PKCS #12 Personal Information Exchange Syntax v1.1]

The .p12 files made here use PBKDF2 with HMAC-SHA256 (100,000 iterations) and AES-256-CBC to encrypt both the certificates and the key, plus an HMAC-SHA256 MAC. OpenSSL 3 opens them with the right password and rejects a wrong one. Older tools may expect the legacy 3DES format and fail to import these. The leaf file includes the intermediate and root so a server or client can load the whole chain.

Key sizes

NIST defines security strengths of 80, 112, 128, 192 and 256 bits and says 80 bits is no longer sufficiently secure. For RSA, the LibreSSL documentation maps a 2048-bit key to 112 bits, 3072 to 128, 7680 to 192 and 15360 to 256, citing the same NIST publication. The Compare tab lets you measure how an elliptic curve key and an RSA key differ in speed and size on your own device. [NIST, SP 800-57 Part 1 Rev. 5: Recommendation for Key Management] [LibreSSL manual, RSA_security_bits(3)]

This tool uses P-256 and P-384 for ECDSA, and RSA with the public exponent 65537, written as the bytes 1, 0, 1 in the browser API. RSA signatures use PKCS#1 v1.5 with SHA-256. [MDN, SubtleCrypto.generateKey()]

Why a trusted root is dangerous

A trusted root can vouch for any website, so whoever holds its private key can impersonate any domain to every machine that trusts it. The mkcert documentation warns that its root key file gives complete power to intercept secure requests from your machine and must not be shared. [GitHub, FiloSottile/mkcert]

For learning, keep the roots from this page out of your system trust store. Use the Validate tab and its simulated trust checkbox instead. The text and .p12 exports are for study and local experiments only.

A real case: eDellRoot

In 2015, Dell Foundation Services installed a trusted root certificate called eDellRoot on some Dell systems, and the certificate came with its private key. CERT/CC explained that this lets an attacker create certificates the affected machines would trust, enabling impersonation, man-in-the-middle and decryption attacks. The certificate was first installed in August 2015. [CERT/CC, VU#870761: Dell Foundation Services installs root certificate and private key]

CERT/CC says removal needs two steps: deleting the certificate and removing the Dell component that reinstalls it. CISA's alert adds that the certificate arrived with an August 2015 update to Dell Foundation Services and that Dell released an update to remove it. The case shows why a root private key must never be shipped with the certificate. [CERT/CC, VU#870761] [CISA, Dell Computers Contain CA Root Certificate Vulnerability]

Why this page works client-side

The page declares a Content Security Policy with connect-src set to none. That directive limits the URLs that script interfaces such as fetch, XMLHttpRequest, WebSocket, EventSource and sendBeacon can reach, so the page cannot send data out. It also loads no third-party scripts. Even so, you are trusting the code the site serves, so for sensitive work save the page and run it offline. [MDN, CSP connect-src]

For trusted HTTPS on your own machine, a purpose-built tool such as mkcert creates a local CA and installs it in your system root store. It does not configure your servers for you, and its authors say it is meant for development and not for production or end users' machines. [GitHub, FiloSottile/mkcert]