Annotation of embedaddon/strongswan/src/libstrongswan/plugins/aesni/aesni_cmac.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2015 Martin Willi
                      3:  * Copyright (C) 2015 revosec AG
                      4:  *
                      5:  * This program is free software; you can redistribute it and/or modify it
                      6:  * under the terms of the GNU General Public License as published by the
                      7:  * Free Software Foundation; either version 2 of the License, or (at your
                      8:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
                      9:  *
                     10:  * This program is distributed in the hope that it will be useful, but
                     11:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     12:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
                     13:  * for more details.
                     14:  */
                     15: 
                     16: /**
                     17:  * @defgroup aesni_xcbc aesni_xcbc
                     18:  * @{ @ingroup aesni
                     19:  */
                     20: 
                     21: #ifndef AESNI_CMAC_H_
                     22: #define AESNI_CMAC_H_
                     23: 
                     24: #include <crypto/mac.h>
                     25: #include <crypto/prfs/prf.h>
                     26: #include <crypto/signers/signer.h>
                     27: 
                     28: /**
                     29:  * Create a generic mac_t object using AESNI CMAC.
                     30:  *
                     31:  * @param algo         underlying encryption algorithm
                     32:  * @param key_size     size of encryption key, in bytes
                     33:  */
                     34: mac_t *aesni_cmac_create(encryption_algorithm_t algo, size_t key_size);
                     35: 
                     36: /**
                     37:  * Creates a new prf_t object based AESNI CMAC.
                     38:  *
                     39:  * @param algo         algorithm to implement
                     40:  * @return                     prf_t object, NULL if not supported
                     41:  */
                     42: prf_t *aesni_cmac_prf_create(pseudo_random_function_t algo);
                     43: 
                     44: /**
                     45:  * Creates a new signer_t object based on AESNI CMAC.
                     46:  *
                     47:  * @param algo         algorithm to implement
                     48:  * @return                     signer_t, NULL if  not supported
                     49:  */
                     50: signer_t *aesni_cmac_signer_create(integrity_algorithm_t algo);
                     51: 
                     52: #endif /** AESNI_CMAC_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>