Skip to content
dweller long gone edited this page May 22, 2026 · 4 revisions

Private Key Gadgets Wiki

Private Key Gadgets is a browser-based PKI key material tool and reusable TypeScript API. It generates, imports, exports, and inspects private-key related objects in the browser, while using PkiStudioJS as the embedded ASN.1 DER viewer.

Private Key Gadgets screenshot

The package is published as:

npm install @pkistudio/pvkgadgets

Current package version: 0.4.2

What to Read First

  • Getting Started: install, run, generate keys, import PKCS#12, and export key material.
  • Browser App: understand the key tree, SubjectDN, CSR, self-signed certificates, certificate loading, and ASN.1 viewer behavior.
  • Core API: use PvkGadgetsCore for WebCrypto key generation, PEM/DER helpers, SubjectDN, CSR, certificates, and key matching.
  • PKCS#12 API: use the standalone PKCS#12 import and export helpers.
  • Embedding: mount the application in a browser page or Webview host.
  • Testing: understand what the standard checks cover and where browser verification is still needed.
  • Development: local checks, package entry points, wiki preview, and release notes.

Key Guarantees

  • Key material is generated, parsed, and exported in the browser.
  • Generated and imported key material is kept as DER bytes in browser memory.
  • Private keys are stored as PKCS#8 DER.
  • Public keys are stored as SPKI DER.
  • Certificates are stored as X.509 certificate DER.
  • SubjectDN items are stored as RDNSequence DER.
  • CSR items are stored as PKCS#10 DER.
  • PKCS#12 import and export use PKIjs and asn1js structured APIs.
  • VS Code-specific file access, dialogs, and Webview lifecycle remain outside the package and flow through host callbacks.
  • PkiStudioJS is used as the ASN.1 inspection viewer; Private Key Gadgets owns key, certificate, CSR, and PKCS#12 workflows.

Repository Links

Clone this wiki locally