MCPcopy Index your code
hub / github.com/PeculiarVentures/PKI.js

github.com/PeculiarVentures/PKI.js @v3.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.4.0 ↗ · + Follow
1,661 symbols 3,618 edges 215 files 400 documented · 24%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PKIjs

NPM License GitHub Actions Workflow Status npm version Coveralls npm downloads

PKIjs provides a Typescript implementation of the most common formats and algorithms needed to build PKI-enabled applications

Capabilities

  • The creation and validation of X.509 certificates (RFC 5280) is used by all certificate-enabled applications.
  • PKCS#10 (RFC 2986) is the most commonly used enrollment data structure used by X.509 applications. It enables the requestor to prove control of a given public key.
  • Cryptographic Message Syntax (RFC 5652) is the most commonly used data structure for signing data in X.509 applications. CMS makes it easy to both sign and represent all of the data needed to verify a signature.
  • Cryptographic Message Syntax (RFC 5652) is also the most commonly used data structure for encrypting data in X.509 applications. CMS makes it easy to provide interoperable data encryption.
  • Time-Stamp Protocol (RFC 3161) is the most commonly used protocol for proving that data existed before a particular time. It is commonly used in signing applications to ensure signatures are verifiable long into the future.

Objectives

  • Typescript and object-oriented implementation
  • Contains no cryptographic implementations and instead leverages Web Crypto API
  • Work uniformly both in browser and in Node/Deno

Installation

To install the stable version:

npm install --save pkijs

This assumes you are using npm as your package manager.

Examples

Certificates and Revocation

Signing and Encryption with CMS

Timestamping

Other

Documentation

You can find the PKI.js documentation on the website.

Want to help?

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contribution.

Core Contributors

Stepan Miroshin

Extension points exported contracts — how you extend this code

SchemaCompatible (Interface)
(no doc) [114 implementers]
src/Schema.ts
ITBSRequest (Interface)
(no doc) [1 implementers]
src/TBSRequest.ts
ISignedCertificateTimestamp (Interface)
(no doc) [1 implementers]
src/SignedCertificateTimestamp.ts
IPublicKeyInfo (Interface)
(no doc) [1 implementers]
src/PublicKeyInfo.ts
IRSAPublicKey (Interface)
(no doc) [1 implementers]
src/RSAPublicKey.ts
IQCStatement (Interface)
(no doc) [1 implementers]
src/QCStatements.ts
IPolicyMapping (Interface)
(no doc) [1 implementers]
src/PolicyMapping.ts
IKeyAgreeRecipientInfo (Interface)
(no doc) [1 implementers]
src/KeyAgreeRecipientInfo.ts

Core symbols most depended-on inside this repo

toSchema
called by 276
src/Schema.ts
toJSON
called by 235
src/Schema.ts
fromBER
called by 110
src/ExtensionValueFactory.ts
assertSchema
called by 110
src/errors/AsnError.ts
isEqual
called by 66
src/CertID.ts
assert
called by 59
src/errors/AsnError.ts
getAlgorithmByOID
called by 26
src/CryptoEngine/CryptoEngineInterface.ts
importKey
called by 24
src/PublicKeyInfo.ts

Shape

Method 899
Interface 282
Class 256
Function 221
Enum 3

Languages

TypeScript100%

Modules by API surface

src/CertificateChainValidationEngine.ts30 symbols
src/EnvelopedData.ts28 symbols
src/CryptoEngine/CryptoEngineInterface.ts24 symbols
src/QCStatements.ts22 symbols
src/CryptoEngine/CryptoEngine.ts20 symbols
src/SignedData.ts19 symbols
src/Certificate.ts18 symbols
src/CertificationRequest.ts17 symbols
src/CertificateRevocationList.ts17 symbols
src/BasicOCSPResponse.ts16 symbols
src/TimeStampResp.ts15 symbols
src/GeneralName.ts15 symbols

For agents

$ claude mcp add PKI.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page