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 @addtogroup cc_utils_key_defs 9 @{ 10 */ 11 12 /*! 13 @file 14 @brief This file contains the definitions for the key-derivation API. 15 */ 16 17 18 #ifndef _CC_UTIL_KEY_DERIVATION_DEFS_H 19 #define _CC_UTIL_KEY_DERIVATION_DEFS_H 20 21 #ifdef __cplusplus 22 extern "C" 23 { 24 #endif 25 26 /****************************************************************************** 27 * DEFINITIONS 28 ******************************************************************************/ 29 30 /*! The maximal length of the label in bytes. */ 31 #define CC_UTIL_MAX_LABEL_LENGTH_IN_BYTES 64 32 /*! The maximal length of the context in bytes. */ 33 #define CC_UTIL_MAX_CONTEXT_LENGTH_IN_BYTES 64 34 /*! The minimal size of the fixed data in bytes. */ 35 #define CC_UTIL_FIX_DATA_MIN_SIZE_IN_BYTES 3 /*!< \internal counter, 0x00, lengt(-0xff) */ 36 /*! The maximal size of the fixed data in bytes. */ 37 #define CC_UTIL_FIX_DATA_MAX_SIZE_IN_BYTES 4 /*!< \internal counter, 0x00, lengt(0x100-0xff0) */ 38 /*! The maximal size of the derived-key material in bytes. */ 39 #define CC_UTIL_MAX_KDF_SIZE_IN_BYTES (CC_UTIL_MAX_LABEL_LENGTH_IN_BYTES+CC_UTIL_MAX_CONTEXT_LENGTH_IN_BYTES+CC_UTIL_FIX_DATA_MAX_SIZE_IN_BYTES) 40 /*! The maximal size of the derived-key in bytes. */ 41 #define CC_UTIL_MAX_DERIVED_KEY_SIZE_IN_BYTES 4080 42 43 #ifdef __cplusplus 44 } 45 #endif 46 47 /*! 48 @} 49 */ 50 #endif /*_CC_UTIL_KEY_DERIVATION_DEFS_H*/ 51