npm install @owstack/btc-eciesBtc ECIES
======



A module for [btc][btc] that implements the [Elliptic Curve Integrated Encryption Scheme (ECIES)][ECIES]. Uses ECIES symmetric key negotiation from public keys to encrypt arbitrarily long data streams.
See the main btc repo or the btc guide on ECIES for more information.
Credit to [@ryanxcharles][ryan] for the original implementation.
ECIES will allow to securely encrypt and decrypt messages using ECDSA key pairs (bitcoin cryptography).
``javascript
var alice = ECIES()
.privateKey(aliceKey)
.publicKey(bobKey.publicKey);
var message = 'some secret message';
var encrypted = alice.encrypt(message);
// encrypted will contain an encrypted buffer only Bob can decrypt
var bob = ECIES()
.privateKey(bobKey)
.publicKey(aliceKey.publicKey);
var decrypted = bob
.decrypt(encrypted)
.toString();
// decrypted will be 'some secret message'
``
See CONTRIBUTING.md on the main btc repo for information about how to contribute.
Code released under the MIT license.
Copyright 2017 Open Wallet Stack.
[btc]: http://github.com/owstack/btc
[ECIES]: http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme
[ryan]: http://github.com/ryanxcharles