pkijs.com logo

pkijs.com

A pure-JavaScript PKI toolkit that owns its stack — X.509, ASN.1/DER, OID, PQC-first.
Zero npm dependencies PQC-first Fail-closed DER CommonJS, no transpilation Apache-2.0

Every page in this reference is generated from the toolkit's own source comments. Zero npm runtime dependencies — the cryptography runs on Node's native node:crypto (classical and FIPS post-quantum), nothing vendored.

Quick start

npm install @blamejs/pki
var pki = require("@blamejs/pki");

var cert = pki.schema.x509.parse(pemText);
cert.subject.dn;                 // "CN=example.com, O=Example"
cert.validity.notAfter;          // Date
cert.signatureAlgorithm.name;    // "sha256WithRSAEncryption"
TipParse without knowing the format first: pki.schema.parse(der) detects which of the toolkit's registered formats the bytes encode — certificate, CRL, CSR, CMS, OCSP, PKCS#8, PKCS#12, timestamp token, and the rest — and routes to the owning parser. pki.schema.all() lists the registered formats.

Design tenets

Namespaces