-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[provisioning] enable SIVAL cert endorsement with Nitrokeys
The DICE CA key is stored on a Nitrokey, which can be used in a benchtop provisioning flow to endorse DICE certificates. Signed-off-by: Tim Trippel <[email protected]>
- Loading branch information
1 parent
d6a9b03
commit 7cb476c
Showing
9 changed files
with
106 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright lowRISC contributors (OpenTitan project). | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
exports_files(glob(["**"])) | ||
|
||
filegroup( | ||
name = "ca_data", | ||
srcs = [ | ||
":ca_config.json", | ||
":dice_ca.pem", | ||
"//sw/device/silicon_creator/manuf/keys/fake:rma_unlock_enc_rsa3072.pub.der", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# CA Endorsement Keys | ||
|
||
Certificate Authority endorsement keys are are used to endorse the following | ||
certificate chains during personalization: | ||
1. DICE attestation certificate chains, and | ||
2. SKU specific certificate chains. | ||
|
||
The real (private) keys used for the SIVAL SKU are stored on offline HSMs. The | ||
matching public keys and certificates are checked into the repository. | ||
|
||
To use the private keys to endorse the certificates in benchtop provisioning | ||
flow, one must set the following envars: | ||
- `PKCS11_MODULE_PATH`: to point to the PKCS#11 shared library for the | ||
hardware token they are using, and | ||
- `PKCS11_TOKEN_PIN`: to the PIN used for hardware token authentication. | ||
|
||
For example, if the SIVAL private keys are stored on a Nitrokey, and you wanted | ||
to test the SIVAL FT provisioning flow, you would issue the following Bazel | ||
command: | ||
```sh | ||
bazel test --test_output=streamed \ | ||
//sw/device/silicon_creator/manuf/base:ft_provision_sival_fpga_hyper310_rom_with_fake_keys \ | ||
--action_env=PKCS11_MODULE_PATH=/opt/nitrokey/lib/libsc-hsm-pkcs11.so,PKCS11_TOKEN_PIN=<pin> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"dice": { | ||
"certificate": "sw/device/silicon_creator/manuf/keys/sival/dice_ca.pem", | ||
"key_id": "0x5398A4F090F2A95C3D52FC98DEB9F2F9AF042F6E", | ||
"key_type": "Token", | ||
"key": "sv00-earlgrey-a1-ca-dice-0" | ||
}, | ||
"ext": { | ||
"certificate": "sw/device/silicon_creator/manuf/keys/sival/dice_ca.pem", | ||
"key_id": "0x5398A4F090F2A95C3D52FC98DEB9F2F9AF042F6E", | ||
"key_type": "Token", | ||
"key": "sv00-earlgrey-a1-ca-dice-0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICCTCCAa+gAwIBAgIUfAUcL0N+fldtTdHg9BxeFFnfcVgwCgYIKoZIzj0EAwIw | ||
WTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExEDAOBgNVBAcMB1Nh | ||
bkpvc2UxDzANBgNVBAoMBkdvb2dsZTESMBAGA1UEAwwJb3BlbnRpdGFuMCAXDTI0 | ||
MTExNTAwMDA1OVoYDzIwNTIwNDAxMDAwMDU5WjBZMQswCQYDVQQGEwJVUzETMBEG | ||
A1UECAwKQ2FsaWZvcm5pYTEQMA4GA1UEBwwHU2FuSm9zZTEPMA0GA1UECgwGR29v | ||
Z2xlMRIwEAYDVQQDDAlvcGVudGl0YW4wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC | ||
AATu4HkgAzRXPJAhMw9E/qXZzoQ+Kx3awtKAPk29herxqr7d/bEYWVjKBpMg9QzT | ||
jQHQBswmU/H3GTr5FCjfas2fo1MwUTAdBgNVHQ4EFgQUU5ik8JDyqVw9UvyY3rny | ||
+a8EL24wHwYDVR0jBBgwFoAUU5ik8JDyqVw9UvyY3rny+a8EL24wDwYDVR0TAQH/ | ||
BAUwAwEB/zAKBggqhkjOPQQDAgNIADBFAiEAxEt33H247CtAoe6RGGf3yBOxf9Yj | ||
RWnePCJXdMIWIEACIHY1ZFYTLVZ9nzLPsU8Kl6DzmSU5h3Ykyf9qoAy7q7nF | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters