kush-e2e
v1.0.1
Published
End-to-end encryption library for secure peer-to-peer communication
Maintainers
Readme
Kush E2E Encryption Lib
A lightweight, secure wrapper for ECDH and JOSE encryption.
End-to-end encryption library for secure peer-to-peer communication using ECDH key exchange and AES-256 encryption.
Installation
npm install kush-e2eUsage
import { KushE2E } from 'kush-e2e';
// Create identities
const identity1 = await KushE2E.createIdentity();
const identity2 = await KushE2E.createIdentity();
// Derive shared session key
const sessionKey = await KushE2E.deriveSessionKey(
identity1.privateKey,
identity2.publicKey
);
// Encrypt message
const encrypted = await KushE2E.encrypt('Hello World', sessionKey);
// Decrypt message
const decrypted = await KushE2E.decrypt(encrypted, sessionKey);
console.log(decrypted); // "Hello World"Features
- ECDH-ES+A256KW key exchange with P-256 curve
- AES-256 GCM encryption/decryption
- Cross-platform crypto support (Node.js and browsers)
- Full TypeScript support
License
ISC
