Comments (5)
Sorry for the late response. I finally got around to checking this. ed25519_sign
is not significantly different from SUPERCOP's ref10, I simply have a different representation of the private key.
ref10 stores the private key by storing the seed (32 bytes) and public key (32 bytes) as the 'private key'.
I instead straight up store the hashed seed (64 bytes) as the private key to not have to re-hash the seed on every sign operation.
So if you simply use the 64 bytes from the ref10 'private key' as the private key in this library you will end up with incorrect results.
If you wish to convert a ref10 private key to a private key for this library you can use:
void ref10_to_lib(unsigned char *private_key, const unsigned char *ref10_private_key) {
sha512(ref10_private_key, 32, private_key);
private_key[0] &= 248;
private_key[31] &= 63;
private_key[31] |= 64;
}
from ed25519.
@orlp Is it worth putting some info about this prominently on the main README.md? This tripped me up for quite a while, until I dug into closed issues. I imagine a lot of people will expect this to play nicely with other implementations.
(Note: I completely understand why you do what you do, but it may be missed by many).
from ed25519.
@rdeker Please share any ideas and work. That will help everyone involved :-)
from ed25519.
I've forked this project and have one with a couple of fixes available at https://github.com/rdeker/ed25519 . To date I haven't heard anything in response to my pull request.
from ed25519.
See also this previous question about this exact topic: #1 (comment)
from ed25519.
Related Issues (18)
- Get public key (and seed) from private key HOT 3
- Possible issues regarding signed to unsigned conversions. HOT 3
- Some patches before deletion of fork branches
- Secret key generation HOT 1
- Multisig HOT 1
- Why private_key 64 bits? HOT 1
- key recovery from protocols using ed25519_add_scalar HOT 6
- ed25519 decode / decompress
- ed25519_add_scalar and DH key exchange
- why private_key + 32 in sign.c HOT 1
- ed25519 private key should be 32 bytes long. HOT 2
- β οΈ Caution when using this library: The private keys are incompatible with other ed25519 implementations. HOT 2
- ge_madd and ge_add difference HOT 1
- Inconsistent signature results HOT 1
- vcpkg release ; request to use `#include <ed25519/`
- 2nd hexadecimal number of private key
- common/gv_sdcard_update/device/ed25519/src/fe.h:16:9: error: unknown type name βint32_tβ typedef int32_t fe[10];
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 ed25519.