Software APIs
sigverify_rsa_keys_sival.c
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
6 #include "sw/device/silicon_creator/rom_ext/sigverify_keys.h"
7 #include "sw/device/silicon_creator/rom_ext/sival/keys/earlgrey_z0_sival_1.h"
8 
9 /**
10  * Number of RSA public keys.
11  */
12 enum {
13  kSigverifyRsaKeysCnt_ = 1,
14 };
15 const size_t kSigverifyRsaKeysCnt = kSigverifyRsaKeysCnt_;
16 
17 /**
18  * Step size to use when checking RSA public keys.
19  *
20  * This must be coprime with and less than `kSigverifyNumRsaKeys`.
21  * Note: Step size is not applicable when `kSigverifyNumRsaKeys` is 1.
22  */
23 const size_t kSigverifyRsaKeysStep = 1;
24 
25 /**
26  * Fake public keys for signature verification in tests.
27  */
28 const sigverify_rom_ext_key_t kSigverifyRsaKeys[kSigverifyRsaKeysCnt_] = {
29  {
30  .key = EARLGREY_Z0_SIVAL_1,
31  .key_type = kSigverifyKeyTypeFirmwareProd,
32  },
33 };