src/ed25519/keypair.c

filter: Statementstmt 0.0% 0 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 10 SCAR 0
CC
0
Cov
0%
CRAP 0
« src/ed25519/ge.c ↑ Summary src/ed25519/sc.c »
1 #include <string.h>
2 #include "ed25519.h"
3 #include "sha512.h"
4 #include "ge.h"
5  
6  
7 0 void ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed) {
8 ge_p3 A;
9  
10 0 sha512(seed, 32, private_key);
11 0 private_key[0] &= 248;
12 0 private_key[31] &= 63;
13 0 private_key[31] |= 64;
14  
15 0 ge_scalarmult_base(&A, private_key);
16 0 ge_p3_tobytes(public_key, &A);
17  
18 0 memmove(private_key, seed, 32);
19 0 memmove(private_key + 32, public_key, 32);
20 0 }
« src/ed25519/ge.c ↑ Summary src/ed25519/sc.c »