Skip to content

Commit

Permalink
[signing] Publish Signing Ceremony 2024-01-18
Browse files Browse the repository at this point in the history
A signing ceremony was performed to sign the following items:
- SiVal and ProdC ROM_EXTs with the updated ePMP configuration.

The binaries contained in this PR were built at git commit
f3704b8

Signed-off-by: Chris Frantz <[email protected]>
  • Loading branch information
cfrantz committed Jan 18, 2024
1 parent 3b4e36e commit 5b3cb04
Show file tree
Hide file tree
Showing 17 changed files with 197 additions and 3 deletions.
192 changes: 192 additions & 0 deletions signing/logs/2024-01-18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
# Signing Ceremony 2024-01-18

- Purpose: sign SiVal ROM\_EXT and ProdC ROM\_EXT with the new ePMP
configuration.
- Participants: cfrantz (leader), moidx (witness).

## Ceremony Prolog

Before the ceremony, we double checked build reproducibility.
At opentitan commit f3704b841b585413247a92f4511d6a195d560c45 on branch
`earlgrey_es_sival`, we ran:

```
bazel build \
//sw/device/silicon_creator/rom_ext/prodc:digests \
//sw/device/silicon_creator/rom_ext/sival:digests
sha256sum \
bazel-out/k8-fastbuild/bin/sw/device/silicon_creator/rom_ext/prodc/digests.tar \
bazel-out/k8-fastbuild/bin/sw/device/silicon_creator/rom_ext/sival/digests.tar \
5a8bc69fe9df0d837249c88b946bc87f31ae5c4ec7b8703510f026f5c22a726d bazel-out/k8-fastbuild/bin/sw/device/silicon_creator/rom_ext/prodc/digests.tar
020b6fe74935ad9f1c5588465ce6f9feb70b176b450745a224fbb92c2a5edc9e bazel-out/k8-fastbuild/bin/sw/device/silicon_creator/rom_ext/sival/digests.tar
```

Having established that the binaries are reproducible, we copied the digests and
`hsmtool` to a staging subdirectory.
```
cp bazel-out/k8-fastbuild/bin/sw/device/silicon_creator/rom_ext/prodc/digests.tar ~/signing/prodc.tar
cp bazel-out/k8-fastbuild/bin/sw/device/silicon_creator/rom_ext/sival/digests.tar ~/signing/sival.tar
cp bazel-out/k8-fastbuild/bin/sw/host/hsmtool/hsmtool ~/signing
```

## Entrust HSM driver

No driver updates were required during this ceremony.

## Ceremony

### Setup & Authenticate to the HSM

```
$ export HSMTOOL_MODULE=/opt/nfast/toolkits/pkcs11/libcknfast.so
$ cd ~/signing
$ /opt/nfast/bin/preload -c earlgrey_a0 /bin/bash
2024-01-18 14:49:38: [15816]: INFO: Preload running with: -c earlgrey_a0 /bin/bash
2024-01-18 14:49:38: [15816]: INFO: Created a (new) connection to Hardserver
2024-01-18 14:49:38: [15816]: INFO: Modules newly usable: [1].
2024-01-18 14:49:38: [15816]: INFO: Found a change in the system: an update pass is needed.
2024-01-18 14:49:39: [15816]: INFO: Loading cardset: earlgrey_a0 in modules: [1]
Loading `earlgrey_a0':
Module 1 slot 0: empty
Module 1 slot 2: empty
Module 1 slot 3: empty
Module 1 slot 4: empty
Module 1 slot 0: `earlgrey_a0' #6
Module 1 slot 0:- passphrase supplied - reading card
Module 1 slot 0: `earlgrey_a0' #6: already read
Module 1 slot 0: empty
Module 1 slot 0: `earlgrey_a0' #3
Module 1 slot 0:- passphrase supplied - reading card
Module 1 slot 0: `earlgrey_a0' #3: already read
Module 1 slot 0: empty
Module 1 slot 0: `earlgrey_a0' #2
Module 1 slot 0:- passphrase supplied - reading card
Card reading complete.
2024-01-18 14:52:03: [15816]: INFO: Loading cardset: Cardset: earlgrey_a0 (1c7c...) in module: 1
2024-01-18 14:52:03: [15816]: INFO: Stored Cardset: earlgrey_a0 (1c7c...) in module #1
2024-01-18 14:52:03: [15816]: INFO: Maintaining the cardset earlgrey_a0 protected key(s)=['pkcs11:uc1c7c81df30010626431b8fa4c7fc646cac722b61-54bf627299209f050de6d490fe06b331dce656bb', 'pkcs11:uc1c7c81df30010626431b8fa4c7fc646cac722b61-826f19e10a525bc8ae593d5a9af960465d86b636', 'pkcs11:uc1c7c81df30010626431b8fa4c7fc646cac722b61-2a10059f018344a8f6450a1281de161df478a999', 'pkcs11:uc1c7c81df30010626431b8fa4c7fc646cac722b61-fe987257aaa6d3b9c9cefcbbe8a7d7393521c287', 'pkcs11:uc1c7c81df30010626431b8fa4c7fc646cac722b61-73fc0ba5bb8af48d168644cebed2543be1c57419', 'pkcs11:uc1c7c81df30010626431b8fa4c7fc646cac722b61-990cc0b5fb853aace101455f79ac48ffeac311f1', 'pkcs11:uc1c7c81df30010626431b8fa4c7fc646cac722b61-74f9033870f2653fd4973b0360da7de6d4f80f90'].
2024-01-18 14:52:03: [15816]: INFO: The private/symmetric key pkcs11/uc1c7c81df30010626431b8fa4c7fc646cac722b61-54bf627299209f050de6d490fe06b331dce656bb is loaded in module(s): [1].
2024-01-18 14:52:03: [15816]: INFO: The private/symmetric key pkcs11/uc1c7c81df30010626431b8fa4c7fc646cac722b61-826f19e10a525bc8ae593d5a9af960465d86b636 is loaded in module(s): [1].
2024-01-18 14:52:04: [15816]: INFO: The private/symmetric key pkcs11/uc1c7c81df30010626431b8fa4c7fc646cac722b61-2a10059f018344a8f6450a1281de161df478a999 is loaded in module(s): [1].
2024-01-18 14:52:04: [15816]: INFO: The private/symmetric key pkcs11/uc1c7c81df30010626431b8fa4c7fc646cac722b61-fe987257aaa6d3b9c9cefcbbe8a7d7393521c287 is loaded in module(s): [1].
2024-01-18 14:52:04: [15816]: INFO: The private/symmetric key pkcs11/uc1c7c81df30010626431b8fa4c7fc646cac722b61-73fc0ba5bb8af48d168644cebed2543be1c57419 is loaded in module(s): [1].
2024-01-18 14:52:04: [15816]: INFO: The private/symmetric key pkcs11/uc1c7c81df30010626431b8fa4c7fc646cac722b61-990cc0b5fb853aace101455f79ac48ffeac311f1 is loaded in module(s): [1].
2024-01-18 14:52:04: [15816]: INFO: The private/symmetric key pkcs11/uc1c7c81df30010626431b8fa4c7fc646cac722b61-74f9033870f2653fd4973b0360da7de6d4f80f90 is loaded in module(s): [1].
2024-01-18 14:52:04: [15816]: INFO: Loading complete. Executing subprocess /bin/bash
$ ./hsmtool token list
{
"tokens": [
{
"label": "loadshared accelerator",
"manufacturer_id": "nCipher Corp. Ltd",
"model": "",
"serial_number": ""
},
{
"label": "earlgrey_a0",
"manufacturer_id": "nCipher Corp. Ltd",
"model": "",
"serial_number": "1c7c81df30010626"
}
]
}
```

## Signing

Signing was performed in the staging subdirectory inside the `preload` subshell.

### ProdC signatures

```
$ mkdir prodc
$ cd prodc
$ tar xvf ../prodc.tar
$ ../hsmtool -t earlgrey_a0 -u user exec presigning.json
[
{
"command": "rsa-sign",
"result": {
"success": true
}
},
{
"command": "rsa-sign",
"result": {
"success": true
}
},
{
"command": "rsa-sign",
"result": {
"success": true
}
},
{
"command": "rsa-sign",
"result": {
"success": true
}
}
]
```

### SiVal signatures

```
$ mkdir sival
$ cd sival
$ tar xvf ../sival.tar
$ ../hsmtool -t earlgrey_a0 -u user exec presigning.json
[
{
"command": "rsa-sign",
"result": {
"success": true
}
},
{
"command": "rsa-sign",
"result": {
"success": true
}
},
{
"command": "rsa-sign",
"result": {
"success": true
}
},
{
"command": "rsa-sign",
"result": {
"success": true
}
}
]
```

## Ceremony Epilog

After signing, the signatures were collected so they could be tested prior to
publishing the signatures and binaries. The `preload` session was exited, thus logging out of the HSM.

```
$ tar cvf signatures.tar */*.rsa_sig
prodc/rom_ext_real_prod_signed_slot_a_fpga_cw310.rsa_sig
prodc/rom_ext_real_prod_signed_slot_a_silicon_creator.rsa_sig
prodc/rom_ext_real_prod_signed_slot_b_fpga_cw310.rsa_sig
prodc/rom_ext_real_prod_signed_slot_b_silicon_creator.rsa_sig
sival/rom_ext_real_prod_signed_slot_a_fpga_cw310.rsa_sig
sival/rom_ext_real_prod_signed_slot_a_silicon_creator.rsa_sig
sival/rom_ext_real_prod_signed_slot_b_fpga_cw310.rsa_sig
sival/rom_ext_real_prod_signed_slot_b_silicon_creator.rsa_sig
$ exit
```
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
&�0r��6e����n��G%�&���O�|����r��?3T����4=!�� �ٝ�A�yk�ps$y�c�V�K��:��De=#�A^��r���)�Ep@�ht�YKx�腄���gT�Hb�����b��Z]��K���7����_rB��?�9����t(̌� Z��8��t�v�v�=+VD��0Gv}�"+�� �o�=*��
�2ן�QS'�eݷ5� ����״&����7��A�4���K�aI��Ւxy��yARRKM��z����#[�@
��{�ۼ�w�����~�.��1N���܅Ӟ��e��K7�v��.0�K���u��h������H!+��H��J�Dž�|2 �_�@���� m�ҥf���>u�=q
��=gơ�E~���Dz�byOͷ]�� ;���_�����4+Vg]���i�3���.�5�u�n��� ��i�V�5 ���
+'��d�P��æ>ԣ7߂׌� �����k�
�=�����ܨI轓�>k6��ٖ�Ƥ���sβ%�k�5�k�Ȳ����b���ݘ��O��.9�Z$F{W9��e���G��e�1�7�6��� �Pޓ�"t� j�8�ȓΎUM�����w���� =3�`�a;���v� ��|�\�5��
T�i�h�f.`3,p0a4^�ݮC�G0�>�o��aT����X���vq0^.�h}��|���?��ӥ��=����^��&'��W'�\ �J�
E�6����bT��gI8�0�c
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 5b3cb04

Please sign in to comment.