aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ed25519/ed25519.h
blob: 86740b4f4d0d7f05124873ec024d15943d3dd90d (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
/*
* Ed25519
* (C) 2017 Ribose Inc
*
* Based on the public domain code from SUPERCOP ref10 by
* Peter Schwabe, Daniel J. Bernstein, Niels Duif, Tanja Lange, Bo-Yin Yang
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#ifndef BOTAN_ED25519_H__
#define BOTAN_ED25519_H__

#include <botan/types.h>

namespace Botan {

int ed25519_gen_keypair(uint8_t pk[32], uint8_t sk[64], const uint8_t seed[32]);

int ed25519_sign(uint8_t sig[64],
                 const uint8_t msg[],
                 size_t msg_len,
                 const uint8_t sk[64]);

int ed25519_verify(const uint8_t msg[],
                   size_t msg_len,
                   const uint8_t sig[64],
                   const uint8_t pk[32]);

}

#endif