summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/include/zinc/chacha20poly1305.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/include/zinc/chacha20poly1305.h')
-rw-r--r--src/crypto/include/zinc/chacha20poly1305.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/crypto/include/zinc/chacha20poly1305.h b/src/crypto/include/zinc/chacha20poly1305.h
index 50b2be9..d2753c5 100644
--- a/src/crypto/include/zinc/chacha20poly1305.h
+++ b/src/crypto/include/zinc/chacha20poly1305.h
@@ -12,39 +12,39 @@
struct scatterlist;
enum chacha20poly1305_lengths {
- XCHACHA20POLY1305_NONCELEN = 24,
- CHACHA20POLY1305_KEYLEN = 32,
- CHACHA20POLY1305_AUTHTAGLEN = 16
+ XCHACHA20POLY1305_NONCE_SIZE = 24,
+ CHACHA20POLY1305_KEY_SIZE = 32,
+ CHACHA20POLY1305_AUTHTAG_SIZE = 16
};
void chacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len,
const u8 *ad, const size_t ad_len,
const u64 nonce,
- const u8 key[CHACHA20POLY1305_KEYLEN]);
+ const u8 key[CHACHA20POLY1305_KEY_SIZE]);
bool __must_check chacha20poly1305_encrypt_sg(
struct scatterlist *dst, struct scatterlist *src, const size_t src_len,
const u8 *ad, const size_t ad_len, const u64 nonce,
- const u8 key[CHACHA20POLY1305_KEYLEN], simd_context_t *simd_context);
+ const u8 key[CHACHA20POLY1305_KEY_SIZE], simd_context_t *simd_context);
bool __must_check
chacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len,
const u8 *ad, const size_t ad_len, const u64 nonce,
- const u8 key[CHACHA20POLY1305_KEYLEN]);
+ const u8 key[CHACHA20POLY1305_KEY_SIZE]);
bool __must_check chacha20poly1305_decrypt_sg(
struct scatterlist *dst, struct scatterlist *src, const size_t src_len,
const u8 *ad, const size_t ad_len, const u64 nonce,
- const u8 key[CHACHA20POLY1305_KEYLEN], simd_context_t *simd_context);
+ const u8 key[CHACHA20POLY1305_KEY_SIZE], simd_context_t *simd_context);
void xchacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len,
const u8 *ad, const size_t ad_len,
- const u8 nonce[XCHACHA20POLY1305_NONCELEN],
- const u8 key[CHACHA20POLY1305_KEYLEN]);
+ const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE],
+ const u8 key[CHACHA20POLY1305_KEY_SIZE]);
bool __must_check xchacha20poly1305_decrypt(
u8 *dst, const u8 *src, const size_t src_len, const u8 *ad,
- const size_t ad_len, const u8 nonce[XCHACHA20POLY1305_NONCELEN],
- const u8 key[CHACHA20POLY1305_KEYLEN]);
+ const size_t ad_len, const u8 nonce[XCHACHA20POLY1305_NONCE_SIZE],
+ const u8 key[CHACHA20POLY1305_KEY_SIZE]);
#endif /* _ZINC_CHACHA20POLY1305_H */