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_UTIL_ASSET_PROV_INT_H 8 #define _CC_UTIL_ASSET_PROV_INT_H 9 10 /*! 11 @file 12 @brief This file contains the functions and definitions for the ICV or OEM Asset provisioning in run-time library. 13 */ 14 15 #ifdef __cplusplus 16 extern "C" 17 { 18 #endif 19 #include "cc_pal_types.h" 20 #include "cc_bitops.h" 21 22 #define CC_ASSET_PROV_MAX_ASSET_SIZE (4*CC_1K_SIZE_IN_BYTES) 23 24 #define CC_ASSET_PROV_TOKEN 0x41736574UL 25 #define CC_ASSET_PROV_VERSION 0x10000UL 26 27 #define CC_ASSET_PROV_NONCE_SIZE 12 28 #define CC_ASSET_PROV_RESERVED_SIZE 8 29 #define CC_ASSET_PROV_RESERVED_WORD_SIZE (CC_ASSET_PROV_RESERVED_SIZE/CC_32BIT_WORD_SIZE) 30 #define CC_ASSET_PROV_TAG_SIZE 16 31 #define CC_ASSET_PROV_BLOCK_SIZE 16 32 33 #define CC_ASSET_PROV_ADATA_SIZE (3*CC_32BIT_WORD_SIZE+CC_ASSET_PROV_RESERVED_SIZE) // token||version||assetSize||reserved 34 35 36 typedef struct { 37 uint32_t token; 38 uint32_t version; 39 uint32_t assetSize; 40 uint32_t reserved[CC_ASSET_PROV_RESERVED_WORD_SIZE]; 41 uint8_t nonce[CC_ASSET_PROV_NONCE_SIZE]; 42 uint8_t encAsset[CC_ASSET_PROV_MAX_ASSET_SIZE+CC_ASSET_PROV_TAG_SIZE]; 43 }CCAssetProvPkg_t; 44 45 46 #ifdef __cplusplus 47 } 48 #endif 49 50 #endif /*_CC_UTIL_ASSET_PROV_INT_H*/ 51