2 * Copyright (C) 2015 Martin Willi
4 * Copyright (C) secunet Security Networks AG
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 * @defgroup chapoly_aead chapoly_aead
22 #ifndef CHAPOLY_AEAD_H_
23 #define CHAPOLY_AEAD_H_
25 #include <crypto/aead.h>
27 typedef struct chapoly_aead_t chapoly_aead_t
;
30 * ChaCha20/Poly1305 AEAD implementation.
32 * TODO-Chapoly: draft-ietf-ipsecme-chacha20-poly1305-05
34 struct chapoly_aead_t
{
37 * Implements aead_t interface.
43 * Create a chapoly_aead instance.
45 * @param algo algorithm to implement, ENCR_CHACHA20_POLY1305
46 * @param key_size key size in bytes, 32
47 * @param salt_size size of implicit salt length, 0
48 * @return AEAD, NULL if not supported
50 chapoly_aead_t
*chapoly_aead_create(encryption_algorithm_t algo
,
51 size_t key_size
, size_t salt_size
);
53 #endif /** CHAPOLY_AEAD_H_ @}*/