blob: 7ba6b4c3e5c9c0e4f25ba517267c577d14c1a99a (
plain)
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
32
33
34
35
36
37
38
39
|
#include <string.h>
#include "crypto_sign_ed25519.h"
size_t
crypto_sign_ed25519_bytes(void) {
return crypto_sign_ed25519_BYTES;
}
size_t
crypto_sign_ed25519_seedbytes(void) {
return crypto_sign_ed25519_SEEDBYTES;
}
size_t
crypto_sign_ed25519_publickeybytes(void) {
return crypto_sign_ed25519_PUBLICKEYBYTES;
}
size_t
crypto_sign_ed25519_secretkeybytes(void) {
return crypto_sign_ed25519_SECRETKEYBYTES;
}
int
crypto_sign_ed25519_sk_to_seed(unsigned char *seed, const unsigned char *sk)
{
memmove(seed, sk, crypto_sign_ed25519_SEEDBYTES);
return 0;
}
int
crypto_sign_ed25519_sk_to_pk(unsigned char *pk, const unsigned char *sk)
{
memmove(pk, sk + crypto_sign_ed25519_SEEDBYTES,
crypto_sign_ed25519_PUBLICKEYBYTES);
return 0;
}
|