Software APIs
static_dice_cdi_0.h
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_BASE_STATIC_DICE_CDI_0_H_
6 #define OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_BASE_STATIC_DICE_CDI_0_H_
7 
8 #include <stdint.h>
9 
11 #include "sw/device/silicon_creator/lib/drivers/hmac.h"
12 #include "sw/device/silicon_creator/lib/sigverify/ecdsa_p256_key.h"
13 
14 enum {
15  kCdi0CertStaticCriticalSizeBytes = 1024,
16 };
17 
18 // The dice chain information that the immutable ROM_EXT will pass to the
19 // mutable ROM_EXT.
20 typedef struct {
21  hmac_digest_t uds_pubkey_id;
22  ecdsa_p256_public_key_t uds_pubkey;
23  hmac_digest_t cdi_0_pubkey_id;
24  ecdsa_p256_public_key_t cdi_0_pubkey;
25  uint32_t cert_size;
26  uint8_t cert_data[kCdi0CertStaticCriticalSizeBytes];
28 
31 OT_ASSERT_MEMBER_OFFSET(static_dice_cdi_0_t, cdi_0_pubkey_id, 96);
36 
37 extern static_dice_cdi_0_t static_dice_cdi_0;
38 
39 #endif // OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_BASE_STATIC_DICE_CDI_0_H_