Pavona Software APIs
datatypes.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_OWNERSHIP_DATATYPES_H_
6#define OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_OWNERSHIP_DATATYPES_H_
7
8#include <stdint.h>
9
12#include "sw/device/silicon_creator/lib/nonce.h"
13#include "sw/device/silicon_creator/lib/sigverify/ecdsa_p256_key.h"
14#include "sw/device/silicon_creator/lib/sigverify/spx_key.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif // __cplusplus
19
20typedef struct hybrid_key {
21 ecdsa_p256_public_key_t ecdsa;
22 sigverify_spx_key_t spx;
23} hybrid_key_t;
24
25/**
26 * An owner_key can be either a ECDSA P256 or SPX+ key. The type of the key
27 * material will be determined by a separate field on the owner block
28 */
29typedef union owner_key_data {
30 /** ECDSA P256 public key */
31 ecdsa_p256_public_key_t ecdsa;
32 /** SPHINCS+ public key */
33 sigverify_spx_key_t spx;
34 /** Hybrid ECDSA & SPHINCS+ public key */
35 hybrid_key_t hybrid;
36 /** Enough space to hold an ECDSA key and a SPX+ key for hybrid schemes */
37 uint32_t raw[16 + 8];
38 /** A key ID is the first 32-bit word of the key data */
39 uint32_t id;
40} owner_keydata_t;
41
42/**
43 * An owner_signature is an ECDSA P256 signature.
44 */
45typedef union owner_signature {
46 /** ECDSA P256 signature key */
47 ecdsa_p256_signature_t ecdsa;
48 uint32_t raw[16];
49} owner_signature_t;
50
51typedef enum ownership_state {
52 /* Locked Owner: `OWND`. */
53 kOwnershipStateLockedOwner = 0x444e574f,
54 /* Locked Update: `USLF`. */
55 kOwnershipStateUnlockedSelf = 0x464c5355,
56 /* Unlocked Any: `UANY`. */
57 kOwnershipStateUnlockedAny = 0x594e4155,
58 /* Unlocked Endorsed: `UEND`. */
59 kOwnershipStateUnlockedEndorsed = 0x444e4555,
60 /* Locked None: any bit pattern not listed above. */
61 kOwnershipStateRecovery = 0,
62} ownership_state_t;
63
64typedef enum ownership_key_alg {
65 /** Key algorithm ECDSA P-256: `P256` */
66 kOwnershipKeyAlgEcdsaP256 = 0x36353250,
67 /** Key algorithm SPX+ Pure: `S+Pu` */
68 kOwnershipKeyAlgSpxPure = 0x75502b53,
69 /** Key algorithm SPX+ Prehashed SHA256: `S+S2` */
70 kOwnershipKeyAlgSpxPrehash = 0x32532b53,
71 /** Key algorithm Hybrid P256 & SPX+ Pure: `H+Pu` */
72 kOwnershipKeyAlgHybridSpxPure = 0x75502b48,
73 /** Key algorithm Hybrid P256 & SPX+ Prehashed SHA256: `H+S2` */
74 kOwnershipKeyAlgHybridSpxPrehash = 0x32532b48,
75
76 // Tentative identifiers for SPHINCS+ q20 variants (not yet supported):
77 // Key algorithm SPX+ Pure: `SqPu`
78 kOwnershipKeyAlgSq20Pure = 0x75507153,
79 // Key algorithm SPX+ Prehashed SHA256: `SqS2`
80 kOwnershipKeyAlgSq20Prehash = 0x32537153,
81 // Key algorithm Hybrid P256 & SPX+ Pure: `HqPu`
82 kOwnershipKeyAlgHybridSq20Pure = 0x75507148,
83 // Key algorithm Hybrid P256 & SPX+ Prehashed SHA256: `HqS2`
84 kOwnershipKeyAlgHybridSq20Prehash = 0x32537148,
85
86 /** Key algorithm category mask */
87 kOwnershipKeyAlgCategoryMask = 0xFF,
88 /** Key algorithm category for ECDSA: `P...` */
89 kOwnershipKeyAlgCategoryEcdsa = 0x50,
90 /** Key algorithm category for Sphincs+: `S...` */
91 kOwnershipKeyAlgCategorySpx = 0x53,
92 /** Key algorithm category for Hybrid: `H...` */
93 kOwnershipKeyAlgCategoryHybrid = 0x48,
94} ownership_key_alg_t;
95
96typedef enum ownership_update_mode {
97 /** Update mode open: `OPEN` (unlock key has full power) */
98 kOwnershipUpdateModeOpen = 0x4e45504f,
99 /** Update mode self: `SELF` (unlock key only unlocks to UnlockedSelf) */
100 kOwnershipUpdateModeSelf = 0x464c4553,
101 /**
102 * Update mode NewVersion: `NEWV`
103 * (unlock key can't unlock; accept new owner configs from self-same owner
104 * if the config_version is newer)
105 */
106 kOwnershipUpdateModeNewVersion = 0x5657454e,
107 /**
108 * Update mode SelfVersion: `SELV`
109 * (unlock key only unlocks to UnlockedSelf; accept new owner configs from
110 * self-same owner if the config_version is newer)
111 */
112 kOwnershipUpdateModeSelfVersion = 0x564c4553,
113} ownership_update_mode_t;
114
115typedef enum lock_constraint {
116 /** No locking constraint: `~~~~`. */
117 kLockConstraintNone = 0x7e7e7e7e,
118} lock_constraint_t;
119
120typedef enum tlv_tag {
121 /** Owner struct: `OWNR`. */
122 kTlvTagOwner = 0x524e574f,
123 /** Application Key: `APPK`. */
124 kTlvTagApplicationKey = 0x4b505041,
125 /** Flash Configuration: `FLSH`. */
126 kTlvTagFlashConfig = 0x48534c46,
127 /** Flash INFO configuration: `INFO`. */
128 kTlvTagInfoConfig = 0x4f464e49,
129 /** Rescue Configuration: `RESQ`. */
130 kTlvTagRescueConfig = 0x51534552,
131 /** Integration Specific Firmware Binding: `ISFB`. */
132 kTlvTagIntegrationSpecificFirmwareBinding = 0x42465349,
133 /** Detached Signature: `SIGN`. */
134 kTlvTagDetachedSignature = 0x4e474953,
135 /** Not Present: `ZZZZ`. */
136 kTlvTagNotPresent = 0x5a5a5a5a,
137} tlv_tag_t;
138
139typedef struct struct_version {
140 uint8_t major;
141 uint8_t minor;
142} struct_version_t;
143
144typedef struct tlv_header {
145 uint32_t tag;
146 uint16_t length;
147 struct_version_t version;
148} tlv_header_t;
149
150typedef enum owner_sram_exec_mode {
151 /** SRAM Exec disabled and locked: `LNEX`. */
152 kOwnerSramExecModeDisabledLocked = 0x58454e4c,
153 /** SRAM Exec disabled: `NOEX`. */
154 kOwnerSramExecModeDisabled = 0x58454f4e,
155 /** SRAM Exec enabled: `EXEC` */
156 kOwnerSramExecModeEnabled = 0x43455845,
157} owner_sram_exec_mode_t;
158
159/**
160 * The owner configuration block describes an owner identity and configuration.
161 */
162typedef struct owner_block {
163 /**
164 * Header identifying this struct.
165 * tag: `OWNR`.
166 * length: 2048.
167 * version: 0
168 */
169 tlv_header_t header;
170 /** Configuraion version (monotonically increasing per owner) */
172 /** SRAM execution configuration (DisabledLocked, Disabled, Enabled). */
174 /** Ownership key algorithm (currently, only ECDSA is supported). */
176 /** Ownership update mode (one of OPEN, SELF, NEWV) */
177 uint32_t update_mode;
178 /** Set the minimum security version to this value (UINT32_MAX: no change) */
180 /** The device ID locking constraint */
182 /** The device ID to which this config applies */
183 uint32_t device_id[8];
184 /** Reserved space for future use. */
185 uint32_t reserved[16];
186 /** Owner public key. */
187 owner_keydata_t owner_key;
188 /** Owner's Activate public key. */
189 owner_keydata_t activate_key;
190 /** Owner's Unlock public key. */
191 owner_keydata_t unlock_key;
192 /** Data region to hold the other configuration structs. */
193 uint8_t data[1536];
194 /** Signature over the owner block with the Owner private key. */
195 owner_signature_t signature;
196 /** A sealing value to seal the owner block to a specific chip. */
197 uint32_t seal[8];
198} owner_block_t;
199
200OT_ASSERT_MEMBER_OFFSET(owner_block_t, header, 0);
201OT_ASSERT_MEMBER_OFFSET(owner_block_t, config_version, 8);
202OT_ASSERT_MEMBER_OFFSET(owner_block_t, sram_exec_mode, 12);
203OT_ASSERT_MEMBER_OFFSET(owner_block_t, ownership_key_alg, 16);
204OT_ASSERT_MEMBER_OFFSET(owner_block_t, update_mode, 20);
205OT_ASSERT_MEMBER_OFFSET(owner_block_t, min_security_version_bl0, 24);
206OT_ASSERT_MEMBER_OFFSET(owner_block_t, lock_constraint, 28);
207OT_ASSERT_MEMBER_OFFSET(owner_block_t, device_id, 32);
208OT_ASSERT_MEMBER_OFFSET(owner_block_t, reserved, 64);
209OT_ASSERT_MEMBER_OFFSET(owner_block_t, owner_key, 128);
210OT_ASSERT_MEMBER_OFFSET(owner_block_t, activate_key, 224);
211OT_ASSERT_MEMBER_OFFSET(owner_block_t, unlock_key, 320);
212OT_ASSERT_MEMBER_OFFSET(owner_block_t, data, 416);
213OT_ASSERT_MEMBER_OFFSET(owner_block_t, signature, 1952);
214OT_ASSERT_MEMBER_OFFSET(owner_block_t, seal, 2016);
215OT_ASSERT_SIZE(owner_block_t, 2048);
216
217/**
218 * The owner application domain designates an application key
219 * as one of Test, Dev or Prod.
220 */
221typedef enum owner_app_domain {
222 /** Test domain: `test` */
223 kOwnerAppDomainTest = 0x74736574,
224 /** Dev domain: `dev_` */
225 kOwnerAppDomainDev = 0x5f766564,
226 /** Prod domain: `prod` */
227 kOwnerAppDomainProd = 0x646f7270,
228} owner_app_domain_t;
229/**
230 * The owner application key encodes keys for verifying the owner's application
231 * firmware.
232 */
233typedef struct owner_application_key {
234 /**
235 * Header identifying this struct.
236 * tag: `APPK`.
237 * length: 48 + sizeof(key).
238 */
239 tlv_header_t header;
240 /** Key algorithm. One of ECDSA, SPX+ or SPXq20. */
241 uint32_t key_alg;
242 union {
243 struct {
244 /** Key domain. Recognized values: PROD, DEV, TEST */
245 uint32_t key_domain;
246 /** Key diversifier.
247 *
248 * This value is concatenated to key_domain to create an 8 word
249 * diversification constant to be programmed into the keymgr.
250 */
251 uint32_t key_diversifier[7];
252 };
253 uint32_t raw_diversifier[8];
254 };
255 /** Usage constraint must match manifest header's constraint */
257 /** Key material. Varies by algorithm type. */
258 owner_keydata_t data;
259} owner_application_key_t;
260
261OT_ASSERT_MEMBER_OFFSET(owner_application_key_t, header, 0);
262OT_ASSERT_MEMBER_OFFSET(owner_application_key_t, key_alg, 8);
263OT_ASSERT_MEMBER_OFFSET(owner_application_key_t, key_domain, 12);
264OT_ASSERT_MEMBER_OFFSET(owner_application_key_t, key_diversifier, 16);
265OT_ASSERT_MEMBER_OFFSET(owner_application_key_t, usage_constraint, 44);
266OT_ASSERT_MEMBER_OFFSET(owner_application_key_t, data, 48);
267OT_ASSERT_SIZE(owner_application_key_t, 144);
268
269enum {
270 kTlvLenApplicationKeySpx =
271 offsetof(owner_application_key_t, data) + sizeof(sigverify_spx_key_t),
272 kTlvLenApplicationKeyEcdsa =
273 offsetof(owner_application_key_t, data) + sizeof(ecdsa_p256_public_key_t),
274 kTlvLenApplicationKeyHybrid =
275 offsetof(owner_application_key_t, data) + sizeof(hybrid_key_t),
276};
277
278// clang-format off
279/**
280 * Bitfields for the `access` word of flash region configs.
281 */
282#define FLASH_CONFIG_READ ((bitfield_field32_t) { .mask = 0xF, .index = 0 })
283#define FLASH_CONFIG_PROGRAM ((bitfield_field32_t) { .mask = 0xF, .index = 4 })
284#define FLASH_CONFIG_ERASE ((bitfield_field32_t) { .mask = 0xF, .index = 8 })
285#define FLASH_CONFIG_PROTECT_WHEN_PRIMARY ((bitfield_field32_t) { .mask = 0xF, .index = 24 })
286#define FLASH_CONFIG_LOCK ((bitfield_field32_t) { .mask = 0xF, .index = 28 })
287
288/**
289 * Bitfields for the `properties` word of flash region configs.
290 */
291#define FLASH_CONFIG_SCRAMBLE ((bitfield_field32_t) { .mask = 0xF, .index = 0 })
292#define FLASH_CONFIG_ECC ((bitfield_field32_t) { .mask = 0xF, .index = 4 })
293#define FLASH_CONFIG_HIGH_ENDURANCE ((bitfield_field32_t) { .mask = 0xF, .index = 8 })
294// clang-format on
295
296/**
297 * The maximum number of owner_flash_region_t allower per slot.
298 */
299#define FLASH_CONFIG_REGIONS_PER_SLOT 3
300
301/**
302 * The owner flash region describes a region of flash and its configuration
303 * properties (ie: ECC, Scrambling, High Endurance, etc).
304 */
305typedef struct owner_flash_region {
306 /** The start of the region, in flash pages. */
307 uint16_t start;
308 /** The size of the region, in flash pages. */
309 uint16_t size;
310 /** The access properties of the flash region. */
311 uint32_t access;
312 /** The flash properties of the flash region. */
313 uint32_t properties;
314} owner_flash_region_t;
315OT_ASSERT_SIZE(owner_flash_region_t, 12);
316
317/**
318 * The owner flash config is a collection of owner region configuration items.
319 */
320typedef struct owner_flash_config {
321 /**
322 * Header identifiying this struct.
323 * tag: `FLSH`.
324 * length: 8 + 12 * length(config).
325 */
326 tlv_header_t header;
327 /**
328 * A list of flash region configurations.
329 * In each `config` item, the `access` and `properties` fields are xor-ed
330 * with the region index in each nibble (ie: index 1 == 0x11111111).
331 */
332 owner_flash_region_t config[];
333} owner_flash_config_t;
334OT_ASSERT_MEMBER_OFFSET(owner_flash_config_t, header, 0);
335OT_ASSERT_MEMBER_OFFSET(owner_flash_config_t, config, 8);
336OT_ASSERT_SIZE(owner_flash_config_t, 8);
337
338/**
339 * The owner info page describes an INFO page in flash and its configuration
340 * properties (ie: ECC, Scrambling, High Endurance, etc).
341 */
342typedef struct owner_info_page {
343 /** The bank where the info page is located. */
344 uint8_t bank;
345 /** The info page number. */
346 uint8_t page;
347 uint16_t _pad;
348 /** The access properties of the flash region. */
349 uint32_t access;
350 /** The flash properties of the flash region. */
351 uint32_t properties;
352} owner_info_page_t;
353OT_ASSERT_SIZE(owner_info_page_t, 12);
354
356 /**
357 * Header identifiying this struct.
358 * tag: `INFO`.
359 * length: 8 + 12 * length(config).
360 */
361 tlv_header_t header;
362 /**
363 * A list of flash info page configurations.
364 * In each `config` item, the `access` and `properties` fields are xor-ed
365 * with the region index in each nibble (ie: index 1 == 0x11111111).
366 */
367 owner_info_page_t config[];
368} owner_flash_info_config_t;
369OT_ASSERT_MEMBER_OFFSET(owner_flash_info_config_t, header, 0);
370OT_ASSERT_MEMBER_OFFSET(owner_flash_info_config_t, config, 8);
371OT_ASSERT_SIZE(owner_flash_info_config_t, 8);
372
373/**
374 * The owner rescue configuration describes how the rescue protocol should
375 * behave when invoked in the ROM_EXT.
376 */
377typedef struct owner_rescue_config {
378 /**
379 * Header identifiying this struct.
380 * tag: `RESQ`.
381 * length: 16 + sizeof(command_allow).
382 */
383 tlv_header_t header;
384 /**
385 * The rescue protocol:
386 * - 'X'modem.
387 * - 'U'SB-DFU.
388 * - 'S'PI-DFU.
389 */
390 uint8_t protocol;
391 /**
392 * The gpio configuration (if relevant, depending on `detect`).
393 *
394 * 7 2 1 0
395 * +---------------+--------+-------+
396 * | Reserved | PullEn | Value |
397 * +---------------+--------+-------+
398 */
399 uint8_t gpio;
400 /**
401 * The timeout configuration (not implemented yet).
402 *
403 * 7 6 0
404 * +-----+--------------------------+
405 * | EoF | Timeout |
406 * +-----+--------------------------+
407 */
408 uint8_t timeout;
409 /**
410 * Trigger detection configuration.
411 *
412 * 7 6 5 0
413 * +--------+-----------------------+
414 * | Detect | Index |
415 * +--------+-----------------------+
416 *
417 * Detect:
418 * 0 - None; index is meaningless.
419 * 1 - UART Break; index is meaningless.
420 * 2 - Strapping pins; index is the strapping value.
421 * 3 - GPIO; index is the pin to sample.
422 */
423 uint8_t detect;
424 /** The start offset of the rescue region in flash (in pages). */
425 uint16_t start;
426 /** The size of the rescue region in flash (in pages). */
427 uint16_t size;
428 /** An allowlist of rescue and boot_svc commands that may be invoked by the
429 * rescue protocol. The commands are identified by their 4-byte tags (tag
430 * identifiers between rescue commands and boot_svc commands are unique).
431 */
432 uint32_t command_allow[];
433} owner_rescue_config_t;
434OT_ASSERT_MEMBER_OFFSET(owner_rescue_config_t, header, 0);
435OT_ASSERT_MEMBER_OFFSET(owner_rescue_config_t, protocol, 8);
436OT_ASSERT_MEMBER_OFFSET(owner_rescue_config_t, gpio, 9);
437OT_ASSERT_MEMBER_OFFSET(owner_rescue_config_t, timeout, 10);
438OT_ASSERT_MEMBER_OFFSET(owner_rescue_config_t, detect, 11);
439OT_ASSERT_MEMBER_OFFSET(owner_rescue_config_t, start, 12);
440OT_ASSERT_MEMBER_OFFSET(owner_rescue_config_t, size, 14);
441OT_ASSERT_MEMBER_OFFSET(owner_rescue_config_t, command_allow, 16);
442OT_ASSERT_SIZE(owner_rescue_config_t, 16);
443
444#define RESCUE_ENTER_ON_FAIL_BIT 7
445#define RESCUE_TIMEOUT_SECONDS ((bitfield_field32_t){.mask = 0x7F, .index = 0})
446#define RESCUE_GPIO_PULL_EN_BIT 1
447#define RESCUE_GPIO_VALUE_BIT 0
448#define RESCUE_DETECT ((bitfield_field32_t){.mask = 0x03, .index = 6})
449#define RESCUE_DETECT_INDEX ((bitfield_field32_t){.mask = 0x3F, .index = 0})
450
451typedef enum rescue_protocol {
452 kRescueProtocolXmodem = 'X',
453 kRescueProtocolUsbDfu = 'U',
454 kRescueProtocolSpiDfu = 'S',
455} rescue_protocol_t;
456
457typedef enum rescue_detect {
458 kRescueDetectNone = 0,
459 kRescueDetectBreak = 1,
460 kRescueDetectStrap = 2,
461 kRescueDetectGpio = 3,
462} rescue_detect_t;
463
464/**
465 * The owner Integration Specific Firmware Binding (ISFB) configuration
466 * describes the configuration parameters for the ISFB region.
467 *
468 * Integrators have their own constraints that require owner firmware to be
469 * locked to certain integrator-device phases. The `ROM_EXT` needs to perform
470 * these constraint checks instead of the owner firmware because the rescue
471 * protocol bypasses any owner firmware level enforcement.
472 *
473 * Integrators can also perform their own rollback and upgrade automated testing
474 * using the strike words in the ISFB region. The erase policy implemented by
475 * this configuration entry allows the integrator to authorize erase operations
476 * of the ISFB region to configure devices for testing purposes.
477 */
478typedef struct owner_isfb_config {
479 /**
480 * Header identifiying this struct.
481 * tag: `ISFB`.
482 * length: 44 words.
483 */
484 tlv_header_t header;
485 /** The flash bank where the ISFB region is located. */
486 uint8_t bank;
487 /** The info flash page where the ISFB region is located. */
488 uint8_t page;
489 /** Padding for alignment */
490 uint16_t _pad;
491
492 /**
493 * The erase conditions for the ISFB region.
494 *
495 * This is a packed array of MUBI4 bools indicating which conditions authorize
496 * an erase. The conditions are aligned in little endian order: [B7, B6, B5,
497 * B4, B3, B2, B1, B0]
498 *
499 * The conditions are:
500 * - B0: Firmware must be signed with key specified by `key_domain` field.
501 * - B1: Firmware must be node locked (e.g. manifest usage constraints must be
502 * enabled).
503 * - B2: `manifest_ext_isfb_erase_t` must be present and set to harden true in
504 * the firmware manifest.
505 * - B3-B7: Reserved.
506 */
508 /** If `B0`, part of erase authorization criteria. */
509 uint32_t key_domain;
510 /** Reserved space for future use. */
511 uint32_t reserved[5];
512 /** Number of `uint32_t` reserved for product expressions. It has to be a
513 * value less than or equal to 256. */
515} owner_isfb_config_t;
516OT_ASSERT_MEMBER_OFFSET(owner_isfb_config_t, header, 0);
517OT_ASSERT_MEMBER_OFFSET(owner_isfb_config_t, bank, 8);
518OT_ASSERT_MEMBER_OFFSET(owner_isfb_config_t, page, 9);
519OT_ASSERT_MEMBER_OFFSET(owner_isfb_config_t, _pad, 10);
520OT_ASSERT_MEMBER_OFFSET(owner_isfb_config_t, erase_conditions, 12);
521OT_ASSERT_MEMBER_OFFSET(owner_isfb_config_t, key_domain, 16);
522OT_ASSERT_MEMBER_OFFSET(owner_isfb_config_t, reserved, 20);
523OT_ASSERT_MEMBER_OFFSET(owner_isfb_config_t, product_words, 40);
524OT_ASSERT_SIZE(owner_isfb_config_t, 44);
525
526/**
527 * A detached signature can be used to validate either a signed command or an
528 * owner block.
529 *
530 * Detached signatures are used when the signature is too larger to fit within
531 * the designated signature area of the original buffer. In such cases, the
532 * orginal buffer's signature field will be all zeros and the verification
533 * function will scan through the flash data pages to find the detached
534 * signature.
535 *
536 * The detached signature must be aligned on a flash page boundary.
537 */
539 /**
540 * Header identifying this struct.
541 * tag: `SIGN`.
542 * length: 8192.
543 */
544 tlv_header_t header;
545 uint32_t _pad[2];
546 /** The command associated with this signature (e.g. UNLK, ACTV, OWNR). */
547 uint32_t command;
548 /** The algorithm used to generate this signature (ownership_key_alg_t). */
549 uint32_t algorithm;
550 /** The current nonce associated with the command. */
551 nonce_t nonce;
552 /** The signature data. */
553 union {
554 uint32_t raw[2040];
555 ecdsa_p256_signature_t ecdsa;
556 sigverify_spx_signature_t spx;
557 struct {
558 ecdsa_p256_signature_t ecdsa;
559 sigverify_spx_signature_t spx;
560 } hybrid;
562} owner_detached_signature_t;
563
564OT_ASSERT_MEMBER_OFFSET(owner_detached_signature_t, header, 0);
565OT_ASSERT_MEMBER_OFFSET(owner_detached_signature_t, command, 16);
566OT_ASSERT_MEMBER_OFFSET(owner_detached_signature_t, algorithm, 20);
567OT_ASSERT_MEMBER_OFFSET(owner_detached_signature_t, nonce, 24);
568OT_ASSERT_MEMBER_OFFSET(owner_detached_signature_t, signature, 32);
569OT_ASSERT_SIZE(owner_detached_signature_t, 8192);
570
571#ifdef __cplusplus
572} // extern "C"
573#endif // __cplusplus
574#endif // OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_OWNERSHIP_DATATYPES_H_