1 /* 2 * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /*! 8 @file mbedtls_cc_aes_key_wrap_error.h 9 @brief This file contains the error definitions of the CryptoCell AES key-wrapping APIs. 10 */ 11 12 /*! 13 @defgroup cc_aes_keywrap_error Specific errors of the CryptoCell AES key-wrapping APIs 14 @brief Contains the CryptoCell AES key-wrapping-API error definitions. 15 16 See mbedtls_cc_aes_key_wrap_error.h. 17 @{ 18 @ingroup cc_aes_keywrap 19 @} 20 */ 21 22 #ifndef _CC_AES_KEYWRAP_ERROR_H 23 #define _CC_AES_KEYWRAP_ERROR_H 24 25 26 #include "cc_error.h" 27 28 #ifdef __cplusplus 29 extern "C" 30 { 31 #endif 32 33 34 /************************ Defines ******************************/ 35 36 /* CryptoCell AES key-wrapping module errors. #CC_AES_KEYWRAP_MODULE_ERROR_BASE = 0x00F02800 */ 37 38 /*! Invalid data-in text pointer. */ 39 #define CC_AES_KEYWRAP_DATA_IN_POINTER_INVALID_ERROR (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x00UL) 40 /*! Invalid data-out text pointer. */ 41 #define CC_AES_KEYWRAP_DATA_OUT_POINTER_INVALID_ERROR (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x01UL) 42 /*! Invalid key pointer. */ 43 #define CC_AES_KEYWRAP_INVALID_KEY_POINTER_ERROR (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x02UL) 44 /*! Invalid key size. */ 45 #define CC_AES_KEYWRAP_ILLEGAL_KEY_SIZE_ERROR (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x03UL) 46 /*! Illegal semiblocks number. */ 47 #define CC_AES_KEYWRAP_SEMIBLOCKS_NUM_ILLEGAL (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x04UL) 48 /*! Invalid parameter pointer. */ 49 #define CC_AES_KEYWRAP_ILLEGAL_PARAMETER_PTR_ERROR (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x05UL) 50 /*! Invalid encryption mode. */ 51 #define CC_AES_KEYWRAP_INVALID_ENCRYPT_MODE_ERROR (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x06UL) 52 /*! Illegal data-in size. */ 53 #define CC_AES_KEYWRAP_DATA_IN_SIZE_ILLEGAL (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x07UL) 54 /*! Illegal data-out size. */ 55 #define CC_AES_KEYWRAP_DATA_OUT_SIZE_ILLEGAL (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x08UL) 56 /*! Illegal key-wrapping mode. */ 57 #define CC_AES_KEYWRAP_INVALID_KEYWRAP_MODE_ERROR (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x09UL) 58 /*! Key Unwrap comparison failure. */ 59 #define CC_AES_KEYWRAP_UNWRAP_COMPARISON_ERROR (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0x0AUL) 60 61 /*! Not supported. */ 62 #define CC_AES_KEYWRAP_IS_NOT_SUPPORTED (CC_AES_KEYWRAP_MODULE_ERROR_BASE + 0xFFUL) 63 64 /************************ Enums ********************************/ 65 66 /************************ Typedefs ****************************/ 67 68 /************************ Structs *****************************/ 69 70 /************************ Public Variables *********************/ 71 72 /************************ Public Functions *********************/ 73 74 #ifdef __cplusplus 75 } 76 #endif 77 78 #endif /* _CC_AES_KEYWRAP_ERROR_H */ 79