1 /* 2 * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef _MBEDTLS_CCM_INTERNAL_H 8 #define _MBEDTLS_CCM_INTERNAL_H 9 10 #ifdef __cplusplus 11 extern "C" 12 { 13 #endif 14 15 #include "mbedtls/ccm.h" 16 17 int mbedtls_ccm_get_security_level(uint8_t sizeOfT, uint8_t *pSecurityLevel); 18 19 void mbedtls_ccm_init_int(mbedtls_ccm_context *ctx); 20 21 int mbedtls_ccm_setkey_int(mbedtls_ccm_context *ctx, mbedtls_cipher_id_t cipher, const unsigned char *key, unsigned int keybits); 22 23 void mbedtls_ccm_free_int(mbedtls_ccm_context *ctx); 24 25 int mbedtls_ccm_encrypt_and_tag_int(mbedtls_ccm_context *ctx, 26 size_t length, 27 const unsigned char *iv, 28 size_t iv_len, 29 const unsigned char *add, 30 size_t add_len, 31 const unsigned char *input, 32 unsigned char *output, 33 unsigned char *tag, 34 size_t tag_len, 35 uint32_t ccmMode); 36 37 int mbedtls_ccm_auth_decrypt_int(mbedtls_ccm_context *ctx, 38 size_t length, 39 const unsigned char *iv, 40 size_t iv_len, 41 const unsigned char *add, 42 size_t add_len, 43 const unsigned char *input, 44 unsigned char *output, 45 const unsigned char *tag, 46 size_t tag_len, 47 uint32_t ccmMode); 48 #ifdef __cplusplus 49 } 50 #endif 51 52 #endif /* _MBEDTLS_CCM_INTERNAL_H */ 53