7#ifndef BOTAN_SODIUM_COMPAT_H_
8#define BOTAN_SODIUM_COMPAT_H_
10#include <botan/types.h>
153 return "Botan Sodium Compat";
191int sodium_compare(const uint8_t x[], const uint8_t y[],
size_t len);
200void sodium_add(uint8_t a[], const uint8_t
b[],
size_t len);
272 uint8_t ctext[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]);
276 uint8_t ptext[], const uint8_t ctext[],
size_t ctext_len, const uint8_t nonce[], const uint8_t key[]);
309 return "xsalsa20poly1305";
314 uint8_t ctext[], uint8_t mac[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]);
318 const uint8_t ctext[],
321 const uint8_t nonce[],
322 const uint8_t key[]);
325 uint8_t ctext[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]) {
330 uint8_t out[],
const uint8_t ctext[],
size_t ctext_len,
const uint8_t nonce[],
const uint8_t key[]) {
352 uint8_t ctext[],
const uint8_t ptext[],
size_t ptext_len,
const uint8_t nonce[],
const uint8_t key[]) {
357 uint8_t ptext[],
const uint8_t ctext[],
size_t ctext_len,
const uint8_t nonce[],
const uint8_t key[]) {
385 unsigned long long* ctext_len,
386 const uint8_t ptext[],
390 const uint8_t unused_secret_nonce[],
391 const uint8_t nonce[],
392 const uint8_t key[]);
396 unsigned long long* ptext_len,
397 uint8_t unused_secret_nonce[],
398 const uint8_t ctext[],
402 const uint8_t nonce[],
403 const uint8_t key[]);
408 unsigned long long* mac_len,
409 const uint8_t ptext[],
413 const uint8_t unused_secret_nonce[],
414 const uint8_t nonce[],
415 const uint8_t key[]);
419 uint8_t unused_secret_nonce[],
420 const uint8_t ctext[],
425 const uint8_t nonce[],
426 const uint8_t key[]);
454 unsigned long long* ctext_len,
455 const uint8_t ptext[],
459 const uint8_t unused_secret_nonce[],
460 const uint8_t nonce[],
461 const uint8_t key[]);
465 unsigned long long* ptext_len,
466 uint8_t unused_secret_nonce[],
467 const uint8_t ctext[],
471 const uint8_t nonce[],
472 const uint8_t key[]);
477 unsigned long long* mac_len,
478 const uint8_t ptext[],
482 const uint8_t unused_secret_nonce[],
483 const uint8_t nonce[],
484 const uint8_t key[]);
488 uint8_t unused_secret_nonce[],
489 const uint8_t ctext[],
494 const uint8_t nonce[],
495 const uint8_t key[]);
525 unsigned long long* ctext_len,
526 const uint8_t ptext[],
530 const uint8_t unused_secret_nonce[],
531 const uint8_t nonce[],
532 const uint8_t key[]);
536 unsigned long long* ptext_len,
537 uint8_t unused_secret_nonce[],
538 const uint8_t ctext[],
542 const uint8_t nonce[],
543 const uint8_t key[]);
548 unsigned long long* mac_len,
549 const uint8_t ptext[],
553 const uint8_t unused_secret_nonce[],
554 const uint8_t nonce[],
555 const uint8_t key[]);
559 uint8_t unused_secret_nonce[],
560 const uint8_t ctext[],
565 const uint8_t nonce[],
566 const uint8_t key[]);
621 const uint8_t ptext[],
623 const uint8_t nonce[],
624 const uint8_t pk[32],
625 const uint8_t sk[32]);
629 const uint8_t ctext[],
631 const uint8_t nonce[],
632 const uint8_t pk[32],
633 const uint8_t sk[32]);
636 uint8_t ctext[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]) {
641 uint8_t ptext[],
const uint8_t ctext[],
size_t ctext_len,
const uint8_t nonce[],
const uint8_t key[]) {
676 return "curve25519xsalsa20poly1305";
690 const uint8_t ptext[],
692 const uint8_t nonce[],
693 const uint8_t pk[32],
694 const uint8_t sk[32]);
698 const uint8_t ctext[],
701 const uint8_t nonce[],
702 const uint8_t pk[32],
703 const uint8_t sk[32]);
706 const uint8_t ptext[],
708 const uint8_t nonce[],
709 const uint8_t pk[32],
710 const uint8_t sk[32]) {
715 const uint8_t ctext[],
717 const uint8_t nonce[],
718 const uint8_t pk[32],
719 const uint8_t sk[32]) {
733 uint8_t ctext[],
const uint8_t ptext[],
size_t ptext_len,
const uint8_t nonce[],
const uint8_t key[]) {
738 uint8_t ptext[],
const uint8_t ctext[],
size_t ctext_len,
const uint8_t nonce[],
const uint8_t key[]) {
743 const uint8_t ctext[],
746 const uint8_t nonce[],
747 const uint8_t key[]) {
752 uint8_t ptext[],
const uint8_t ctext[],
size_t ctext_len,
const uint8_t nonce[],
const uint8_t key[]) {
763 const uint8_t ptext[],
765 const uint8_t nonce[],
766 const uint8_t key[]) {
771 uint8_t ctext[],
const uint8_t ptext[],
size_t ptext_len,
const uint8_t nonce[],
const uint8_t key[]) {
784 const uint8_t ptext[],
786 const uint8_t nonce[],
787 const uint8_t pk[32],
788 const uint8_t sk[32]) {
793 const uint8_t ctext[],
795 const uint8_t nonce[],
796 const uint8_t pk[32],
797 const uint8_t sk[32]) {
861 return "hmacsha512256";
864inline int crypto_auth(uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t key[]) {
868inline int crypto_auth_verify(
const uint8_t mac[],
const uint8_t in[],
size_t in_len,
const uint8_t key[]) {
924 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]);
928 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[]);
953int
crypto_core_hsalsa20(uint8_t out[], const uint8_t in[], const uint8_t key[], const uint8_t c[]);
961inline int crypto_hash(uint8_t out[],
const uint8_t in[],
size_t in_len) {
1042 return "curve25519";
1072 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]);
1076 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[]);
1099 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]);
1103 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], uint32_t ic, const uint8_t key[]);
1128 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]);
1132 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[]);
1153int
crypto_stream_salsa20(uint8_t out[],
size_t ctext_len, const uint8_t nonce[], const uint8_t key[]);
1157 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], const uint8_t key[]);
1161 uint8_t out[], const uint8_t ptext[],
size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[]);
1185inline int crypto_stream(uint8_t out[],
size_t out_len,
const uint8_t nonce[24],
const uint8_t key[32]) {
1190 uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t nonce[24],
const uint8_t key[32]) {
1225inline int crypto_shorthash(uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t k[16]) {
1257 uint8_t sig[],
unsigned long long* sig_len, const uint8_t msg[],
size_t msg_len, const uint8_t sk[32]);
1303 uint8_t sig[],
unsigned long long* sig_len,
const uint8_t msg[],
size_t msg_len,
const uint8_t sk[32]) {
#define BOTAN_PUBLIC_API(maj, min)
size_t crypto_box_curve25519xsalsa20poly1305_secretkeybytes()
size_t crypto_secretbox_xsalsa20poly1305_messagebytes_max()
const char * crypto_shorthash_primitive()
int crypto_box_curve25519xsalsa20poly1305_seed_keypair(uint8_t pk[32], uint8_t sk[32], const uint8_t seed[32])
void crypto_onetimeauth_poly1305_keygen(uint8_t k[32])
size_t crypto_secretbox_xsalsa20poly1305_zerobytes()
size_t crypto_sign_messagebytes_max()
size_t crypto_core_hsalsa20_outputbytes()
size_t crypto_stream_xchacha20_keybytes()
size_t crypto_onetimeauth_poly1305_keybytes()
size_t crypto_shorthash_bytes()
size_t crypto_scalarmult_scalarbytes()
int crypto_aead_xchacha20poly1305_ietf_decrypt(uint8_t ptext[], unsigned long long *ptext_len, uint8_t unused_secret_nonce[], const uint8_t ctext[], size_t ctext_len, const uint8_t ad[], size_t ad_len, const uint8_t nonce[], const uint8_t key[])
void crypto_secretbox_xsalsa20poly1305_keygen(uint8_t k[32])
size_t crypto_box_curve25519xsalsa20poly1305_beforenmbytes()
size_t crypto_sign_bytes()
int crypto_stream_xchacha20_xor(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_stream_salsa20_keybytes()
int crypto_secretbox(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_onetimeauth_bytes()
void crypto_auth_hmacsha256_keygen(uint8_t k[32])
size_t crypto_aead_xchacha20poly1305_ietf_keybytes()
size_t crypto_stream_chacha20_noncebytes()
const char * crypto_auth_primitive()
const char * crypto_secretbox_primitive()
size_t crypto_aead_chacha20poly1305_ietf_nsecbytes()
int crypto_box_curve25519xsalsa20poly1305_beforenm(uint8_t key[], const uint8_t pk[32], const uint8_t sk[32])
int crypto_box_curve25519xsalsa20poly1305_open_afternm(uint8_t ptext[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_box_curve25519xsalsa20poly1305_keypair(uint8_t pk[32], uint8_t sk[32])
size_t crypto_sign_seedbytes()
const char * randombytes_implementation_name()
int crypto_box_open_detached(uint8_t ptext[], const uint8_t ctext[], const uint8_t mac[], size_t ctext_len, const uint8_t nonce[], const uint8_t pk[32], const uint8_t sk[32])
int crypto_secretbox_open_easy(uint8_t out[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_hash_sha256(uint8_t out[], const uint8_t in[], size_t in_len)
uint32_t randombytes_random()
int crypto_stream_chacha20_ietf_xor(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_stream_chacha20_keybytes()
int crypto_auth_verify(const uint8_t mac[], const uint8_t in[], size_t in_len, const uint8_t key[])
int crypto_verify_32(const uint8_t x[32], const uint8_t y[32])
int crypto_box_curve25519xsalsa20poly1305_open(uint8_t ptext[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t pk[32], const uint8_t sk[32])
size_t crypto_scalarmult_curve25519_scalarbytes()
int crypto_box_open_detached_afternm(uint8_t ptext[], const uint8_t ctext[], const uint8_t mac[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_auth_hmacsha512(uint8_t out[], const uint8_t in[], size_t in_len, const uint8_t key[])
int crypto_box_easy(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t pk[32], const uint8_t sk[32])
int crypto_stream_salsa20(uint8_t out[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_aead_chacha20poly1305_decrypt(uint8_t m[], unsigned long long *ptext_len, uint8_t unused_secret_nonce[], const uint8_t ctext[], size_t ctext_len, const uint8_t ad[], size_t ad_len, const uint8_t nonce[], const uint8_t key[])
int crypto_verify_16(const uint8_t x[16], const uint8_t y[16])
size_t crypto_aead_xchacha20poly1305_ietf_messagebytes_max()
const char * crypto_scalarmult_primitive()
void crypto_aead_chacha20poly1305_ietf_keygen(uint8_t k[32])
const char * crypto_sign_primitive()
size_t crypto_box_macbytes()
int crypto_box_open_easy_afternm(uint8_t ptext[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_core_hsalsa20_keybytes()
int crypto_box_open(uint8_t ptext[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t pk[32], const uint8_t sk[32])
int crypto_aead_chacha20poly1305_decrypt_detached(uint8_t m[], uint8_t unused_secret_nonce[], const uint8_t ctext[], size_t ctext_len, const uint8_t mac[], const uint8_t ad[], size_t ad_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_stream_xsalsa20_noncebytes()
int crypto_aead_chacha20poly1305_ietf_encrypt_detached(uint8_t ctext[], uint8_t mac[], unsigned long long *mac_len, const uint8_t ptext[], size_t ptext_len, const uint8_t ad[], size_t ad_len, const uint8_t unused_secret_nonce[], const uint8_t nonce[], const uint8_t key[])
size_t crypto_auth_hmacsha256_bytes()
void * sodium_allocarray(size_t count, size_t size)
size_t crypto_aead_chacha20poly1305_ietf_npubbytes()
size_t crypto_stream_chacha20_ietf_messagebytes_max()
size_t randombytes_seedbytes()
size_t crypto_onetimeauth_poly1305_bytes()
int crypto_stream_xsalsa20_xor_ic(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[])
int crypto_box_detached(uint8_t ctext[], uint8_t mac[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t pk[32], const uint8_t sk[32])
int sodium_memcmp(const void *x, const void *y, size_t len)
size_t crypto_box_boxzerobytes()
size_t crypto_stream_xchacha20_messagebytes_max()
size_t crypto_sign_ed25519_publickeybytes()
int crypto_shorthash_siphash24(uint8_t out[8], const uint8_t in[], size_t in_len, const uint8_t key[16])
int crypto_sign_ed25519_verify_detached(const uint8_t sig[], const uint8_t msg[], size_t msg_len, const uint8_t pk[32])
@ crypto_stream_salsa20_NONCEBYTES
@ crypto_stream_MESSAGEBYTES_MAX
@ crypto_aead_chacha20poly1305_ietf_NSECBYTES
@ crypto_shorthash_KEYBYTES
@ crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES
@ crypto_scalarmult_SCALARBYTES
@ crypto_box_MESSAGEBYTES_MAX
@ crypto_aead_chacha20poly1305_NPUBBYTES
@ crypto_sign_ed25519_SECRETKEYBYTES
@ crypto_sign_MESSAGEBYTES_MAX
@ crypto_scalarmult_curve25519_SCALARBYTES
@ crypto_auth_hmacsha256_KEYBYTES
@ crypto_auth_hmacsha256_BYTES
@ crypto_aead_xchacha20poly1305_ietf_NSECBYTES
@ crypto_core_hsalsa20_INPUTBYTES
@ crypto_onetimeauth_BYTES
@ crypto_secretbox_xsalsa20poly1305_NONCEBYTES
@ crypto_aead_chacha20poly1305_ietf_ABYTES
@ crypto_aead_chacha20poly1305_NSECBYTES
@ crypto_shorthash_siphash24_KEYBYTES
@ crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES
@ crypto_sign_PUBLICKEYBYTES
@ crypto_stream_xsalsa20_MESSAGEBYTES_MAX
@ crypto_stream_chacha20_ietf_KEYBYTES
@ crypto_secretbox_KEYBYTES
@ crypto_aead_chacha20poly1305_ietf_NPUBBYTES
@ crypto_secretbox_ZEROBYTES
@ crypto_sign_ed25519_PUBLICKEYBYTES
@ crypto_secretbox_xsalsa20poly1305_ZEROBYTES
@ crypto_stream_xchacha20_MESSAGEBYTES_MAX
@ crypto_onetimeauth_poly1305_KEYBYTES
@ crypto_box_curve25519xsalsa20poly1305_NONCEBYTES
@ crypto_core_hchacha20_OUTPUTBYTES
@ crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES
@ crypto_stream_xsalsa20_KEYBYTES
@ crypto_core_hchacha20_CONSTBYTES
@ crypto_stream_chacha20_ietf_NONCEBYTES
@ crypto_aead_chacha20poly1305_KEYBYTES
@ crypto_sign_ed25519_BYTES
@ crypto_stream_salsa20_MESSAGEBYTES_MAX
@ crypto_stream_xchacha20_KEYBYTES
@ crypto_secretbox_xsalsa20poly1305_KEYBYTES
@ crypto_aead_xchacha20poly1305_ietf_KEYBYTES
@ crypto_sign_ed25519_MESSAGEBYTES_MAX
@ crypto_secretbox_MACBYTES
@ crypto_stream_chacha20_MESSAGEBYTES_MAX
@ crypto_core_hsalsa20_CONSTBYTES
@ crypto_aead_chacha20poly1305_ietf_KEYBYTES
@ crypto_stream_NONCEBYTES
@ crypto_auth_hmacsha512_BYTES
@ crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX
@ crypto_box_curve25519xsalsa20poly1305_MACBYTES
@ crypto_stream_xchacha20_NONCEBYTES
@ crypto_scalarmult_curve25519_BYTES
@ crypto_aead_chacha20poly1305_ABYTES
@ crypto_sign_SECRETKEYBYTES
@ crypto_box_BEFORENMBYTES
@ crypto_box_BOXZEROBYTES
@ crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX
@ crypto_box_curve25519xsalsa20poly1305_ZEROBYTES
@ crypto_sign_ed25519_SEEDBYTES
@ crypto_stream_chacha20_NONCEBYTES
@ crypto_stream_chacha20_KEYBYTES
@ crypto_box_PUBLICKEYBYTES
@ crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX
@ crypto_scalarmult_BYTES
@ crypto_secretbox_NONCEBYTES
@ crypto_core_hsalsa20_OUTPUTBYTES
@ crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES
@ crypto_hash_sha512_BYTES
@ crypto_onetimeauth_poly1305_BYTES
@ crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX
@ crypto_box_SECRETKEYBYTES
@ crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX
@ crypto_auth_hmacsha512256_KEYBYTES
@ crypto_aead_xchacha20poly1305_ietf_ABYTES
@ crypto_auth_hmacsha512_KEYBYTES
@ crypto_core_hchacha20_KEYBYTES
@ crypto_aead_xchacha20poly1305_ietf_NPUBBYTES
@ crypto_onetimeauth_KEYBYTES
@ crypto_auth_hmacsha512256_BYTES
@ crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES
@ crypto_stream_xsalsa20_NONCEBYTES
@ crypto_core_hsalsa20_KEYBYTES
@ crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX
@ crypto_secretbox_xsalsa20poly1305_MACBYTES
@ crypto_hash_sha256_BYTES
@ crypto_stream_salsa20_KEYBYTES
@ crypto_secretbox_BOXZEROBYTES
@ crypto_secretbox_MESSAGEBYTES_MAX
@ crypto_shorthash_siphash24_BYTES
@ crypto_core_hchacha20_INPUTBYTES
@ crypto_box_curve25519xsalsa20poly1305_SEEDBYTES
size_t crypto_sign_ed25519_messagebytes_max()
int crypto_hash_sha512(uint8_t out[64], const uint8_t in[], size_t in_len)
size_t crypto_box_zerobytes()
size_t crypto_stream_noncebytes()
size_t crypto_secretbox_macbytes()
size_t crypto_sign_ed25519_seedbytes()
size_t crypto_box_messagebytes_max()
size_t crypto_sign_publickeybytes()
size_t crypto_box_curve25519xsalsa20poly1305_boxzerobytes()
void crypto_stream_chacha20_keygen(uint8_t k[32])
size_t crypto_box_noncebytes()
size_t crypto_box_seedbytes()
size_t crypto_secretbox_noncebytes()
int crypto_onetimeauth_poly1305_verify(const uint8_t h[], const uint8_t in[], size_t in_len, const uint8_t key[])
size_t crypto_stream_xsalsa20_keybytes()
size_t crypto_aead_chacha20poly1305_ietf_keybytes()
int crypto_box_open_afternm(uint8_t ptext[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_stream_xchacha20_xor_ic(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[])
int crypto_verify_64(const uint8_t x[64], const uint8_t y[64])
int crypto_auth_hmacsha512256_verify(const uint8_t h[], const uint8_t in[], size_t in_len, const uint8_t key[])
const char * crypto_hash_primitive()
int sodium_library_minimal()
int crypto_stream_chacha20_xor_ic(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[])
int crypto_aead_chacha20poly1305_encrypt(uint8_t ctext[], unsigned long long *ctext_len, const uint8_t ptext[], size_t ptext_len, const uint8_t ad[], size_t ad_len, const uint8_t unused_secret_nonce[], const uint8_t nonce[], const uint8_t key[])
int crypto_secretbox_xsalsa20poly1305_open(uint8_t ptext[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_box_curve25519xsalsa20poly1305_macbytes()
int crypto_scalarmult_curve25519(uint8_t out[32], const uint8_t scalar[32], const uint8_t basepoint[32])
int crypto_stream_chacha20(uint8_t out[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_stream_xor(uint8_t out[], const uint8_t in[], size_t in_len, const uint8_t nonce[24], const uint8_t key[32])
size_t crypto_aead_chacha20poly1305_ietf_abytes()
int sodium_library_version_major()
void crypto_onetimeauth_keygen(uint8_t k[32])
size_t crypto_core_hsalsa20_constbytes()
size_t crypto_aead_xchacha20poly1305_ietf_npubbytes()
size_t crypto_aead_xchacha20poly1305_ietf_abytes()
int crypto_stream_salsa20_xor(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
const char * crypto_stream_primitive()
size_t crypto_stream_xchacha20_noncebytes()
size_t crypto_box_curve25519xsalsa20poly1305_noncebytes()
size_t crypto_box_secretkeybytes()
void sodium_add(uint8_t a[], const uint8_t b[], size_t len)
size_t crypto_stream_xsalsa20_messagebytes_max()
int crypto_auth_hmacsha256_verify(const uint8_t h[], const uint8_t in[], size_t in_len, const uint8_t key[])
int crypto_stream_chacha20_ietf(uint8_t out[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
void crypto_auth_hmacsha512_keygen(uint8_t k[32])
size_t crypto_secretbox_xsalsa20poly1305_noncebytes()
int crypto_secretbox_open_detached(uint8_t ptext[], const uint8_t ctext[], const uint8_t mac[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_box_publickeybytes()
size_t crypto_stream_salsa20_messagebytes_max()
void * sodium_malloc(size_t size)
void sodium_increment(uint8_t n[], size_t nlen)
size_t crypto_shorthash_siphash24_bytes()
int crypto_auth(uint8_t out[], const uint8_t in[], size_t in_len, const uint8_t key[])
int sodium_compare(const uint8_t x[], const uint8_t y[], size_t len)
void randombytes(uint8_t buf[], size_t buf_len)
size_t crypto_stream_chacha20_messagebytes_max()
void crypto_stream_xsalsa20_keygen(uint8_t k[32])
int crypto_aead_chacha20poly1305_ietf_encrypt(uint8_t ctext[], unsigned long long *ctext_len, const uint8_t ptext[], size_t ptext_len, const uint8_t ad[], size_t ad_len, const uint8_t unused_secret_nonce[], const uint8_t nonce[], const uint8_t key[])
int crypto_box(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t pk[32], const uint8_t sk[32])
int crypto_stream_salsa20_xor_ic(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[])
size_t crypto_shorthash_siphash24_keybytes()
int crypto_sign_ed25519_detached(uint8_t sig[], unsigned long long *sig_len, const uint8_t msg[], size_t msg_len, const uint8_t sk[32])
size_t crypto_aead_chacha20poly1305_abytes()
int sodium_library_version_minor()
size_t crypto_aead_chacha20poly1305_messagebytes_max()
int crypto_secretbox_easy(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_box_easy_afternm(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_box_open_easy(uint8_t ptext[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t pk[32], const uint8_t sk[32])
size_t crypto_sign_ed25519_bytes()
int crypto_box_afternm(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_aead_xchacha20poly1305_ietf_encrypt(uint8_t ctext[], unsigned long long *ctext_len, const uint8_t ptext[], size_t ptext_len, const uint8_t ad[], size_t ad_len, const uint8_t unused_secret_nonce[], const uint8_t nonce[], const uint8_t key[])
int crypto_box_curve25519xsalsa20poly1305(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t pk[32], const uint8_t sk[32])
size_t crypto_box_beforenmbytes()
int crypto_stream_chacha20_xor(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_auth_keybytes()
size_t crypto_hash_sha256_bytes()
int sodium_mprotect_noaccess(void *ptr)
int crypto_sign_detached(uint8_t sig[], unsigned long long *sig_len, const uint8_t msg[], size_t msg_len, const uint8_t sk[32])
void randombytes_buf_deterministic(void *buf, size_t size, const uint8_t seed[randombytes_SEEDBYTES])
int crypto_box_keypair(uint8_t pk[32], uint8_t sk[32])
int crypto_sign_keypair(uint8_t pk[32], uint8_t sk[32])
int crypto_box_beforenm(uint8_t key[], const uint8_t pk[32], const uint8_t sk[32])
size_t crypto_shorthash_keybytes()
int crypto_secretbox_xsalsa20poly1305(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_onetimeauth_verify(const uint8_t h[], const uint8_t in[], size_t in_len, const uint8_t key[])
void crypto_auth_keygen(uint8_t k[])
size_t crypto_stream_salsa20_noncebytes()
int crypto_onetimeauth_poly1305(uint8_t out[], const uint8_t in[], size_t in_len, const uint8_t key[])
void crypto_auth_hmacsha512256_keygen(uint8_t k[32])
int crypto_scalarmult_curve25519_base(uint8_t out[32], const uint8_t scalar[32])
const char * sodium_version_string()
size_t crypto_stream_chacha20_ietf_noncebytes()
size_t crypto_auth_hmacsha512_keybytes()
int crypto_shorthash(uint8_t out[], const uint8_t in[], size_t in_len, const uint8_t k[16])
int sodium_is_zero(const uint8_t nonce[], size_t nlen)
void crypto_stream_xchacha20_keygen(uint8_t k[32])
void sodium_free(void *ptr)
size_t crypto_box_curve25519xsalsa20poly1305_seedbytes()
size_t crypto_core_hsalsa20_inputbytes()
size_t crypto_scalarmult_curve25519_bytes()
void crypto_stream_chacha20_ietf_keygen(uint8_t k[32])
size_t crypto_sign_secretkeybytes()
int crypto_core_hsalsa20(uint8_t out[], const uint8_t in[], const uint8_t key[], const uint8_t c[])
int crypto_box_curve25519xsalsa20poly1305_afternm(uint8_t ctext[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_aead_chacha20poly1305_ietf_decrypt(uint8_t ptext[], unsigned long long *ptext_len, uint8_t unused_secret_nonce[], const uint8_t ctext[], size_t ctext_len, const uint8_t ad[], size_t ad_len, const uint8_t nonce[], const uint8_t key[])
int crypto_sign_ed25519_keypair(uint8_t pk[32], uint8_t sk[64])
size_t crypto_box_curve25519xsalsa20poly1305_zerobytes()
int crypto_scalarmult(uint8_t out[], const uint8_t scalar[], const uint8_t base[])
void crypto_shorthash_keygen(uint8_t k[16])
void crypto_aead_chacha20poly1305_keygen(uint8_t k[32])
uint32_t randombytes_uniform(uint32_t upper_bound)
int crypto_stream_xchacha20(uint8_t out[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_box_detached_afternm(uint8_t ctext[], uint8_t mac[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_auth_bytes()
size_t crypto_scalarmult_bytes()
void crypto_aead_xchacha20poly1305_ietf_keygen(uint8_t k[32])
int crypto_sign_ed25519_seed_keypair(uint8_t pk[], uint8_t sk[], const uint8_t seed[])
int crypto_sign_seed_keypair(uint8_t pk[32], uint8_t sk[32], const uint8_t seed[])
int crypto_aead_chacha20poly1305_encrypt_detached(uint8_t ctext[], uint8_t mac[], unsigned long long *mac_len, const uint8_t ptext[], size_t ptext_len, const uint8_t ad[], size_t ad_len, const uint8_t unused_secret_nonce[], const uint8_t nonce[], const uint8_t key[])
int sodium_mprotect_readwrite(void *ptr)
size_t crypto_onetimeauth_keybytes()
size_t crypto_hash_bytes()
int crypto_aead_xchacha20poly1305_ietf_encrypt_detached(uint8_t ctext[], uint8_t mac[], unsigned long long *mac_len, const uint8_t ptext[], size_t ptext_len, const uint8_t ad[], size_t ad_len, const uint8_t unused_secret_nonce[], const uint8_t nonce[], const uint8_t key[])
size_t crypto_stream_chacha20_ietf_keybytes()
void crypto_stream_salsa20_keygen(uint8_t k[32])
size_t crypto_auth_hmacsha512256_bytes()
size_t crypto_secretbox_keybytes()
size_t crypto_auth_hmacsha256_keybytes()
size_t crypto_sign_ed25519_secretkeybytes()
size_t crypto_secretbox_boxzerobytes()
int crypto_stream_xsalsa20(uint8_t out[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
void sodium_memzero(void *ptr, size_t len)
size_t crypto_aead_chacha20poly1305_ietf_messagebytes_max()
size_t crypto_aead_chacha20poly1305_keybytes()
int crypto_auth_hmacsha512256(uint8_t out[], const uint8_t in[], size_t in_len, const uint8_t key[])
int crypto_stream_xsalsa20_xor(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_stream_messagebytes_max()
size_t crypto_box_curve25519xsalsa20poly1305_messagebytes_max()
size_t crypto_aead_chacha20poly1305_npubbytes()
size_t crypto_auth_hmacsha512_bytes()
const char * crypto_onetimeauth_primitive()
int crypto_onetimeauth(uint8_t out[], const uint8_t in[], size_t in_len, const uint8_t key[])
int crypto_box_seed_keypair(uint8_t pk[32], uint8_t sk[32], const uint8_t seed[])
int crypto_auth_hmacsha256(uint8_t out[], const uint8_t in[], size_t in_len, const uint8_t key[])
int crypto_stream_chacha20_ietf_xor_ic(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], uint32_t ic, const uint8_t key[])
int crypto_stream(uint8_t out[], size_t out_len, const uint8_t nonce[24], const uint8_t key[32])
size_t crypto_aead_chacha20poly1305_nsecbytes()
int crypto_secretbox_open(uint8_t ptext[], const uint8_t ctext[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_auth_hmacsha512256_keybytes()
size_t crypto_secretbox_messagebytes_max()
void crypto_secretbox_keygen(uint8_t k[32])
int crypto_aead_chacha20poly1305_ietf_decrypt_detached(uint8_t m[], uint8_t unused_secret_nonce[], const uint8_t ctext[], size_t ctext_len, const uint8_t mac[], const uint8_t ad[], size_t ad_len, const uint8_t nonce[], const uint8_t key[])
int crypto_auth_hmacsha512_verify(const uint8_t h[], const uint8_t in[], size_t in_len, const uint8_t key[])
size_t crypto_aead_xchacha20poly1305_ietf_nsecbytes()
int crypto_hash(uint8_t out[], const uint8_t in[], size_t in_len)
size_t crypto_stream_keybytes()
int crypto_secretbox_detached(uint8_t ctext[], uint8_t mac[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
const char * crypto_box_primitive()
void crypto_stream_keygen(uint8_t key[32])
size_t crypto_box_curve25519xsalsa20poly1305_publickeybytes()
int crypto_aead_xchacha20poly1305_ietf_decrypt_detached(uint8_t ptext[], uint8_t unused_secret_nonce[], const uint8_t ctext[], size_t ctext_len, const uint8_t mac[], const uint8_t ad[], size_t ad_len, const uint8_t nonce[], const uint8_t key[])
size_t crypto_secretbox_xsalsa20poly1305_keybytes()
size_t crypto_secretbox_xsalsa20poly1305_macbytes()
size_t crypto_hash_sha512_bytes()
void randombytes_buf(void *buf, size_t size)
size_t crypto_secretbox_zerobytes()
int crypto_sign_verify_detached(const uint8_t sig[], const uint8_t in[], size_t in_len, const uint8_t pk[32])
int crypto_scalarmult_base(uint8_t out[], const uint8_t scalar[])
size_t crypto_secretbox_xsalsa20poly1305_boxzerobytes()