Skip to content

Commit

Permalink
[cert] correct hash sizes in cert templates
Browse files Browse the repository at this point in the history
A SHA256 hash is 32 bytes, not 20.

Signed-off-by: Tim Trippel <[email protected]>
  • Loading branch information
timothytrippel committed Jan 23, 2024
1 parent 0b11f09 commit c4b6c2e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions sw/device/silicon_creator/lib/cert/cdi_0.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
type: "byte-array",
size: 20,
},
// Hash of the ROM_EXT.
// Hash of the ROM_EXT (SHA256).
rom_ext_hash: {
type: "byte-array",
size: 20,
size: 32,
},
// Hash of the ownership manifest.
// Hash of the ownership manifest (SHA256).
ownership_manifest_hash: {
type: "byte-array",
size: 20,
size: 32,
},
// ROM_EXT security version, used to prevent rollback.
rom_ext_security_version: {
Expand Down
4 changes: 2 additions & 2 deletions sw/device/silicon_creator/lib/cert/cdi_1.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
type: "byte-array",
size: 20,
},
// Hash of the owner stage firmware.
// Hash of the owner stage firmware (SHA256).
owner_firmware_hash: {
type: "byte-array",
size: 20,
size: 32,
},
// Owner security version, used to prevent rollback.
owner_security_version: {
Expand Down
4 changes: 2 additions & 2 deletions sw/device/silicon_creator/lib/cert/generic.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
},
hash_1: {
type: "byte-array",
size: 20,
size: 32,
},
hash_2: {
type: "byte-array",
size: 20,
size: 32,
},
security_version: {
type: "integer",
Expand Down
6 changes: 3 additions & 3 deletions sw/device/silicon_creator/lib/cert/uds.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
// Hash of the creator_sw_cfg OTP partition (SHA256).
otp_creator_sw_cfg_hash: {
type: "byte-array",
size: 20,
size: 32,
},
// Hash of the owner_sw_cfg OTP partition (SHA256).
otp_owner_sw_cfg_hash: {
type: "byte-array",
size: 20,
size: 32,
},
// Hash of the hw_cfg OTP partition (SHA256).
otp_hw_cfg_hash: {
type: "byte-array",
size: 20,
size: 32,
},
},

Expand Down

0 comments on commit c4b6c2e

Please sign in to comment.