JSPM

@owstack/btc-ecies

0.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q29808F
  • License MIT

ECIES support for Btc.

Package Exports

  • @owstack/btc-ecies

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@owstack/btc-ecies) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Btc ECIES

NPM Package Build Status Coverage Status

A module for btc 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 btc repo or the btc 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'

Contributing

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

License

Code released under the MIT license.

Copyright 2017 Open Wallet Stack.