11.1.0 • Published 3 months ago

jsrsasign v11.1.0

Weekly downloads
156,795
License
MIT
Repository
github
Last release
3 months ago

jsrsasign

license bower npm version npm downloads jsdeliver downloads CDNJS githubsponsors cryptocurrency

jsrsasign TOP | github | Wiki | DOWNLOADS | TUTORIALS | API REFERENCE | Online Tool | DEMO | NODE TOOL | AddOn | DONATE

The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES JSON Web Signature/Token/Key in pure JavaScript.

Public page is https://kjur.github.io/jsrsasign .

Your bugfix and pull request contribution are always welcomed :)

NOTICE FOR COMMING 11.0.0 RELEASE

The "jsrsasign" library is a long lived JavaScript library from 2010 developed with old JavaScript style and backword compatibility. From coming release 11.0.0, following are planed and suport them gradually:

  • Stop to support Internet Explorer.
  • Stop to support bower.
  • Modern ECMA functions will be introduced such as Promise, let, Array methods or class.
  • API document generator will be changed from Jsdoc Toolkit to JSDoc3.
  • Module bandler will be used such as browserify or webpack.
  • Not to use YUI compressor.
  • Unit test framework will be changed from QUnit and mocha to jest.
  • W3C Web Crypto API support.
  • split into some modules besides jsrsasign have been all in package before 11.0.0.

NEWS

  • 2023-Mar-12: 10.7.0 Release. Now supports custom X.509 extension and custom OIDs by new "Add-on" architecture. (See here in detail)
  • 2021-Nov-21: 10.5.0 Release. Now supports secp521r1(P-521) ECDSA.
  • 2021-Apr-14: Security advisory and update for CVE-2021-30246 RSA signature validation vulnerability published
  • 2020-Oct-05: jsrsasign won Google Open Source Peer Bonus Award. Thank you Google.
  • 2020-Sep-23: 10.0.0 released for CMS SignedData related class including timestamp and CAdES architecture update
  • 2020-Aug-24: 9.1.0 released to new CRL APIs align with certificate
  • 2020-Aug-19: 9.0.0 released for major update of certificate and CSR generation and parsing without backward compatibility. Please see migration guide in detail.
  • 2020-Aug-02: twitter account @jsrsasign started for announcement. please follow.

HIGHLIGHTS

  • Swiss Army Knife style all in one package crypto and PKI library
  • available on Node.js and browsers
  • Long live open source software from 2010
  • very easy API to use
  • powerful various format key loader and ASN.1 API
  • rich document and samples
  • no dependency to other library
  • no dependency to W3C Web Cryptography API nor OpenSSL
  • no dependency on newer ECMAScirpt function. So old browsers also supported.
  • very popular crypto library with 1M+ npm downloads/month
  • supports "Add-on" architecture

INSTALL

Node NPM

> npm install jsrsasign jsrsasign-util

Bower

> bower install jsrsasign

Or include in HTML from many CDN sites

> <script src="https://cdnjs.cloudflare.com/ajax/libs/jsrsasign/8.0.20/jsrsasign-all-min.js"></script>

USAGE

Loading encrypted PKCS#5 private key:

> var rs = require('jsrsasign');
> var rsu = require('jsrsasign-util');
> var pem = rsu.readFile('z1.prv.p5e.pem');
> var prvKey = rs.KEYUTIL.getKey(pem, 'passwd');

Sign string 'aaa' with the loaded private key:

> var sig = new a.Signature({alg: 'SHA1withRSA'});
> sig.init(prvKey);
> sig.updateString('aaa');
> var sigVal = sig.sign();
> sigVal
'd764dcacb...'

MORE TUTORIALS AND SAMPLES

RECENT SECURITY ADVISORY

publishedfixed versiontitle/advisoryCVECVSS
2022Jun2410.5.25JWS and JWT signature validation vulnerability with special charactersCVE-2022-25898?
2021Apr1410.2.0RSA signature validation vulnerability on maleable encoded messageCVE-2021-302469.1
2020Jun228.0.19ECDSA signature validation vulnerability by accepting wrong ASN.1 encodingCVE-2020-149665.5
2020Jun228.0.18RSA RSAES-PKCS1-v1_5 and RSA-OAEP decryption vulnerability with prepending zerosCVE-2020-149674.8
2020Jun228.0.17RSA-PSS signature validation vulnerability by prepending zerosCVE-2020-149684.2

Here is full published security advisory list.

DONATIONS

If you like jsrsasign and my other project, you can support their development by donation through any of the platform/services below. Thank you as always.

Github Sponsors

You can sponsor jsrsasign with the GitHub Sponsors program.

Cryptocurrency

You can donate cryptocurrency to jsrsasign using the following addresses:

yubo-app@streamerpolls/anvil-connect-jwt@eui/deps-basecomposer-common@mediafly/playback-componentangular-oauth2-oidc-imprfabric-client-gmfabric-client-sm2qiuguochaofabric-client-sm1greenpay-sdkd-specs-oidc-clientastrid-apprclinktest@alyz.tech/alyz-sdk@alyz.tech/alyz_js_sdktrustedkey-js@tongxinwudong/react-native-alipaybitcore-payment-protocol-polistest-rc-commonfirebase-no-play-servicesbsad-lib-auth@towbe/firebase-no-play-servicescert-requestacmedbfs-webauthnglobalid-web-cryptojwn-jsventaja-bill-paymentventaja-bill-payments@simplewebauthn-alt/serverfrance-ehealth-certificaceskaena-tsacopay-nodejs-sdk@wheelroom/oauth2-response-generator@elastosfoundation/elastos-hive-js-sdkcomponents_library_vue3@dchagastelles/elastos-hive-js-sdkteasim-authorizationteasim-permissionecclesiakwil_messengerzoominfo-node@pasarprotocol/pasar-sdkelement-webguardfielrn-paysandpayjskhala-cryptoethernity-cloud-runnerhomebridge-xbox-tvrsshub@jaccomeijer/oauth2-grants@everything-registry/sub-chunk-1990did-generatortelehealth-ui-v2@appythings/apidex-cli@apple/app-store-server-library@api-components/api-request@api-components/api-request-editor@api-components/authorization-panel@apolitical/server@apolitical/testing@anyone-dev/app-store-server-library@advanced-rest-client/authorization-panel@aeroline_1025/angular-mobilesso@agneta/cli@alipay-inc/mpaas-ide-openapi-antfin@ampproject/toolbox-update-cache@aiot-toolkit/aiotpack@aiot-toolkit/packager@authrocket/authrocket-node@aurorajs.dev/cli@aurora-ts/clibfn-webauthn-serverbft-fabric-common2beyondcorebam-ticketing-sdk@botonic/plugin-dialogflow@botonic/plugin-google-translationazure-clibeame-sdkbdzx-sop-js@caplin/express-dev-server@brioux/cactus-plugin-ledger-connector-fabricbitcore-litecoinbitcore-payment-protocolbitcore-payment-protocol-exccbitcore-payment-protocol-matrixbitbitcore-payment-protocol-muebitcore-payment-protocol-mxbitbitcore-payment-protocol-mycoinbitcore-payment-protocol-rapturebitcore-payment-protocol-terracoinbitcore-payment-protocol-anonbitcore-payment-protocol-crownbitcore-payment-protocol-dashbitcoin-com-bitcore-payment-protocolbip70-jsinsomnia-plugin-oci-auth
11.1.0

3 months ago

11.0.0

3 months ago

10.9.0

5 months ago

10.8.2

1 year ago

10.8.3

1 year ago

10.8.4

12 months ago

10.8.5

12 months ago

10.8.6

12 months ago

10.8.0

1 year ago

10.8.1

1 year ago

10.7.0

1 year ago

10.6.0

1 year ago

10.6.1

1 year ago

10.5.21

2 years ago

10.5.27

2 years ago

10.5.26

2 years ago

10.5.23

2 years ago

10.5.22

2 years ago

10.5.25

2 years ago

10.5.24

2 years ago

10.5.20

2 years ago

10.5.18

2 years ago

10.5.19

2 years ago

10.5.10

2 years ago

10.5.16

2 years ago

10.5.15

2 years ago

10.5.17

2 years ago

10.5.12

2 years ago

10.5.11

2 years ago

10.5.14

2 years ago

10.5.13

2 years ago

10.5.9

2 years ago

10.5.8

2 years ago

10.5.1

2 years ago

10.5.2

2 years ago

10.5.3

2 years ago

10.5.4

2 years ago

10.5.5

2 years ago

10.5.6

2 years ago

10.5.7

2 years ago

10.5.0

2 years ago

10.4.1

3 years ago

10.4.0

3 years ago

10.3.2

3 years ago

10.3.0

3 years ago

10.2.0

3 years ago

10.1.13

3 years ago

10.1.12

3 years ago

10.1.11

3 years ago

10.1.10

3 years ago

10.1.9

3 years ago

10.1.8

3 years ago

10.1.7

3 years ago

10.1.6

3 years ago

10.1.5

3 years ago

10.1.4

3 years ago

10.1.3

3 years ago

10.1.2

3 years ago

10.1.1

3 years ago

10.1.0

3 years ago

10.0.5

3 years ago

10.0.4

3 years ago

10.0.3

3 years ago

10.0.2

4 years ago

10.0.1

4 years ago

10.0.0

4 years ago

9.1.9

4 years ago

9.1.8

4 years ago

9.1.7

4 years ago

9.1.6

4 years ago

9.1.5

4 years ago

9.1.4

4 years ago

9.1.3

4 years ago

9.1.2

4 years ago

9.1.1

4 years ago

9.1.0

4 years ago

9.0.3

4 years ago

9.0.2

4 years ago

9.0.1

4 years ago

9.0.0

4 years ago

8.0.24

4 years ago

8.0.23

4 years ago

8.0.22

4 years ago

8.0.21

4 years ago

8.0.20

4 years ago

8.0.19

4 years ago

8.0.18

4 years ago

8.0.17

4 years ago

8.0.16

4 years ago

8.0.15

4 years ago

8.0.14

4 years ago

8.0.13

4 years ago

8.0.12

6 years ago

8.0.11

6 years ago

8.0.10

6 years ago

8.0.9

6 years ago

8.0.8

6 years ago

8.0.7

6 years ago

8.0.6

6 years ago

8.0.5

6 years ago

8.0.4

7 years ago

8.0.3

7 years ago

8.0.2

7 years ago

8.0.1

7 years ago

8.0.0

7 years ago

7.2.2

7 years ago

7.2.1

7 years ago

7.2.0

7 years ago

7.1.5

7 years ago

7.1.4

7 years ago

7.1.3

7 years ago

7.1.2

7 years ago

7.1.1

7 years ago

7.1.0

7 years ago

7.0.0

7 years ago

6.2.3

7 years ago

6.2.2

7 years ago

6.2.1

7 years ago

6.2.0

7 years ago

6.1.4

8 years ago

6.1.3

8 years ago

6.1.2

8 years ago

6.1.1

8 years ago

6.1.0

8 years ago

6.0.1

8 years ago

6.0.0

8 years ago

5.1.0

8 years ago

5.0.15

8 years ago

5.0.14

8 years ago

5.0.13

8 years ago

5.0.12

8 years ago

5.0.11

8 years ago

5.0.10

8 years ago

5.0.9

8 years ago

5.0.8

8 years ago

5.0.7

8 years ago

5.0.6

8 years ago

5.0.5

8 years ago

5.0.2

8 years ago

5.0.1

9 years ago

5.0.0

9 years ago

4.10.0

9 years ago

4.9.2

9 years ago

4.9.1

9 years ago

4.9.0

9 years ago

4.8.6

9 years ago

4.8.5

9 years ago

4.8.4

9 years ago

4.8.3

9 years ago

4.8.2

9 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago