50 #ifndef CRYPTOPP_NACL_H
51 #define CRYPTOPP_NACL_H
56 #if defined(NO_OS_DEPENDENCE) || !defined(OS_RNG_AVAILABLE)
57 # define CRYPTOPP_DISABLE_NACL 1
60 #ifndef CRYPTOPP_DISABLE_NACL
67 CRYPTOPP_CONSTANT(crypto_hash_BYTES = 64);
71 CRYPTOPP_CONSTANT(crypto_stream_KEYBYTES = 32);
74 CRYPTOPP_CONSTANT(crypto_stream_NONCEBYTES = 24);
78 CRYPTOPP_CONSTANT(crypto_auth_KEYBYTES = 32);
81 CRYPTOPP_CONSTANT(crypto_auth_BYTES = 16);
85 CRYPTOPP_CONSTANT(crypto_onetimeauth_KEYBYTES = 32);
88 CRYPTOPP_CONSTANT(crypto_onetimeauth_BYTES = 16);
92 CRYPTOPP_CONSTANT(crypto_secretbox_KEYBYTES = 32);
95 CRYPTOPP_CONSTANT(crypto_secretbox_NONCEBYTES = 24);
98 CRYPTOPP_CONSTANT(crypto_secretbox_ZEROBYTES = 32);
101 CRYPTOPP_CONSTANT(crypto_secretbox_BOXZEROBYTES = 16);
105 CRYPTOPP_CONSTANT(crypto_box_SECRETKEYBYTES = 32);
108 CRYPTOPP_CONSTANT(crypto_box_PUBLICKEYBYTES = 32);
111 CRYPTOPP_CONSTANT(crypto_box_NONCEBYTES = 24);
114 CRYPTOPP_CONSTANT(crypto_box_ZEROBYTES = 32);
117 CRYPTOPP_CONSTANT(crypto_box_BOXZEROBYTES = 16);
120 CRYPTOPP_CONSTANT(crypto_box_BEFORENMBYTES = 32);
125 CRYPTOPP_CONSTANT(crypto_box_MACBYTES = 16);
129 CRYPTOPP_CONSTANT(crypto_sign_SECRETKEYBYTES = 64);
132 CRYPTOPP_CONSTANT(crypto_sign_PUBLICKEYBYTES = 32);
135 CRYPTOPP_CONSTANT(crypto_sign_SEEDBYTES = 32);
138 CRYPTOPP_CONSTANT(crypto_sign_BYTES = 64);
142 CRYPTOPP_CONSTANT(crypto_scalarmult_BYTES = 32);
145 CRYPTOPP_CONSTANT(crypto_scalarmult_SCALARBYTES = 32);
158 int crypto_box(
byte *c,
const byte *m,
word64 d,
const byte *n,
const byte *y,
const byte *x);
Library configuration file.
unsigned long long word64
64-bit unsigned datatype
int crypto_stream(byte *c, word64 d, const byte *n, const byte *k)
Produce a keystream using XSalsa20.
int crypto_stream_salsa20_xor(byte *c, const byte *m, word64 b, const byte *n, const byte *k)
Encrypt a message using Salsa20.
int crypto_box_beforenm(byte *k, const byte *y, const byte *x)
Encrypt and authenticate a message.
int crypto_box_afternm(byte *c, const byte *m, word64 d, const byte *n, const byte *k)
Encrypt and authenticate a message.
int crypto_secretbox_open(byte *m, const byte *c, word64 d, const byte *n, const byte *k)
Verify and decrypt a message.
int crypto_core_salsa20(byte *out, const byte *in, const byte *k, const byte *c)
TODO.
int crypto_verify_32(const byte *x, const byte *y)
Compare 32-byte buffers.
int crypto_box_beforenm_unchecked(byte *k, const byte *y, const byte *x)
Encrypt and authenticate a message.
int crypto_stream_xor(byte *c, const byte *m, word64 d, const byte *n, const byte *k)
Encrypt a message using XSalsa20.
int crypto_core_hsalsa20(byte *out, const byte *in, const byte *k, const byte *c)
TODO.
int crypto_box_open(byte *m, const byte *c, word64 d, const byte *n, const byte *y, const byte *x)
Verify and decrypt a message.
int crypto_onetimeauth(byte *out, const byte *m, word64 n, const byte *k)
Create an authentication tag for a message.
int crypto_box_unchecked(byte *c, const byte *m, word64 d, const byte *n, const byte *y, const byte *x)
Encrypt and authenticate a message.
int crypto_sign_open(byte *m, word64 *mlen, const byte *sm, word64 n, const byte *pk)
Verify a message.
int crypto_scalarmult_base(byte *q, const byte *n)
Scalar multiplication of base point.
int crypto_hashblocks(byte *x, const byte *m, word64 n)
Hash multiple blocks.
int crypto_stream_salsa20(byte *c, word64 d, const byte *n, const byte *k)
Produce a keystream using Salsa20.
int crypto_box_open_unchecked(byte *m, const byte *c, word64 d, const byte *n, const byte *y, const byte *x)
Verify and decrypt a message.
int crypto_scalarmult(byte *q, const byte *n, const byte *p)
Scalar multiplication of a point.
int crypto_hash(byte *out, const byte *m, word64 n)
Hash a message.
int crypto_box(byte *c, const byte *m, word64 d, const byte *n, const byte *y, const byte *x)
Encrypt and authenticate a message.
int crypto_onetimeauth_verify(const byte *h, const byte *m, word64 n, const byte *k)
Verify an authentication tag on a message.
int crypto_box_open_afternm(byte *m, const byte *c, word64 d, const byte *n, const byte *k)
Verify and decrypt a message.
int crypto_sign_sk2pk(byte *pk, const byte *sk)
Calculate a public key from a secret key.
int crypto_box_keypair(byte *y, byte *x)
Generate a keypair for encryption.
int crypto_secretbox(byte *c, const byte *m, word64 d, const byte *n, const byte *k)
Encrypt and authenticate a message.
int crypto_sign_keypair(byte *pk, byte *sk)
Generate a keypair for signing.
int crypto_verify_16(const byte *x, const byte *y)
Compare 16-byte buffers.
int crypto_sign(byte *sm, word64 *smlen, const byte *m, word64 n, const byte *sk)
Sign a message.
Crypto++ library namespace.
Namespace containing NaCl library functions.