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
67CRYPTOPP_CONSTANT(crypto_hash_BYTES = 64);
71CRYPTOPP_CONSTANT(crypto_stream_KEYBYTES = 32);
74CRYPTOPP_CONSTANT(crypto_stream_NONCEBYTES = 24);
78CRYPTOPP_CONSTANT(crypto_auth_KEYBYTES = 32);
81CRYPTOPP_CONSTANT(crypto_auth_BYTES = 16);
85CRYPTOPP_CONSTANT(crypto_onetimeauth_KEYBYTES = 32);
88CRYPTOPP_CONSTANT(crypto_onetimeauth_BYTES = 16);
92CRYPTOPP_CONSTANT(crypto_secretbox_KEYBYTES = 32);
95CRYPTOPP_CONSTANT(crypto_secretbox_NONCEBYTES = 24);
98CRYPTOPP_CONSTANT(crypto_secretbox_ZEROBYTES = 32);
101CRYPTOPP_CONSTANT(crypto_secretbox_BOXZEROBYTES = 16);
105CRYPTOPP_CONSTANT(crypto_box_SECRETKEYBYTES = 32);
108CRYPTOPP_CONSTANT(crypto_box_PUBLICKEYBYTES = 32);
111CRYPTOPP_CONSTANT(crypto_box_NONCEBYTES = 24);
114CRYPTOPP_CONSTANT(crypto_box_ZEROBYTES = 32);
117CRYPTOPP_CONSTANT(crypto_box_BOXZEROBYTES = 16);
120CRYPTOPP_CONSTANT(crypto_box_BEFORENMBYTES = 32);
125CRYPTOPP_CONSTANT(crypto_box_MACBYTES = 16);
129CRYPTOPP_CONSTANT(crypto_sign_SECRETKEYBYTES = 64);
132CRYPTOPP_CONSTANT(crypto_sign_PUBLICKEYBYTES = 32);
135CRYPTOPP_CONSTANT(crypto_sign_SEEDBYTES = 32);
138CRYPTOPP_CONSTANT(crypto_sign_BYTES = 64);
142CRYPTOPP_CONSTANT(crypto_scalarmult_BYTES = 32);
145CRYPTOPP_CONSTANT(crypto_scalarmult_SCALARBYTES = 32);
158int crypto_box(
byte *c,
const byte *m,
word64 d,
const byte *n,
const byte *y,
const byte *x);
171int crypto_box_open(
byte *m,
const byte *c,
word64 d,
const byte *n,
const byte *y,
const byte *x);
179int crypto_box_keypair(
byte *y,
byte *x);
190int crypto_box_beforenm(
byte *k,
const byte *y,
const byte *x);
204int crypto_box_afternm(
byte *c,
const byte *m,
word64 d,
const byte *n,
const byte *k);
218int crypto_box_open_afternm(
byte *m,
const byte *c,
word64 d,
const byte *n,
const byte *k);
291int crypto_core_salsa20(
byte *out,
const byte *in,
const byte *k,
const byte *c);
296int crypto_core_hsalsa20(
byte *out,
const byte *in,
const byte *k,
const byte *c);
303int crypto_hashblocks(
byte *x,
const byte *m,
word64 n);
310int crypto_hash(
byte *out,
const byte *m,
word64 n);
317int crypto_onetimeauth(
byte *out,
const byte *m,
word64 n,
const byte *k);
323int crypto_onetimeauth_verify(
const byte *h,
const byte *m,
word64 n,
const byte *k);
330int crypto_scalarmult(
byte *q,
const byte *n,
const byte *p);
337int crypto_scalarmult_base(
byte *q,
const byte *n);
344int crypto_secretbox(
byte *c,
const byte *m,
word64 d,
const byte *n,
const byte *k);
350int crypto_secretbox_open(
byte *m,
const byte *c,
word64 d,
const byte *n,
const byte *k);
362int crypto_sign(
byte *sm,
word64 *smlen,
const byte *m,
word64 n,
const byte *sk);
373int crypto_sign_open(
byte *m,
word64 *mlen,
const byte *sm,
word64 n,
const byte *pk);
382int crypto_sign_keypair(
byte *pk,
byte *sk);
402int crypto_stream(
byte *c,
word64 d,
const byte *n,
const byte *k);
408int crypto_stream_xor(
byte *c,
const byte *m,
word64 d,
const byte *n,
const byte *k);
414int crypto_stream_salsa20(
byte *c,
word64 d,
const byte *n,
const byte *k);
420int crypto_stream_salsa20_xor(
byte *c,
const byte *m,
word64 b,
const byte *n,
const byte *k);
426int crypto_verify_16(
const byte *x,
const byte *y);
432int crypto_verify_32(
const byte *x,
const byte *y);
Library configuration file.
unsigned long long word64
64-bit unsigned datatype
int crypto_box_beforenm_unchecked(byte *k, const byte *y, const byte *x)
Encrypt and authenticate 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_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_sign_sk2pk(byte *pk, const byte *sk)
Calculate a public key from a secret key.
Crypto++ library namespace.
Namespace containing NaCl library functions.