-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ed25519 signing and verification using a Curve25519 key-pair #1239
Conversation
…d verification using a Curve25519 key-pair.
Thanks! It will take a while for me to review this. In the meantime can you check the CI failures, and also reformat? It appears some functions (like ge_scalarmult_base) got reindented. So it is hard to see what actually changed. There is a configuration for the |
yes; I'll be taking a look into these matters. |
Codecov Report
@@ Coverage Diff @@
## master #1239 +/- ##
==========================================
- Coverage 92.29% 91.97% -0.32%
==========================================
Files 547 752 +205
Lines 59470 45131 -14339
Branches 6262 5217 -1045
==========================================
- Hits 54888 41510 -13378
+ Misses 4582 3587 -995
- Partials 0 34 +34
Continue to review full report at Codecov.
|
@rafalsk Sorry about taking so long to review this. Big concern, do we even want this in the library? This is a documented approach for signing with x25519 (https://moderncrypto.org/mail-archive/curves/2014/000205.html) but is it implemented by any other library? If we're going to offer such conversions, going in the ed25519 to x25519 direction seems simpler and is implemented by libsodium (https://download.libsodium.org/doc/advanced/ed25519-curve25519.html) and its various wrappers. That's especially a concern as (AIUI) this signing approach is not compatible with standard Ed25519 signatures (please correct me If I'm wrong about this.) Assuming we do want it in the library:
There are also minor style things (used of C APIs like malloc+free, not using stdint typedefs) but no point addressing those until the larger issues are cleared up. |
Yes, yes we do want this into the library; It is a hot feature. None has it - we got it. The proliferation of x25519 keys seems to be much higher; I know I could go the easier way doing ed25519 to x25519. I hear you in regard to all 3 points you've made. I'll document everything in detail and implement all the tests etc. - at the beginning of January; I'm too busy right now. Hope to make it during the first week. |
These kind of signatures are used for example at @wavesplatform and it is true that it is hard to find a comprehensive solution to implement a full stack of crypto things by a single library. |
I'm still on the subject. I'll try to find time to document and rationalize everything which has been implemented by me here in weeks to follow. I already do use the proposed functionality. |
Just tried your Secondly, |
@deemru there was a reason; I promise to dive into this in days to follow. We'll need to bring this into production on hardware devices soon; so I'll need to verify this once again. |
Codecov Report
@@ Coverage Diff @@
## master #1239 +/- ##
==========================================
+ Coverage 91.79% 91.97% +0.17%
==========================================
Files 752 752
Lines 45021 45131 +110
Branches 5204 5217 +13
==========================================
+ Hits 41329 41510 +181
+ Misses 3658 3587 -71
Partials 34 34
Continue to review full report at Codecov.
|
The thing is at the heart of our project https://twitter.com/gridnetproject, it's been all validated, we've got a version upgraded to the recent version of Botan running locally, as soon as I find some time I'll update this. never failed on us, passing all tests. |
Supplanted by #2774 |
Implemented functionallity which allows to perform ed25519 signing and verification using a Curve25519 key-pair.
Usage:
`
//sign
Botan::PK_Signer signer(prevPrivKey25519, rng, "Pure");
signer.update(msgv);
std::vector<uint8_t> signature2 = signer.signature(rng);