ossl_cipher.h (4d846d260e2b9a3d4d0a701462568268cbfe7a5b) | ossl_cipher.h (44f8e1e8530e1d2e95e84bbbe3d22ac9cb2557fe) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2021 Stormshield. 5 * Copyright (c) 2021 Semihalf. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 14 unchanged lines hidden (view full) --- 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28#ifndef __OSSL_CIPHER_H__ 29#define __OSSL_CIPHER_H__ 30 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2021 Stormshield. 5 * Copyright (c) 2021 Semihalf. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 14 unchanged lines hidden (view full) --- 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28#ifndef __OSSL_CIPHER_H__ 29#define __OSSL_CIPHER_H__ 30 |
31#include <sys/types.h> 32#include <crypto/rijndael/rijndael.h> 33 |
|
31struct ossl_session_cipher; 32struct cryptop; 33struct crypto_session_params; 34 35typedef int (ossl_cipher_setkey_t)(const unsigned char*, int, void*); 36typedef int (ossl_cipher_process_t)(struct ossl_session_cipher*, struct cryptop*, 37 const struct crypto_session_params*); 38typedef void (ossl_cipher_encrypt_t)(const unsigned char*, unsigned char*, size_t, --- 6 unchanged lines hidden (view full) --- 45 uint16_t blocksize; 46 uint16_t ivsize; 47 48 ossl_cipher_setkey_t *set_encrypt_key; 49 ossl_cipher_setkey_t *set_decrypt_key; 50 ossl_cipher_process_t *process; 51}; 52 | 34struct ossl_session_cipher; 35struct cryptop; 36struct crypto_session_params; 37 38typedef int (ossl_cipher_setkey_t)(const unsigned char*, int, void*); 39typedef int (ossl_cipher_process_t)(struct ossl_session_cipher*, struct cryptop*, 40 const struct crypto_session_params*); 41typedef void (ossl_cipher_encrypt_t)(const unsigned char*, unsigned char*, size_t, --- 6 unchanged lines hidden (view full) --- 48 uint16_t blocksize; 49 uint16_t ivsize; 50 51 ossl_cipher_setkey_t *set_encrypt_key; 52 ossl_cipher_setkey_t *set_decrypt_key; 53 ossl_cipher_process_t *process; 54}; 55 |
56struct ossl_aes_keysched { 57 uint32_t ks[4 * (RIJNDAEL_MAXNR + 1)]; 58 int rounds; 59}; 60 |
|
53#endif | 61#endif |