42 #ifndef CRYPTOPP_NACL_H 43 #define CRYPTOPP_NACL_H 48 #if defined(NO_OS_DEPENDENCE) 49 # define CRYPTOPP_DISABLE_NACL 1 52 #ifndef CRYPTOPP_DISABLE_NACL 59 CRYPTOPP_CONSTANT(crypto_hash_BYTES = 64)
63 CRYPTOPP_CONSTANT(crypto_stream_KEYBYTES = 32)
66 CRYPTOPP_CONSTANT(crypto_stream_NONCEBYTES = 24)
70 CRYPTOPP_CONSTANT(crypto_auth_KEYBYTES = 32)
73 CRYPTOPP_CONSTANT(crypto_auth_BYTES = 16)
77 CRYPTOPP_CONSTANT(crypto_onetimeauth_KEYBYTES = 32)
80 CRYPTOPP_CONSTANT(crypto_onetimeauth_BYTES = 16)
84 CRYPTOPP_CONSTANT(crypto_secretbox_KEYBYTES = 32)
87 CRYPTOPP_CONSTANT(crypto_secretbox_NONCEBYTES = 24)
90 CRYPTOPP_CONSTANT(crypto_secretbox_ZEROBYTES = 32)
93 CRYPTOPP_CONSTANT(crypto_secretbox_BOXZEROBYTES = 16)
97 CRYPTOPP_CONSTANT(crypto_box_SECRETKEYBYTES = 32)
100 CRYPTOPP_CONSTANT(crypto_box_PUBLICKEYBYTES = 32)
103 CRYPTOPP_CONSTANT(crypto_box_NONCEBYTES = 24)
106 CRYPTOPP_CONSTANT(crypto_box_ZEROBYTES = 32)
109 CRYPTOPP_CONSTANT(crypto_box_BOXZEROBYTES = 16)
112 CRYPTOPP_CONSTANT(crypto_box_BEFORENMBYTES = 32)
117 CRYPTOPP_CONSTANT(crypto_box_MACBYTES = 16)
121 CRYPTOPP_CONSTANT(crypto_sign_SECRETKEYBYTES = 64)
124 CRYPTOPP_CONSTANT(crypto_sign_PUBLICKEYBYTES = 32)
127 CRYPTOPP_CONSTANT(crypto_sign_SEEDBYTES = 32)
130 CRYPTOPP_CONSTANT(crypto_sign_BYTES = 64)
134 CRYPTOPP_CONSTANT(crypto_scalarmult_BYTES = 32)
137 CRYPTOPP_CONSTANT(crypto_scalarmult_SCALARBYTES = 32)
150 int crypto_box(
byte *c,const
byte *m,word64 d,const
byte *n,const
byte *y,const
byte *x);
163 int crypto_box_open(
byte *m,const
byte *c,word64 d,const
byte *n,const
byte *y,const
byte *x);
234 int crypto_box_unchecked(
byte *c,const
byte *m,word64 d,const
byte *n,const
byte *y,const
byte *x);
336 int crypto_secretbox(
byte *c,const
byte *m,word64 d,const
byte *n,const
byte *k);
354 int crypto_sign(
byte *sm,word64 *smlen,const
byte *m,word64 n,const
byte *sk);
365 int crypto_sign_open(
byte *m,word64 *mlen,const
byte *sm,word64 n,const
byte *pk);
381 int crypto_stream(
byte *c,word64 d,const
byte *n,const
byte *k);
387 int crypto_stream_xor(
byte *c,const
byte *m,word64 d,const
byte *n,const
byte *k);
416 #endif // CRYPTOPP_DISABLE_NACL 417 #endif // CRYPTOPP_NACL_H int crypto_stream_xor(byte *c, const byte *m, word64 d, const byte *n, const byte *k)
Encrypt a message using XSalsa20.
int crypto_box_keypair(byte *y, byte *x)
Generate a keypair for encryption.
Namespace containing NaCl library functions.
int crypto_hash(byte *out, const byte *m, word64 n)
Hash a message.
int crypto_box_beforenm_unchecked(byte *k, const byte *y, const byte *x)
Encrypt and authenticate a message.
int crypto_hashblocks(byte *x, const byte *m, word64 n)
Hash multiple blocks.
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_core_salsa20(byte *out, const byte *in, const byte *k, const byte *c)
TODO.
int crypto_box_afternm(byte *c, const byte *m, word64 d, const byte *n, const byte *k)
Encrypt and authenticate a message.
Library configuration file.
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_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_open(byte *m, word64 *mlen, const byte *sm, word64 n, const byte *pk)
Verify a message.
int crypto_sign(byte *sm, word64 *smlen, const byte *m, word64 n, const byte *sk)
Sign a message.
int crypto_sign_keypair(byte *pk, byte *sk)
Generate a keypair for signing.
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_onetimeauth(byte *out, const byte *m, word64 n, const byte *k)
Create an authentication tag for a message.
int crypto_verify_16(const byte *x, const byte *y)
Compare 16-byte buffers.
int crypto_secretbox_open(byte *m, const byte *c, word64 d, const byte *n, const byte *k)
Verify and decrypt a message.
int crypto_verify_32(const byte *x, const byte *y)
Compare 32-byte buffers.
int crypto_stream(byte *c, word64 d, const byte *n, const byte *k)
Produce a keystream using XSalsa20.
int crypto_core_hsalsa20(byte *out, const byte *in, const byte *k, const byte *c)
TODO.
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_scalarmult_base(byte *q, const byte *n)
Scalar multiplication of base point.
Crypto++ library namespace.
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_scalarmult(byte *q, const byte *n, const byte *p)
Scalar multiplication of a point.
int crypto_box_beforenm(byte *k, const byte *y, const byte *x)
Encrypt and authenticate a message.
int crypto_secretbox(byte *c, const byte *m, word64 d, const byte *n, const byte *k)
Encrypt and authenticate a message.
int crypto_stream_salsa20(byte *c, word64 d, const byte *n, const byte *k)
Produce a keystream using Salsa20.
int crypto_onetimeauth_verify(const byte *h, const byte *m, word64 n, const byte *k)
Verify an authentication tag on a message.