All Projects → davesag → jose-simple

davesag / jose-simple

Licence: other
Jose-Simple allows the encryption and decryption of data using the JOSE (JSON Object Signing and Encryption) standard.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to jose-simple

Webcrypto
W3C Web Cryptography API for Node.js
Stars: ✭ 79 (+58%)
Mutual labels:  encryption, signing, jose
Jose
JSON Object Signing and Encryption for Node.js and the browser
Stars: ✭ 25 (-50%)
Mutual labels:  encryption, signing, jose
Go Jose
An implementation of JOSE standards (JWE, JWS, JWT) in Go
Stars: ✭ 1,849 (+3598%)
Mutual labels:  encryption, signing, jose
Joseswift
A framework for the JOSE standards JWS, JWE, and JWK written in Swift.
Stars: ✭ 114 (+128%)
Mutual labels:  encryption, signing, jose
Jose2go
Golang (GO) implementation of Javascript Object Signing and Encryption specification
Stars: ✭ 150 (+200%)
Mutual labels:  encryption, jose
Cli
🧰 A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc.
Stars: ✭ 2,151 (+4202%)
Mutual labels:  encryption, jose
Helm Secrets
Successor of zendesk/helm-secrets - A helm plugin that help manage secrets with Git workflow and store them anywhere
Stars: ✭ 165 (+230%)
Mutual labels:  encryption, decryption
Laravel Database Encryption
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Stars: ✭ 238 (+376%)
Mutual labels:  encryption, decryption
Cross Platform Aes
Simple cross-platform encryption and decryption using AES
Stars: ✭ 127 (+154%)
Mutual labels:  encryption, decryption
Pgsodium
Modern cryptography for PostgreSQL using libsodium.
Stars: ✭ 202 (+304%)
Mutual labels:  encryption, decryption
kms-env
A tool to encrypt and decrypt environment variables using KMS
Stars: ✭ 16 (-68%)
Mutual labels:  encryption, decryption
jose
Extensible JOSE library for Scala
Stars: ✭ 12 (-76%)
Mutual labels:  signing, jose
Padding Oracle Attacker
🔓 CLI tool and library to execute padding oracle attacks easily, with support for concurrent network requests and an elegant UI.
Stars: ✭ 136 (+172%)
Mutual labels:  encryption, decryption
Underlock
Underlock makes it dead simple to encrypt and decrypt your data and files. It comes with little to no dependencies and has a very small API surface.
Stars: ✭ 128 (+156%)
Mutual labels:  encryption, decryption
Securitydriven.inferno
✅ .NET crypto done right. Professionally audited.
Stars: ✭ 501 (+902%)
Mutual labels:  base64, encryption
Jsrsasign
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 in pure JavaScript.
Stars: ✭ 2,760 (+5420%)
Mutual labels:  encryption, decryption
Laravel Hashid
Obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.
Stars: ✭ 354 (+608%)
Mutual labels:  base64, encryption
Ksprefs
🚀⚡ Kotlin SharedPreferences wrapper & cryptographic preferences android library.
Stars: ✭ 176 (+252%)
Mutual labels:  base64, encryption
Cryption
In-Browser AES File Encryption 🔐 with Data Integrity Check 🔍
Stars: ✭ 114 (+128%)
Mutual labels:  encryption, decryption
cryptopocket
🔐 Encrypt anything, then Decrypt by providing a required key.
Stars: ✭ 22 (-56%)
Mutual labels:  signing, decryption

jose-simple

Proper encryption ought to be simple, and widespread.

Jose-Simple simplifies the encryption and decryption of data using the JOSE (JSON Object Signing and Encryption) standard.

NPM

Caveats

Installation

npm install jose-simple

Links

Useage

const jose = require('jose-simple')
// You need a private / public JWE key pair.
// Either load them from `.pem` files, create them, or somehow acquire them.
// The private key must not have a passphrase or cypher!
// see https://github.com/cisco/node-jose/issues/69#issuecomment-236133179
// see also https://github.com/cisco/node-jose/issues/234#issuecomment-457615794
// see unit tests for a simple example.

const { encrypt, decrypt } = jose(privateKey, publicKey)

const someData = {
  some: 'amazing data',
  you: 'want to keep hidden',
  from: 'prying eyes'
}

encrypt(someData).then(encrypted => {
  console.log('encrypted', encrypted)
  decrypt(encrypted).then(decrypted => {
    console.log('decrypted', decrypted)
    // decrypted will be the same as someData
  })
})

Options

See encrypt.js#L660-L668

You can add encrypt options as follows:

const { encrypt, decrypt } = jose(privateKey, publicKey, {
  format: 'compact'
  protect: true,
  // or any of the encrypt options than can be passed to JWE.createEncrypt.
  // https://github.com/cisco/node-jose/blob/master/lib/jwe/encrypt.js#L660-L668
})

Development

Branch Status Coverage Audit Comment
develop CircleCI codecov Vulnerabilities Work in progress
main CircleCI codecov Vulnerabilities Latest release

Prerequisites

  • NodeJS, I use nvm to manage Node versions — brew install nvm.

Test it

  • npm test — runs the unit tests. The tests give an example of how to create key pairs too. (Leverages the crypto.generateKeyPair libraries introduced in Node 10.12.0.)
  • npm run test:unit:cov — runs the unit tests with code coverage

Lint it

npm run lint

Contributing

Contributions are welcome. Please see CONTRIBUTING for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].