1 /* 2 * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef _CC_KDF_ERROR_H 8 #define _CC_KDF_ERROR_H 9 10 #include "cc_error.h" 11 12 13 #ifdef __cplusplus 14 extern "C" 15 { 16 #endif 17 18 /*! 19 @file 20 @brief This file contains the definitions of the CryptoCell KDF errors. 21 @defgroup cc_kdf_error CryptoCell Key Derivation specific errors 22 @{ 23 @ingroup cc_kdf 24 25 */ 26 27 28 /************************ Defines *******************************/ 29 30 /*! The CryptoCell KDF module errors / base address - 0x00F01100*/ 31 /*! Illegal input pointer. */ 32 #define CC_KDF_INVALID_ARGUMENT_POINTER_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x0UL) 33 /*! Illegal input size. */ 34 #define CC_KDF_INVALID_ARGUMENT_SIZE_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x1UL) 35 /*! Illegal operation mode. */ 36 #define CC_KDF_INVALID_ARGUMENT_OPERATION_MODE_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x2UL) 37 /*! Illegal hash mode. */ 38 #define CC_KDF_INVALID_ARGUMENT_HASH_MODE_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x3UL) 39 /*! Illegal key derivation mode. */ 40 #define CC_KDF_INVALID_KEY_DERIVATION_MODE_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x4UL) 41 /*! Illegal shared secret value size. */ 42 #define CC_KDF_INVALID_SHARED_SECRET_VALUE_SIZE_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x5UL) 43 /*! Illegal otherInfo size. */ 44 #define CC_KDF_INVALID_OTHER_INFO_SIZE_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x6UL) 45 /*! Illegal key data size. */ 46 #define CC_KDF_INVALID_KEYING_DATA_SIZE_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x7UL) 47 /*! Illegal algorithm ID pointer. */ 48 #define CC_KDF_INVALID_ALGORITHM_ID_POINTER_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x8UL) 49 /*! Illegal algorithm ID size. */ 50 #define CC_KDF_INVALID_ALGORITHM_ID_SIZE_ERROR (CC_KDF_MODULE_ERROR_BASE + 0x9UL) 51 /*! KDF is not supproted. */ 52 #define CC_KDF_IS_NOT_SUPPORTED (CC_KDF_MODULE_ERROR_BASE + 0xFFUL) 53 54 /************************ Enums *********************************/ 55 56 /************************ Typedefs *****************************/ 57 58 /************************ Structs ******************************/ 59 60 /************************ Public Variables **********************/ 61 62 /************************ Public Functions **********************/ 63 64 65 66 67 #ifdef __cplusplus 68 } 69 #endif 70 /** 71 @} 72 */ 73 #endif 74 75 76 77 78