Skip to content

Commit 6770e06

Browse files
sasdfsiemen11
authored andcommitted
[rom_ext] Remove redundant key_save in dice / dice_cwt
The `dice_chain` module now handles saving the issuer key to OTBN DMEM, rendering these individual `key_save` calls in the `dice` and `dice_cwt` libraries redundant. Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com> Change-Id: I9ea1f54d927ae48ace06e7ba1c0ee5d46a6a6964
1 parent b1513b5 commit 6770e06

2 files changed

Lines changed: 0 additions & 19 deletions

File tree

sw/device/silicon_creator/lib/cert/dice.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ rom_error_t dice_cdi_0_cert_build(hmac_digest_t *rom_ext_measurement,
162162

163163
HARDENED_RETURN_IF_ERROR(cdi_0_build_cert(&cdi_0_params, cert, cert_size));
164164

165-
// Save the CDI_0 private key to OTBN DMEM so it can endorse the next stage.
166-
HARDENED_RETURN_IF_ERROR(otbn_boot_attestation_key_save(
167-
kDiceKeyCdi0.keygen_seed_idx, kDiceKeyCdi0.type,
168-
*kDiceKeyCdi0.keymgr_diversifier));
169-
170165
return kErrorOk;
171166
}
172167

@@ -231,11 +226,6 @@ rom_error_t dice_cdi_1_cert_build(
231226

232227
HARDENED_RETURN_IF_ERROR(cdi_1_build_cert(&cdi_1_params, cert, cert_size));
233228

234-
// Save the CDI_1 private key to OTBN DMEM so it can endorse the next stage.
235-
HARDENED_RETURN_IF_ERROR(otbn_boot_attestation_key_save(
236-
kDiceKeyCdi1.keygen_seed_idx, kDiceKeyCdi1.type,
237-
*kDiceKeyCdi1.keymgr_diversifier));
238-
239229
return kErrorOk;
240230
}
241231

sw/device/silicon_creator/lib/cert/dice_cwt.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,6 @@ rom_error_t dice_cdi_0_cert_build(hmac_digest_t *rom_ext_measurement,
277277
HARDENED_RETURN_IF_ERROR(cwt_dice_chain_entry_build(
278278
&cwt_dice_chain_entry_params, cert, cert_size));
279279

280-
// Save the CDI_0 private key to OTBN DMEM so it can endorse the next stage.
281-
HARDENED_RETURN_IF_ERROR(otbn_boot_attestation_key_save(
282-
kDiceKeyCdi0.keygen_seed_idx, kDiceKeyCdi0.type,
283-
*kDiceKeyCdi0.keymgr_diversifier));
284280
return kErrorOk;
285281
}
286282

@@ -383,11 +379,6 @@ rom_error_t dice_cdi_1_cert_build(
383379
HARDENED_RETURN_IF_ERROR(cwt_dice_chain_entry_build(
384380
&cwt_dice_chain_entry_params, cert, cert_size));
385381

386-
// Save the CDI_1 private key to OTBN DMEM so it can endorse the next stage.
387-
HARDENED_RETURN_IF_ERROR(otbn_boot_attestation_key_save(
388-
kDiceKeyCdi1.keygen_seed_idx, kDiceKeyCdi1.type,
389-
*kDiceKeyCdi1.keymgr_diversifier));
390-
391382
return kErrorOk;
392383
}
393384

0 commit comments

Comments
 (0)