From 26070c7fa6dca3fb3736b6dd969ddb23d115f04b Mon Sep 17 00:00:00 2001 From: Kagami Hiiragi Date: Sun, 28 Dec 2014 19:16:40 +0300 Subject: [PATCH] Reorganize README sections --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 485d32b..320c3c1 100644 --- a/README.md +++ b/README.md @@ -11,32 +11,32 @@ There is currently no any isomorphic ECC library which provides ECDSA, ECDH and - [ ] ECDH - [ ] ECIES -Implementation details: +## Implementation details + +With the help of browserify `eccrypto` provides different implementations for Browser and Node.js with the same API. Because WebCryptoAPI defines asynchronous promise-driven API, implementation for Node needs to use promises too. * Use Node.js crypto module/library bindings where possible * Use WebCryptoAPI where possible * Promise-driven API * Only secp256k1 curve, only HMAC-SHA-256 and AES-256-CBC for ECIES -Possible future goals: +### Native crypto API limitations -* Support other curves/KDF/MAC/symmetric encryption schemes - -## Native crypto API limitations - -### crypto +#### crypto ECDH only works in Node 0.11+ (see https://github.com/joyent/node/pull/5854), ECDSA is only supported when keys are in PEM format (see https://github.com/joyent/node/issues/6904) and ECIES is not supported at all. -### WebCryptoAPI +#### WebCryptoAPI ECDSA and ECDH are supported in Chrome [only on Windows](https://sites.google.com/a/chromium.org/dev/blink/webcrypto#TOC-Supported-algorithms-as-of-Chrome-41-) (see also [bug 338883](https://code.google.com/p/chromium/issues/detail?id=338883)), aren't supported by Firefox (fixed only in 36.0+, see [bug 1034854](https://bugzilla.mozilla.org/show_bug.cgi?id=1034854)) and ECIES is not defined at all in WebCryptoAPI draft. Also WebCryptoAPI [currently defines](http://www.w3.org/TR/WebCryptoAPI/#EcKeyGenParams-dictionary) only curves recommended by NIST which means that secp256k1 is not supported (see also: [[1]](http://lists.w3.org/Archives/Public/public-webcrypto-comments/2013Dec/0001.html), [[2]](https://bugzilla.mozilla.org/show_bug.cgi?id=1051509)). So we use [seck256k1](https://www.npmjs.com/package/secp256k1) library in Node for ECDSA, [elliptic](https://www.npmjs.com/package/elliptic) in Browser for ECDSA and ECDH and implement ECIES manually with the help of native crypto API. -## Usage +## Possible future goals -With the help of browserify `eccrypto` provides different implementations for Browser and Node.js with the same API. Because WebCryptoAPI defines asynchronous promise-driven API, implementation for Node needs to use promises too. +* Support other curves/KDF/MAC/symmetric encryption schemes + +## Usage ```js var crypto = require("crypto");