File indexing completed on 2025-01-18 10:12:39
0001 #ifndef crypto_aead_aegis256_H
0002 #define crypto_aead_aegis256_H
0003
0004 #include <stddef.h>
0005
0006 #include "export.h"
0007
0008 #ifdef __cplusplus
0009 #ifdef __GNUC__
0010 #pragma GCC diagnostic ignored "-Wlong-long"
0011 #endif
0012 extern "C" {
0013 #endif
0014
0015 #define crypto_aead_aegis256_KEYBYTES 32U
0016 SODIUM_EXPORT
0017 size_t crypto_aead_aegis256_keybytes(void);
0018
0019 #define crypto_aead_aegis256_NSECBYTES 0U
0020 SODIUM_EXPORT
0021 size_t crypto_aead_aegis256_nsecbytes(void);
0022
0023 #define crypto_aead_aegis256_NPUBBYTES 32U
0024 SODIUM_EXPORT
0025 size_t crypto_aead_aegis256_npubbytes(void);
0026
0027 #define crypto_aead_aegis256_ABYTES 32U
0028 SODIUM_EXPORT
0029 size_t crypto_aead_aegis256_abytes(void);
0030
0031 #define crypto_aead_aegis256_MESSAGEBYTES_MAX \
0032 SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aegis256_ABYTES, (1ULL << 61) - 1)
0033 SODIUM_EXPORT
0034 size_t crypto_aead_aegis256_messagebytes_max(void);
0035
0036 SODIUM_EXPORT
0037 int crypto_aead_aegis256_encrypt(unsigned char *c,
0038 unsigned long long *clen_p,
0039 const unsigned char *m,
0040 unsigned long long mlen,
0041 const unsigned char *ad,
0042 unsigned long long adlen,
0043 const unsigned char *nsec,
0044 const unsigned char *npub,
0045 const unsigned char *k) __attribute__((nonnull(1, 8, 9)));
0046
0047 SODIUM_EXPORT
0048 int crypto_aead_aegis256_decrypt(unsigned char *m,
0049 unsigned long long *mlen_p,
0050 unsigned char *nsec,
0051 const unsigned char *c,
0052 unsigned long long clen,
0053 const unsigned char *ad,
0054 unsigned long long adlen,
0055 const unsigned char *npub,
0056 const unsigned char *k) __attribute__((warn_unused_result))
0057 __attribute__((nonnull(4, 8, 9)));
0058
0059 SODIUM_EXPORT
0060 int crypto_aead_aegis256_encrypt_detached(unsigned char *c,
0061 unsigned char *mac,
0062 unsigned long long *maclen_p,
0063 const unsigned char *m,
0064 unsigned long long mlen,
0065 const unsigned char *ad,
0066 unsigned long long adlen,
0067 const unsigned char *nsec,
0068 const unsigned char *npub,
0069 const unsigned char *k)
0070 __attribute__((nonnull(1, 2, 9, 10)));
0071
0072 SODIUM_EXPORT
0073 int crypto_aead_aegis256_decrypt_detached(unsigned char *m,
0074 unsigned char *nsec,
0075 const unsigned char *c,
0076 unsigned long long clen,
0077 const unsigned char *mac,
0078 const unsigned char *ad,
0079 unsigned long long adlen,
0080 const unsigned char *npub,
0081 const unsigned char *k)
0082 __attribute__((warn_unused_result)) __attribute__((nonnull(3, 5, 8, 9)));
0083
0084 SODIUM_EXPORT
0085 void crypto_aead_aegis256_keygen(unsigned char k[crypto_aead_aegis256_KEYBYTES])
0086 __attribute__((nonnull));
0087
0088 #ifdef __cplusplus
0089 }
0090 #endif
0091
0092 #endif