Overview
Comment: | Added patch to allow deriving the public key component from a secret key |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f08c39c4fee372be255f3c198f8d104f |
User & Date: | rkeene on 2018-07-01 20:06:02 |
Other Links: | manifest | tags |
Context
2018-07-01
| ||
20:48 | Added start of additional internal functions check-in: eb360ae2a4 user: rkeene tags: trunk | |
20:06 | Added patch to allow deriving the public key component from a secret key check-in: f08c39c4fe user: rkeene tags: trunk | |
2018-06-30
| ||
13:13 | More work on an internal signing function check-in: 8e2b1497b3 user: rkeene tags: trunk | |
Changes
Modified tweetnacl/Makefile from [9ef12a428e] to [c444485edc].
1 2 3 4 5 6 7 8 9 10 | all: tweetnacl.o tweetnacl.h.new: src/tweetnacl.h rm -f tweetnacl.h.new tweetnacl.h cp src/tweetnacl.h tweetnacl.h.new tweetnacl.c.new: src/tweetnacl.c rm -f tweetnacl.c.new tweetnacl.c cp src/tweetnacl.c tweetnacl.c.new | | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | all: tweetnacl.o tweetnacl.h.new: src/tweetnacl.h rm -f tweetnacl.h.new tweetnacl.h cp src/tweetnacl.h tweetnacl.h.new tweetnacl.c.new: src/tweetnacl.c rm -f tweetnacl.c.new tweetnacl.c cp src/tweetnacl.c tweetnacl.c.new tweetnacl.c: tweetnacl.c.new tweetnacl.h.new patches/tweetnacl-supercop.diff patches/tweetnacl-derivepubkey.diff rm -f tweetnacl.c tweetnacl.h patch -p1 < patches/tweetnacl-supercop.diff || ( rm -f tweetnacl.c.new tweetnacl.h.new; exit 1 ) patch -p1 < patches/tweetnacl-derivepubkey.diff || ( rm -f tweetnacl.c.new tweetnacl.h.new; exit 1 ) mv tweetnacl.h.new tweetnacl.h mv tweetnacl.c.new tweetnacl.c tweetnacl.h: tweetnacl.c tweetnacl.o: tweetnacl.c tweetnacl.h $(CC) $(CPPFLAGS) $(CFLAGS) -DSUPERCOP=1 -I../blake2b/ -o tweetnacl.o -c tweetnacl.c |
︙ | ︙ |
Added tweetnacl/patches/tweetnacl-derivepubkey.diff version [22ab288973].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | --- a/tweetnacl.c.new +++ b/tweetnacl.c.new @@ -653,13 +653,15 @@ scalarmult(p,q,s); } -int crypto_sign_keypair(u8 *pk, u8 *sk) +int crypto_sign_keypair(u8 *pk, u8 *sk, u8 generate_sk) { u8 d[64]; gf p[4]; int i; - randombytes(sk, 32); + if (generate_sk) { + randombytes(sk, 32); + } crypto_hash(d, sk, 32); d[0] &= 248; d[31] &= 127; --- a/tweetnacl.h.new +++ b/tweetnacl.h.new @@ -211,7 +211,7 @@ #define crypto_sign_ed25519_tweet_SECRETKEYBYTES 64 extern int crypto_sign_ed25519_tweet(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *); extern int crypto_sign_ed25519_tweet_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *); -extern int crypto_sign_ed25519_tweet_keypair(unsigned char *,unsigned char *); +extern int crypto_sign_ed25519_tweet_keypair(unsigned char *,unsigned char *, unsigned char); #define crypto_sign_ed25519_tweet_VERSION "-" #define crypto_sign_ed25519 crypto_sign_ed25519_tweet #define crypto_sign_ed25519_open crypto_sign_ed25519_tweet_open |