PKIjs

PKI.js 是一个纯 JavaScript 库,实现了 PKI 应用中使用的格式(签名、加密、证书请求、OCSP 和 TSP 请求/回复)。它建立在 WebCrypto(Web Cryptography API)上,不需要任何插件。「PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.」

Github stars Tracking Chart

PKIjs

PKIjs 为构建 PKI 应用所需的最常见的格式和算法提供了一个 Typescript 实现。

能力

  • X.509 证书(RFC 5280)的创建和验证被所有支持证书的应用程序所使用。
  • PKCS#10(RFC 2986)是 X.509 应用最常用的注册数据结构。它使请求者能够证明对特定公钥的控制。
  • Cryptographic Message Syntax(RFC 5652)是 X.509 应用中最常用的数据结构,用于签署数据。CMS 使得签署和表示验证签名所需的所有数据都很容易。
  • 加密信息语法(RFC 5652)也是 X.509 应用中最常用的数据结构,用于加密数据。CMS 使得提供可互操作的数据加密变得容易。
  • 时间戳协议(RFC 3161)是证明数据在某个特定时间之前存在的最常用协议。它通常用于签名应用,以确保签名在未来很长一段时间内都是可验证的。

目标

  • 类型脚本和面向对象的实现
  • 不包含加密实现,而是利用 Web Crypto API
  • 在浏览器和 Node/Dino 中都能统一工作

安装

要安装稳定版。

npm install --save pkijs

假设你使用 npm 作为你的软件包管理器。

实例

证书和废止

用CMS进行签名和加密

时间戳

其他

文档

你可以 在网站上 找到 PKI.js 的文档。

想帮忙吗?

想提交一个错误,贡献一些代码,或改进文档吗?很好! 请阅读我们的贡献指南。

核心贡献者

Stepan Miroshin


Overview

Name With OwnerPeculiarVentures/PKI.js
Primary LanguageTypeScript
Program languageJavaScript (Language Count: 5)
PlatformLinux, Mac, Web browsers, Windows
License:Other
Release Count31
Last Release Namev3.0.16 (Posted on 2024-03-12 10:40:48)
First Release Namev1.0.2 (Posted on )
Created At2014-02-06 18:38:11
Pushed At2024-04-30 14:55:00
Last Commit At2024-04-30 17:54:57
Stargazers Count1.2k
Watchers Count65
Fork Count200
Commits Count572
Has Issues Enabled
Issues Count320
Issue Open Count59
Pull Requests Count50
Pull Requests Open Count4
Pull Requests Close Count31
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

PKIjs

License
CircleCI
Known Vulnerabilities Coverage Status

NPM

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/Dino

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

To the top