You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/secure-boot.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,11 +157,24 @@ to the path of the public key file in PEM format.
157
157
158
158
159
159
#### Hardware security modules
160
-
`rpi-eeprom-digest`is a shell script that wraps a call to `openssl dgst -sign`.
161
-
If the private key is stored within a hardware security module instead of
162
-
a .PEM file the `openssl` command will need to be replaced with the appropriate call to the HSM.
160
+
`rpi-eeprom-digest`supports delegating the RSA signing operation to an external **HSM wrapper**script via the `-H` argument, instead of reading a private key from a `.PEM` file with `-k`.
161
+
The wrapper script is responsible for performing an `rsa2048-sha256`PKCS#1 v1.5 signature using a key that is internal to the HSM (or otherwise not stored on disk) and printing the raw signature bytes as a hex string on stdout.
162
+
The wrapper is invoked as:
163
163
164
-
`rpi-eeprom-digest` is called by `update-pieeprom.sh` to sign the EEPROM config file.
where `hsm-wrapper` is a program that implements the interface:
169
+
170
+
```bash
171
+
hsm-wrapper -a rsa2048-sha256 INPUT_FILE
172
+
```
173
+
174
+
and writes the signature in hexadecimal format to stdout.
175
+
This encapsulates the private key handling inside the HSM wrapper while keeping the `rpi-eeprom-digest` and `rpi-sign-bootcode` command-line interfaces unchanged.
176
+
177
+
`rpi-eeprom-digest` is called by `update-pieeprom.sh` to sign the EEPROM config file, and the same HSM wrapper mechanism can be used there to keep the private key entirely within the HSM or wrapper.
165
178
166
179
The RSA public key must be stored within the EEPROM so that it can be used by the bootloader.
167
180
By default, the RSA public key is automatically extracted from the private key PEM file. Alternatively,
0 commit comments