All Projects → 47ng → cloak

47ng / cloak

Licence: MIT license
Serialized AES-GCM 256 encryption, decryption and key management in the browser & Node.js

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects
HTML
75241 projects

Projects that are alternatives of or similar to cloak

warshield
Warshield is a file encryption and decryption CLI using AES 256 algorithm
Stars: ✭ 29 (+16%)
Mutual labels:  decryption, aes-256-gcm
WebCrypto.swift
A small collection of cryptographic functions based on the JavaScript WebCrypto API.
Stars: ✭ 16 (-36%)
Mutual labels:  decryption
strong-cryptor
Strong encryption and decryption node js
Stars: ✭ 18 (-28%)
Mutual labels:  decryption
Password-Store
Saves your password with cryptography so only you can decode it.
Stars: ✭ 15 (-40%)
Mutual labels:  decryption
frodo
practical quantum-secure key encapsulation from generic lattices
Stars: ✭ 17 (-32%)
Mutual labels:  decryption
dlink-decrypt
D-Link firmware decryption PoC
Stars: ✭ 107 (+328%)
Mutual labels:  decryption
ciphr
CLI crypto swiss-army knife for performing and composing encoding, decoding, encryption, decryption, hashing, and other various cryptographic operations on streams of data from the command line; mostly intended for ad hoc, infosec-related uses.
Stars: ✭ 100 (+300%)
Mutual labels:  decryption
cryptorious
CLI Password Manager
Stars: ✭ 15 (-40%)
Mutual labels:  decryption
cryptocli
The ultimate tool for data transfer, manipulation and proxy.
Stars: ✭ 16 (-36%)
Mutual labels:  decryption
synology-decrypt
An open source implementation/description of the Synology Cloud Sync encryption/decryption algorithm
Stars: ✭ 91 (+264%)
Mutual labels:  decryption
doctrine-extensions
Doctrine2 behavioral extension Transformable
Stars: ✭ 14 (-44%)
Mutual labels:  decryption
php jwsign
This is a function wrapping through the Openssl to sign and validate the data, which ensures the integrity and security of the original data.
Stars: ✭ 33 (+32%)
Mutual labels:  decryption
Hemmelig.app
Keep your sensitive information out of chat logs, emails, and more with encrypted secrets.
Stars: ✭ 183 (+632%)
Mutual labels:  decryption
client-encryption-nodejs
Library for Mastercard API compliant payload encryption/decryption.
Stars: ✭ 20 (-20%)
Mutual labels:  decryption
simple-ransomware
Simple ransomware to troll your friends. Encrypt and Decrypt a Windows computer using a simple xor encryption which is pretty basic!
Stars: ✭ 29 (+16%)
Mutual labels:  decryption
kmstool
Tool for using AWS Kms data keys to encrypt and decrypt large files.
Stars: ✭ 33 (+32%)
Mutual labels:  decryption
cryptopocket
🔐 Encrypt anything, then Decrypt by providing a required key.
Stars: ✭ 22 (-12%)
Mutual labels:  decryption
Keep-It-Secure-File-Encryption
Keep It Secure Private Data Encryption & Decryption Tool
Stars: ✭ 38 (+52%)
Mutual labels:  decryption
lazysodium-java
A Java implementation of the Libsodium crypto library. For the lazy dev.
Stars: ✭ 110 (+340%)
Mutual labels:  decryption
Cryptor
Encrypt and decrypt string using a key
Stars: ✭ 14 (-44%)
Mutual labels:  decryption

@47ng/cloak

NPM MIT License Continuous Integration Coverage Status

Serialized AES-GCM 256 encryption, decryption and key management in the browser & Node.js.

Installation

$ yarn add @47ng/cloak
# or
$ npm i @47ng/cloak

CLI

The package comes with a CLI tool you can use to generate and manage keys, as well as encrypting and decrypting data in the terminal:

$ cloak --help
Usage: cloak [options] [command]

Options:
  -h, --help                 output usage information

Commands:
  generate                   Generate an AES-GCM key
  encrypt [options] [key]    Encrypt stdin
  decrypt                    Decrypt stdin
  revoke <keyFingerprint>    Remove a key from the environment keychain
  keychain [options] [full]  List the contents of the environment keychain

# Start by generating an empty keychain and master key:
$ cloak generate
Key:          k1.aesgcm256.DL2G9PQeZ9r65J59pph6dy9Sk4fBLEZ3CTQZsandgYE=
Fingerprint:  6f28c026

Generated new empty keychain:
export CLOAK_MASTER_KEY=k1.aesgcm256.DL2G9PQeZ9r65J59pph6dy9Sk4fBLEZ3CTQZsandgYE=
export CLOAK_KEYCHAIN=v1.aesgcm256.6f28c026.yhCUkzv5gOyHJ2M_.jrGSf2_MPVofk-kSDgnYzvEy

# Copy/paste the exports into your terminal
# (the CLI does not mutate your environment directly)
$ export CLOAK_MASTER_KEY=k1.aesgcm256.DL2G9PQeZ9r65J59pph6dy9Sk4fBLEZ3CTQZsandgYE=
$ export CLOAK_KEYCHAIN=v1.aesgcm256.6f28c026.yhCUkzv5gOyHJ2M_.jrGSf2_MPVofk-kSDgnYzvEy

# Generate a key to use for encryption
$ cloak generate
Key:          k1.aesgcm256.pHLFYdaqXut62LoFbt8KV80x_YNyZPmY0kQaPhJ0Ehc=
Fingerprint:  cd38bcc4

Updated keychain:
export CLOAK_MASTER_KEY=k1.aesgcm256.DL2G9PQeZ9r65J59pph6dy9Sk4fBLEZ3CTQZsandgYE=
export CLOAK_KEYCHAIN=v1.aesgcm256.6f28c026.jr9fqMA_RfNhIjHz.lo4IfIYfZ0zxrdSns_ibWq6YX1D5AnzN-fhUF0CKVx5dRVIo0x-Atumr9WZqpHOeEIWT5bEGFKHhxGkFdwk2vg5TZQNk5Rj_jo3hnfSLaFAYncG59dB  jUkz1JE0Plq2d-GR1AbDs6P18VzOG_JrU

To use this new key as default for encryption:
export CLOAK_CURRENT_KEY=cd38bcc4

# Encrypt sdtin
$ echo 'Hello, World !' | cloak encrypt
v1.aesgcm256.cd38bcc4.yxAp2iONy7zYOhbs.X2zmGpmGw9a7tiSnyukEW8Ac-2IIcIENW5uHxtHYyA==

# Decrypt stdin
$ echo 'v1.aesgcm256.cd38bcc4.yxAp2iONy7zYOhbs.X2zmGpmGw9a7tiSnyukEW8Ac-2IIcIENW5uHxtHYyA==' | cloak decrypt
Hello, World !

Programmatic Usage

// Works in the browser or in Node.js

import { generateKey, encryptString, decryptString } from '@47ng/cloak'

const demo = async () => {
  const key = generateKey()
  const cipher = await encryptString('Hello, World', key)
  const decipher = await decryptString(cipher, key)
}

License

MIT - Made with ❤️ by François Best

Using this package at work ? Sponsor me to help with support and maintenance.

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].