Merge pull request #939 from maraoz/remove/ecies/docs
Remove ECIES docs from main repo
This commit is contained in:
commit
e72d11f14e
|
@ -1,46 +0,0 @@
|
||||||
title: ECIES
|
|
||||||
description: Uses ECIES symmetric key negotiation from public keys to encrypt arbitrarily long data streams.
|
|
||||||
---
|
|
||||||
# ECIES
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
Bitcore implements [Elliptic Curve Integrated Encryption Scheme (ECIES)](http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme), which is a public key encryption system that performs bulk encryption on data using a symmetric cipher and a random key.
|
|
||||||
|
|
||||||
For more information refer to the [bitcore-ecies](https://github.com/bitpay/bitcore-ecies) github repo.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
ECIES is implemented as a separate module and you must add it to your dependencies:
|
|
||||||
|
|
||||||
For node projects:
|
|
||||||
```
|
|
||||||
npm install bitcore-ecies --save
|
|
||||||
```
|
|
||||||
|
|
||||||
For client-side projects:
|
|
||||||
```
|
|
||||||
bower install bitcore-ecies --save
|
|
||||||
```
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```
|
|
||||||
var bitcore = require('bitcore');
|
|
||||||
var ECIES = require('bitcore-ecies');
|
|
||||||
|
|
||||||
var alicePrivateKey = new bitcore.PrivateKey();
|
|
||||||
var bobPrivateKey = new bitcore.PrivateKey();
|
|
||||||
|
|
||||||
var data = new Buffer('The is a raw data example');
|
|
||||||
|
|
||||||
// Encrypt data
|
|
||||||
var cypher1 = ECIES.privateKey(alicePrivateKey).publicKey(bobPrivateKey.publicKey);
|
|
||||||
var encrypted = cypher.encrypt(data);
|
|
||||||
|
|
||||||
// Decrypt data
|
|
||||||
var cypher2 = ECIES.privateKey(bobPrivateKey).publicKey(alicePrivateKey.publicKey);
|
|
||||||
var decrypted = cypher.decrypt(encrypted);
|
|
||||||
|
|
||||||
assert(data.toString(), decrypted.toString());
|
|
||||||
```
|
|
|
@ -34,7 +34,6 @@ To get started, just `npm install bitcore` or `bower install bitcore`.
|
||||||
## Extra
|
## Extra
|
||||||
* [Crypto](crypto.md)
|
* [Crypto](crypto.md)
|
||||||
* [Encoding](encoding.md)
|
* [Encoding](encoding.md)
|
||||||
* [ECIES](ecies.md)
|
|
||||||
|
|
||||||
## Module Development
|
## Module Development
|
||||||
* [Browser Builds](browser.md)
|
* [Browser Builds](browser.md)
|
||||||
|
|
Loading…
Reference in New Issue