Skip to content

GAB5TER/orecore-ecies

 
 

Repository files navigation

ECIES for Orecore

A module for core 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 orecore repo or the orecore 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 (galactrum 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'

Contributing

See CONTRIBUTING.md on the main orecore repo for information about how to contribute.

License

Code released under the MIT license.

Copyright 2013-2015 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.

About

A module for Orecore that implements the Elliptic Curve Integrated Encryption Scheme (ECIES).

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%