-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Private Key Gadgets can be used as a local browser app, a reusable npm package, or an embeddable Webview-friendly UI.
npm install @pkistudio/pvkgadgetsThe package exports:
-
@pkistudio/pvkgadgets: UI-independent Core API. -
@pkistudio/pvkgadgets/core: Core API alias. -
@pkistudio/pvkgadgets/pkcs12: PKCS#12 helper API. -
@pkistudio/pvkgadgets/app: browser application initializer. -
@pkistudio/pvkgadgets/styles.css: application stylesheet.
npm install
npm run devThen open the Vite local URL, normally:
http://localhost:5173/
In VS Code, the Start pvkgadgets server task starts the same development server on port 5173.
Use the New menu in the left pane to generate a browser-supported key pair. Supported families depend on the current browser WebCrypto implementation and may include RSA, EC, Ed25519, and X25519.
Generated key pairs appear as top-level tree items. Each generated key pair contains DER-backed child objects such as PrivateKey and PublicKey.
Use Open to load .p12 or .pfx files.
Private Key Gadgets detects PKCS#12 input and prompts for the password when needed. Imported key material is added to the key tree. Matching certificates are attached under the imported key pair.
Non-PKCS#12 ASN.1 DER or PEM data is routed to the embedded PkiStudioJS viewer.
Common workflow:
- Generate or import a key pair.
- Use the key pair menu to create a SubjectDN item.
- Select the PrivateKey item and create a CSR or self-signed certificate.
- Inspect generated DER in the embedded ASN.1 viewer.
SubjectDN input uses LDAP-style order, for example:
CN=example.com, O=Example, C=JP
CSR and self-signed certificate creation support RSA and EC signing keys and SHA-256, SHA-384, or SHA-512 signing choices.
Use Save to export selected top-level key pairs as password-protected PKCS#12 files.
Individual DER objects are displayed in the embedded PkiStudioJS viewer. Use the viewer Save menu when you want to write the currently displayed DER document to a file.