Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This is an implementation of RFC 6637 to partially fix issue #427.
A few remarks of the code:
It was tested against GnuPG version v2.1.8 + libgcrypt v1.7.0-beta262, some other details are in the pull request README-ECC.md.
referenced this pull request
Mar 23, 2017
Replying to @sanjanarajan who asked why did I choose an external AES library. In order to support ECDH We've to implement key wrapping algorithm from RFC 3394 which uses AES encrypt and AES decrypt functions.
At the time the repository didn't have AES decrypt only AES encrypt was present (https://github.com/Jaxx-io/openpgpjs/blob/issue/427/src/crypto/cipher/aes.js), so we use the fast and light implementation from https://github.com/cryptocoinjs/aes. Before sending our pull request v2.0 was released with the new addition of asmcrypt-lite I did try to use AES decrypt from there but was unsuccessful. So we send our pull request with the annotation that the additional dependency can be removed if AES decrypt was made available to use.
@sanjanarajan i'm noticing that you are try to move forward the ECC implementation.
that is great! i'm interested to help retesting this and eventually study with you the possible adoption of WebCrypto as backend. are you already evaluating this possible backend alternative in your current implementation?
@evilaliv3 Yes, my current plan is to use a WebCrypto backend for the curves for which it is available, fall back to a Node Crypto backend when available, and use the elliptic backend as the last option. I have also done some refactoring to address the structure/style issues detailed in the previous comments. I am hoping to make a new pull request in the next week, looking forward to your feedback!