Skip to content

Node Javascript Tool to generate, encrypt and decrypt RSA and EC keys formated as PEM / DER

License

Notifications You must be signed in to change notification settings

arvati/crypto-keys

Repository files navigation

codecov

Crypto-keys

Node Module for Cryptographic Key Utilities in JavaScript'

Node Javascript Tool to generate, encrypt and decrypt RSA and EC keys formated as PEM / DER.

Fork of js-crypto-key-utils to work only with node.js, with less dependencies and not available for Octet-Formatted Key.

Included code to generate private and public key pair with RSA or EC algorithm

Usage

Supported key types are PEM/DER.

  • Public keys are encoded to the form of SubjectPublicKeyInfo (SPKI) defined as a part of X.509 public key certificate (RFC5280). The detailed encoding rule for elliptic curve cryptographic keys is given in RFC5480.
  • Private keys are encoded to hte form of PrivateKeyInfo defined in PKCS#8 (RFC5958). The detailed encoding rule for elliptic curve cryptographic keys is given in RFC5915 as well as SPKI.

Please refer to RFC3447 for the detailed encoding rule of RSA public and private keys.

See examples of Tests and our API.

License

Licensed under the MIT license, see LICENSE.

Author

Ademar Arvati Filho
Contributors.

Credits

This fork is totally based on work published by junkurihara at js-crypto-key-utils

It uses library publish by Tom Wu at stanford jsbn to generate keypair in pure js.

Using Great Jekyll theme Just the Docs by Patrick Marsceill