1 #ifndef crypto_stream_aes128ctr_H
2 #define crypto_stream_aes128ctr_H
5 * WARNING: This is just a stream cipher. It is NOT authenticated encryption.
6 * While it provides some protection against eavesdropping, it does NOT
7 * provide any security against active attacks.
8 * Unless you know what you're doing, what you are looking for is probably
9 * the crypto_box functions.
17 # pragma GCC diagnostic ignored "-Wlong-long"
22 #define crypto_stream_aes128ctr_KEYBYTES 16U
24 size_t crypto_stream_aes128ctr_keybytes(void);
26 #define crypto_stream_aes128ctr_NONCEBYTES 16U
28 size_t crypto_stream_aes128ctr_noncebytes(void);
30 #define crypto_stream_aes128ctr_BEFORENMBYTES 1408U
32 size_t crypto_stream_aes128ctr_beforenmbytes(void);
35 int crypto_stream_aes128ctr(unsigned char *out, unsigned long long outlen,
36 const unsigned char *n, const unsigned char *k);
39 int crypto_stream_aes128ctr_xor(unsigned char *out, const unsigned char *in,
40 unsigned long long inlen, const unsigned char *n,
41 const unsigned char *k);
44 int crypto_stream_aes128ctr_beforenm(unsigned char *c, const unsigned char *k);
47 int crypto_stream_aes128ctr_afternm(unsigned char *out, unsigned long long len,
48 const unsigned char *nonce, const unsigned char *c);
51 int crypto_stream_aes128ctr_xor_afternm(unsigned char *out, const unsigned char *in,
52 unsigned long long len,
53 const unsigned char *nonce,
54 const unsigned char *c);