Comments (17)
What you want is called http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme . I think we have at least one module mentioned in readme of elliptic.
Please let me know if there is anything else I could help you with.
from elliptic.
Think you misunderstood me as I am only talking about ECC encryption with a public private key pair when using the ed25519 curve. E.g. not symmetric encryption and then public private encryption as under the Integrated Encryption Scheme.
I am not using the ed25519 curve for signing - but all info on the web states the ed25519 curve is used for signing. No where is there any info about using the ed25519 curve for ECDH.
I have tested that it works fine with your library but think my question is if this is then secure?
from elliptic.
Also see my question here:
http://stackoverflow.com/questions/28795706/ed25519-ecdh-encryption-possible-and-safe
from elliptic.
I think it should be possible, though, you'll need to use curve25519
and ed25519
for ECDSA and ECDH.
from elliptic.
Regarding security - there are tons of side-channel leaks, but other than that - there should not be other problems.
from elliptic.
OK - for now I will then use seperate curves for encryption and signing!
BTW: Why do this code fail when I select curve25519 (works fine for ed25519)?
var eccdh = new ellipticjs.ec('curve25519');
var asymkeysdh;
asymkeysdh = eccdh.genKeyPair();
var keypublicdh = asymkeysdh.getPublic(true, 'hex');
It fails because getY is undefined here:
if (compact) {
var res = [ this.pub.getY().isEven() ? 0x02 : 0x03 ].concat(x);
} else {
var y = this.pub.getY().toArray();
from elliptic.
It doesn't fail for me, what elliptic version are you using?
from elliptic.
Will test with the latest version ASAP.
BTW: What is the diff between the small and big distribution?
from elliptic.
small distribution does not include precomputed points for sepc256k1 curve. Technically they could be computed in runtime, but it takes some time and it might be useful for bitcoin apps to just distribute it with precomputed points.
from elliptic.
Have now testet the latest version 3.03 with the same result => getY is not defined.
Please note that I run it directly in the browser and just took the file elliptic,js from the dist folder!
from elliptic.
Don't know whether that's the reason for the problem you're having. But the Ed25519 private "key" is actually a "key seed" that's used to derive the private and public keys (internally). Benefit for that is that it's impossible to actually choose an illegal key (e. g. not adhering to the pre-defined bit mask on the first/last few bits as Curve25519 uses).
from elliptic.
Do not think that is the problem here. I actually had some problems to understand the concept to begin with ;-)
from elliptic.
@beastybeast exactly this code works for me in a browser too.
from elliptic.
I have now done some testing with the code and it works in Firefox but does not work in Chrome (Chromium) where getY is undefined - very strange!
Testing is done under Ubuntu 14.10 (64 bit), FF 36, Chromium Version 40.0.2214.11
from elliptic.
Now testet under Windows 8.1 and both IE, FF and Chrome works fine.
So the only problem is my development platform Chromium Version 40.0.2214.11 under Ubuntu 14.10 (64 bit)
NB: Have not tested Chromium under Windows!
from elliptic.
Chromium version 43.0.2325.0 works under Windows 8.1 (64 bit)
So the conclusion must be that there is a bug in Chromium Version 40.0.2214.11 - strange error!
Will try to upgrade my Chromium Linux version and see if it helps!
from elliptic.
Installed Chrome Version 41.0.2272.76 (64-bit) and it works fine under Ubuntu!
from elliptic.
Related Issues (20)
- ec.Signature is not fully available in Typescript
- How to format a PHP-OpenSSL signature to be verifiable with elliptic? HOT 1
- Convert signature to base64 HOT 1
- Curve25519 Derivation doesn't work against RFC test Vector
- ⚠️ BN.toString(16) can result in wrong output ([email protected]) HOT 1
- Custom Curves HOT 1
- recoverPubKey accepts invalid signatures for recovery
- How to convert a DER-formatted signature back to a Signature object? HOT 1
- KeyPair.fromPublic: returns a KeyPair?
- How to create an ec.Signature instance from r,s in typescript
- I seem to get a wrong signature when using 'secp256k1' HOT 1
- Why hasn't this software been updated after 2021 years? HOT 1
- Feature request: support ed448 HOT 1
- How does point comparison work for the identity / point at infinity?
- Feature Request: Support for Secp256r1
- [FEATURE] Need equivalent of secp256k1_ec_seckey_tweak_add
- v6.5.2 has a breaking change HOT 1
- Regular expression injection - (ReDos)
- Elliptic's EDDSA missing signature length check HOT 2
- Dependabot alerts being raised for elliptic HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elliptic.