@bookmoons/bitcore-ecies-cash

1.0.4 • Public • Published

Bitcoin Cash ECIES for bitcore

NPM Package Build Status Coverage Status

A module for the Bitcoin Cash variant of bitcore that implements the Elliptic Curve Integrated Encryption Scheme (ECIES). Uses ECIES symmetric key negotiation from public keys to encrypt arbitrarily long data streams.

See the main bitcore repo or the bitcore guide on ECIES for more information.

Credit to @ryanxcharles for the original implementation.

Getting started

ECIES will allow to securely encrypt and decrypt messages using ECDSA key pairs (bitcoin cryptography).

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'

License

Code released under the MIT license.

Package Sidebar

Install

npm i @bookmoons/bitcore-ecies-cash

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

23.9 kB

Total Files

17

Last publish

Collaborators

  • bookmoons