Update dev keys and rsa_verify.c unit tests
This change moves the keys folder one level up, updates dev keys with
new ones, updates rsa_verify.c unit tests, and removes some files that
we don't need.
Signed-off-by: Alphan Ulusoy <alphan@google.com>
diff --git a/sw/device/silicon_creator/keys/README.md b/sw/device/silicon_creator/keys/README.md
new file mode 100644
index 0000000..032197c
--- /dev/null
+++ b/sw/device/silicon_creator/keys/README.md
@@ -0,0 +1,98 @@
+This directory contains ASN1 DER encoded development keys for signing ROM\_EXT
+images. Until we have a more ergonomic tool for working with keys and signatures,
+below snippets can be used for various operations.
+
+Generating a key pair:
+```
+$ openssl genrsa -out <basename>.pem <-f4,-3> 3072
+Generating RSA private key, 3072 bit long modulus (2 primes)
+..............................++++
+.....................................................................++++
+e is 3 (0x03)
+
+$ openssl rsa -outform DER -in <basename>.pem -out <basename>.private.der
+writing RSA key
+
+$ openssl rsa -outform DER -in <basename>.pem -pubout -out <basename>.public.der
+writing RSA key
+```
+
+Inspecting a key:
+```
+$ openssl rsa -inform DER -pubin -in <basename>.public.der -modulus -noout
+Modulus=DA81748B9EEBE1E6FABE9ACB1C0A...
+
+$ openssl rsa -inform DER -pubin -in <basename>.public.der -noout -text
+RSA Public-Key: (3072 bit)
+Modulus:
+ 00:da:81:74:8b:9e:eb:e1:e6:fa:be:9a:cb:1c:0a:
+ ...
+ e0:2f:43:dd:47:25:8f:e1:4b:15
+Exponent: 3 (0x3)
+```
+
+Calculating the digest of a message:
+```
+$ echo -n "test" | openssl dgst -sha256
+(stdin)= 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
+```
+
+Signing a message:
+```
+$ echo -n "test" | openssl dgst -sha256 -keyform DER -sign <basename>.private.der -hex
+(stdin)= ad46cc63c05f66deb638476a7d...
+```
+
+Verifying a signature:
+```
+$ echo -n "test" | openssl dgst -sha256 -keyform DER -sign <basename>.private.der -out test_sig
+$ echo -n "test" | openssl dgst -sha256 -keyform DER -verify <basename>.public.der -signature test_sig
+Verified OK
+```
+
+Printing the encoded message during signature verification:
+```
+$ openssl rsautl -verify -in test_sig -inkey <basename>.public.der -pubin -keyform DER -raw -hexdump
+0000 - 00 01 ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0010 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0020 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0030 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0040 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0050 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0060 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0070 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0080 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0090 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+00a0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+00b0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+00c0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+00d0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+00e0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+00f0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0100 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0110 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0120 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0130 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff ................
+0140 - ff ff ff ff ff ff ff ff-ff ff ff ff 00 30 31 30 .............010
+0150 - 0d 06 09 60 86 48 01 65-03 04 02 01 05 00 04 20 ...`.H.e.......
+0160 - 9f 86 d0 81 88 4c 7d 65-9a 2f ea a0 c5 5a d0 15 .....L}e./...Z..
+0170 - a3 bf 4f 1b 2b 0b 82 2c-d1 5d 6c 15 b0 f0 0a 08 ..O.+..,.]l.....
+```
+
+Please note that `openssl` outputs are big-endian while OpenTitan signature
+verification uses little-endian representation. Therefore, outputs of the commands
+above should be converted to little-endian before they can be used in tests or
+source code. One way to do this (until we have a more ergonomic way) is to pipe
+binary outputs to `xxd -p -c 4 | tac`:
+```
+$ echo -n "test" | openssl dgst -sha256 -binary | xxd -p -c 4 | tac
+b0f00a08
+d15d6c15
+2b0b822c
+a3bf4f1b
+c55ad015
+9a2feaa0
+884c7d65
+9f86d081
+```
+
diff --git a/sw/device/silicon_creator/keys/fpga_key_0.private.der b/sw/device/silicon_creator/keys/fpga_key_0.private.der
new file mode 100644
index 0000000..e69249e
--- /dev/null
+++ b/sw/device/silicon_creator/keys/fpga_key_0.private.der
Binary files differ
diff --git a/sw/device/silicon_creator/keys/fpga_key_0.public.der b/sw/device/silicon_creator/keys/fpga_key_0.public.der
new file mode 100644
index 0000000..5c2a9a6
--- /dev/null
+++ b/sw/device/silicon_creator/keys/fpga_key_0.public.der
Binary files differ
diff --git a/sw/device/silicon_creator/keys/fpga_key_1.private.der b/sw/device/silicon_creator/keys/fpga_key_1.private.der
new file mode 100644
index 0000000..3fe5858
--- /dev/null
+++ b/sw/device/silicon_creator/keys/fpga_key_1.private.der
Binary files differ
diff --git a/sw/device/silicon_creator/keys/fpga_key_1.public.der b/sw/device/silicon_creator/keys/fpga_key_1.public.der
new file mode 100644
index 0000000..9313b2e
--- /dev/null
+++ b/sw/device/silicon_creator/keys/fpga_key_1.public.der
Binary files differ
diff --git a/sw/device/silicon_creator/mask_rom/rsa_verify.c b/sw/device/silicon_creator/mask_rom/rsa_verify.c
index adcb0c7..1ee633d 100644
--- a/sw/device/silicon_creator/mask_rom/rsa_verify.c
+++ b/sw/device/silicon_creator/mask_rom/rsa_verify.c
@@ -74,8 +74,8 @@
* @param key An RSA public key.
* @param[out] result Buffer to write the result to, little-endian.
*/
-static void calc_r_square(const sigverify_rsa_key_t *key,
- sigverify_rsa_buffer_t *result) {
+void calc_r_square(const sigverify_rsa_key_t *key,
+ sigverify_rsa_buffer_t *result) {
memset(result->data, 0, sizeof(result->data));
// Since R/2 < n < R, this subtraction ensures that result = R mod n and
// fits in `kSigVerifyRsaNumWords` going into the loop.
diff --git a/sw/device/silicon_creator/mask_rom/rsa_verify.h b/sw/device/silicon_creator/mask_rom/rsa_verify.h
index 5495b2d..e84d264 100644
--- a/sw/device/silicon_creator/mask_rom/rsa_verify.h
+++ b/sw/device/silicon_creator/mask_rom/rsa_verify.h
@@ -14,6 +14,15 @@
extern "C" {
#endif // __cplusplus
+/**
+ * Calculates R^2 mod n, where R = 2^kSigVerifyRsaNumBits.
+ *
+ * @param key An RSA public key.
+ * @param[out] result Buffer to write the result to, little-endian.
+ */
+void calc_r_square(const sigverify_rsa_key_t *key,
+ sigverify_rsa_buffer_t *result);
+
// FIXME: Make static and move this comment to the source file. This is here
// just to be able to add a simple test.
/**
diff --git a/sw/device/silicon_creator/mask_rom/rsa_verify_unittest.cc b/sw/device/silicon_creator/mask_rom/rsa_verify_unittest.cc
index 5f28d5b..3728dae 100644
--- a/sw/device/silicon_creator/mask_rom/rsa_verify_unittest.cc
+++ b/sw/device/silicon_creator/mask_rom/rsa_verify_unittest.cc
@@ -12,10 +12,314 @@
namespace rsa_verify_unittest {
namespace {
+TEST(Keys, UniqueIds) {
+ std::unordered_set<uint32_t> ids;
+ for (auto const &key : kSigVerifyRsaKeys) {
+ ids.insert(sigverify_rsa_key_id_get(&key));
+ }
+
+ EXPECT_EQ(ids.size(), kSigVerifyNumRsaKeys);
+}
+
+/**
+ * An RSA public key and the corresponding R^2 mod n value.
+ */
+struct Rsquare {
+ /**
+ * Key to use in calculations.
+ */
+ const sigverify_rsa_key_t *key;
+ /**
+ * R^2 mod n.
+ *
+ * This value must match the result of `calc_r_square`. It can also be used to
+ * test `mont_mul` because `mont_mul(mont_mul(R^2, 1, n), 1, n) == 1`.
+ */
+ sigverify_rsa_buffer_t r_square;
+};
+
+/**
+ * R^2 mod n for each key in `sig_verify_keys.c`.
+ */
+constexpr Rsquare kRsquares[kSigVerifyNumRsaKeys] = {
+ {
+ .key = &kSigVerifyRsaKeys[0],
+ .r_square =
+ {
+ 0x801d910d, 0x80b82e51, 0x0693bd8e, 0xe504378f, 0xee7b8dcf,
+ 0xd46ed96e, 0x2947a90a, 0x32a22331, 0x10450a5d, 0x5191b02a,
+ 0x5ffe3000, 0xc5b99ee3, 0xe5783783, 0xe6b416da, 0xce7ba8ed,
+ 0x752bb7b5, 0x47a98315, 0xb31952a1, 0xdac6125f, 0x138a6e2f,
+ 0xbd918f95, 0x661dda95, 0xfea3ef97, 0xe265c457, 0x12ee497e,
+ 0x8c54e701, 0xab5f45bc, 0x97d03403, 0x08ecc282, 0xd67c28af,
+ 0x7680e1d5, 0xafb107b2, 0xa5d7dcc6, 0x78b545a7, 0x5c327005,
+ 0xe22e96eb, 0xead60b03, 0x62148024, 0xaa2295a2, 0x9a32b8b3,
+ 0x0bd3f91f, 0xe7d75213, 0x8664627a, 0x6dcc05db, 0x38f9c709,
+ 0x63b7939d, 0x22ceb26c, 0x5d59488f, 0xe2dac0ef, 0x6cd0d198,
+ 0x8ed032c9, 0x32ca4a38, 0x26178c9e, 0xa2d5d0a0, 0xaa325002,
+ 0x8467c351, 0x74695943, 0x2f8720ea, 0x587a3718, 0xd28bd879,
+ 0xab7c1d12, 0x10299814, 0x47416f21, 0xc6705399, 0x71639c47,
+ 0x667a4871, 0xc0534500, 0xb1ada3ce, 0x4c3bbfed, 0x88e232bc,
+ 0x3cbe6cbb, 0x6e3bbb4d, 0x66669fe5, 0x98bde921, 0x43fcba09,
+ 0xad4b0052, 0x3f725ede, 0xfe73709e, 0xdfb5ddf1, 0xc2a35f88,
+ 0x91010518, 0x18924c5d, 0xa18e0907, 0xc94a57c2, 0x23127d82,
+ 0x98eab0c7, 0x1ab48ef3, 0xfd34a853, 0x13d4ebd2, 0x28414f3b,
+ 0xc27de274, 0xe04f7ea4, 0xffdcf502, 0xf0085483, 0x4738d021,
+ 0x58adcd5d,
+ },
+ },
+ {
+ .key = &kSigVerifyRsaKeys[1],
+ .r_square =
+ {
+ 0x0326ea23, 0x46cc29a2, 0xa4d41d01, 0xef0981d2, 0x86beb258,
+ 0xcedba143, 0xcf27b7e9, 0x432c2e73, 0x57138268, 0x9771655d,
+ 0xdfd5054d, 0x80a69e65, 0xd8ca5b11, 0x64222c7f, 0x709e703b,
+ 0x0452dae6, 0x2604c1bf, 0xaf29f6b5, 0x2773bf22, 0x83ab42d4,
+ 0x34da57f5, 0xfad6aafc, 0xa23f2798, 0x88ab0542, 0x65219ceb,
+ 0xc5fc703c, 0x9bab047a, 0x48749a33, 0x7067f6d5, 0xfcab7cc9,
+ 0x878567df, 0x34e07abb, 0x6e5f5247, 0xdd57ed01, 0xd2cdc06e,
+ 0x0b3c509c, 0x1c94f373, 0xc07a0024, 0x8c92383b, 0x575b4a5c,
+ 0xd4c086fc, 0x27f19cd7, 0x496d70a4, 0x91d4b3cc, 0x73e34ca2,
+ 0xa98f4fd4, 0x02ef38ac, 0xfb0a0675, 0xba14f83d, 0x0217c95b,
+ 0xfc62ca77, 0x310b598c, 0x188e68cd, 0xdbcfdf58, 0xc783c009,
+ 0xd8abae8c, 0x52d5f747, 0xee2dbda8, 0xd1f5ea87, 0x097f0e5b,
+ 0x58407a2a, 0xfa880b9b, 0x528d2962, 0xa805f356, 0x9646688e,
+ 0x2525612b, 0x900cacf4, 0xf844b2a4, 0x04007862, 0x96535db6,
+ 0x25d03e7f, 0x4460bedf, 0x2961c014, 0x7a25057c, 0xf7bf0721,
+ 0xfed9dbff, 0x7dfee1e2, 0xa6c7bcd3, 0x2cef3ab5, 0x7c7ffdf8,
+ 0x4ab94057, 0x04c3cf7c, 0xf1022b35, 0x6cd62eae, 0x9e41a3b6,
+ 0x8a31357b, 0x40013d2d, 0x5005f7c7, 0xa3ce1d53, 0xfe99692c,
+ 0x8a612703, 0x2734ccde, 0xd115a702, 0x9b6c042c, 0xdd783f38,
+ 0x5713d609,
+ },
+ },
+};
+
+class RsquareTest : public testing::TestWithParam<Rsquare> {};
+
+/**
+ * Tests that `kRsquares` is not missing any keys.
+ *
+ * Comparing the result with the expected value for each key provides
+ * practically full coverage for `calc_r_square` since it is not called with any
+ * other inputs.
+ */
+TEST(Rsquares, AllKeys) {
+ std::unordered_set<uint32_t> ids;
+ for (auto const &test_case : kRsquares) {
+ ids.insert(sigverify_rsa_key_id_get(test_case.key));
+ }
+
+ EXPECT_EQ(ids.size(), kSigVerifyNumRsaKeys);
+}
+
+TEST_P(RsquareTest, CalcRsquare) {
+ // Uninitialized on purpose.
+ sigverify_rsa_buffer_t res;
+ calc_r_square(GetParam().key, &res);
+ EXPECT_THAT(res.data, ::testing::ElementsAreArray(GetParam().r_square.data));
+}
+
+TEST_P(RsquareTest, MontMul) {
+ constexpr sigverify_rsa_buffer_t one{1};
+ // Uninitialized on purpose.
+ sigverify_rsa_buffer_t res1;
+ sigverify_rsa_buffer_t res2;
+
+ // mont_mul(R^2, 1, n) = R mod n
+ mont_mul(GetParam().key, &GetParam().r_square, &one, &res1);
+ // mont_mul(R, 1, n) = 1
+ mont_mul(GetParam().key, &res1, &one, &res2);
+
+ EXPECT_THAT(res2.data, ::testing::ElementsAreArray(one.data));
+}
+
+INSTANTIATE_TEST_SUITE_P(AllKeys, RsquareTest, testing::ValuesIn(kRsquares));
+
+/**
+ * PKCS #1 v1.5 encoded messages used in tests.
+ */
+
+/**
+ * Message: "test"
+ * SHA2-256 hash (little-endian): {0xb0f00a08, 0xd15d6c15, 0x2b0b822c,
+ * 0xa3bf4f1b, 0xc55ad015, 0x9a2feaa0, 0x884c7d65, 0x9f86d081}
+ *
+ * Generated using the `openssl rsautl` command as discussed in
+ * sw/device/silicon_creator/keys/README.md.
+ */
+constexpr sigverify_rsa_buffer_t kEncMsgTest = {
+ 0xb0f00a08, 0xd15d6c15, 0x2b0b822c, 0xa3bf4f1b, 0xc55ad015, 0x9a2feaa0,
+ 0x884c7d65, 0x9f86d081, 0x05000420, 0x03040201, 0x86480165, 0x0d060960,
+ 0x00303130, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x0001ffff,
+};
+
+/**
+ * Inputs and expected values for computational tests involving signatures.
+ */
+struct SigTestCase {
+ /**
+ * Key to use in calculations.
+ */
+ const sigverify_rsa_key_t *key;
+ /**
+ * An RSA signature.
+ *
+ * Can be generated using the `openssl dgst` command as discussed in
+ * sw/device/silicon_creator/keys/README.md.
+ */
+ sigverify_rsa_buffer_t sig;
+ /**
+ * sig^2 * R^-1 mod n.
+ *
+ * This value must match the result of `mont_mul(sig, sig, n)` and can be
+ * obtained by computing the above expression, e.g. in python.
+ */
+ sigverify_rsa_buffer_t sig_mont_mul;
+ /**
+ * sig^e mod n.
+ *
+ * This value must match the result of `mod_exp(sig, e, n)`.
+ */
+ const sigverify_rsa_buffer_t *enc_msg;
+};
+
+constexpr SigTestCase kSigTestCases[2]{
+ // message: "test"
+ {
+ .key = &kSigVerifyRsaKeys[0],
+ .sig =
+ {
+ 0xeb28a6d3, 0x936b42bb, 0x76d3973d, 0x6322d536, 0x253c7547,
+ 0x1bfdda9f, 0x597b8193, 0xccac0b02, 0xb3b66a5b, 0xa7880e18,
+ 0x04846239, 0x4e927eda, 0x37883753, 0x8bc059cd, 0xdc6102d5,
+ 0xa702185d, 0xf963eec8, 0xfed8f779, 0xc606461b, 0xa5326e90,
+ 0x87f4ef4b, 0xddaa7f8b, 0xcdae0535, 0x1174dbc8, 0x345db563,
+ 0x57b9dd37, 0xd6ff9402, 0x1c8077ec, 0x02e76f6f, 0x135797fe,
+ 0x92ca1d0c, 0x84da4abf, 0xce3f4b43, 0xe3d47def, 0x510ba10e,
+ 0x9940e174, 0x5c0635bc, 0x8fc7b1d6, 0x9ee042d9, 0x68dc09c7,
+ 0x30b54030, 0xf2336aa6, 0xaf6535f9, 0x7b1fc0e1, 0xeea50f7c,
+ 0xe1d2f4b3, 0xa0405640, 0xc035d5b9, 0x34ee81ef, 0xf1460ecf,
+ 0x943b5734, 0xae5dcd6e, 0x64373ca7, 0x968dd9e5, 0xd1916ff3,
+ 0x0c4e1ab5, 0x5ba76542, 0x9488cc72, 0x35ef4275, 0x071eef2a,
+ 0x64516088, 0x42a383fd, 0x477678ee, 0xd1c7c37d, 0x7f55cf49,
+ 0x24f62205, 0x564dfc4a, 0x8b305ceb, 0x46917278, 0xab9bf3c3,
+ 0x9a1f6739, 0x188c264e, 0x32c584e9, 0x54d0e1d6, 0x967710a1,
+ 0x1efe8ffb, 0x299e277a, 0x0ea61f6c, 0xf7845775, 0x78386d10,
+ 0x66245c4f, 0xfd52953a, 0x955b4b10, 0x6b7d9d30, 0x68fc106f,
+ 0xbaaebfac, 0x653b64bd, 0x826a3baa, 0x98703747, 0x6ee930ec,
+ 0xacbb94d8, 0xcede8d12, 0xa17b3cb0, 0xa520fe81, 0x84df2df5,
+ 0x4f97181e,
+ },
+ .sig_mont_mul =
+ {
+ 0x8bce09dc, 0x8117aaf5, 0x75fb01e0, 0x622d893a, 0x46d42e04,
+ 0xc6b19ba4, 0xa7c09e75, 0x97793a53, 0xf8b64e2b, 0x2fc2b08e,
+ 0xe3e5fbff, 0x2a84abbd, 0x5c49ff33, 0xf9d60b9c, 0x0dc15132,
+ 0xc23f4cdf, 0xd6e95f5f, 0x3f9c847d, 0x0234939c, 0x7326725d,
+ 0x0da0d7c8, 0xc256ddcc, 0xd1b5f8e4, 0xdd8c5da0, 0xfed1e177,
+ 0x25ac7c96, 0x54b3efb6, 0x703ca0f1, 0x68974bea, 0x73b62f01,
+ 0x5950cd02, 0x0a430e77, 0xca92ac5c, 0xe7d45063, 0x7b45e172,
+ 0x1bcb281a, 0x4a104046, 0x1887ccbc, 0xc85432b9, 0xe577bf0c,
+ 0x483dfa54, 0x0f074e63, 0x4be1fe15, 0xca2fabdd, 0xd9d1a6d8,
+ 0x2502bf8c, 0x9687dbd4, 0xa9b0dcf7, 0x90b2e7ee, 0x4af1e395,
+ 0x4e1d42e7, 0x799a8905, 0x28149ec0, 0xeb6a3bab, 0xfd74060e,
+ 0x7cc5574c, 0xf844c82f, 0xac3a4b25, 0x60fd00ff, 0xc5649499,
+ 0xb306c551, 0x33bd6825, 0x6cdf5a41, 0xa80cb818, 0x60bc2349,
+ 0x3b8c1533, 0x4098f3d0, 0xb07c04b1, 0x47f63388, 0xbe0f7133,
+ 0xd697b7b5, 0xb0d075fb, 0x0ab2ee07, 0x8593da0a, 0xfbcd5b45,
+ 0x61ce5320, 0xce82719c, 0x9ce114bc, 0xa82b12da, 0x1cb971a4,
+ 0xf77d1c06, 0xb6bb905d, 0x6fd9a1f1, 0xefbfe75e, 0x7f648024,
+ 0x29921282, 0x1d0c9025, 0x48dab624, 0xbbc6619e, 0xa38f9b32,
+ 0xf4f8d082, 0xfdf8f227, 0x177ffebb, 0x7fc84cb3, 0xb8d739f2,
+ 0x5992c1c0,
+ },
+ .enc_msg = &kEncMsgTest,
+
+ },
+ // message: "test"
+ {
+ .key = &kSigVerifyRsaKeys[1],
+ .sig =
+ {
+ 0xb13844fa, 0x9c7622d8, 0xda09bdc4, 0x79fde5c6, 0x7037a98b,
+ 0x4d53a5cf, 0xabd7e9e4, 0x8456c575, 0x1f1fc5f6, 0x7870e2d5,
+ 0x96a488c2, 0x7aa2263c, 0xbe5dbcf1, 0x34a6b2ff, 0x51bd23fa,
+ 0xef582d6d, 0x52d0e2fa, 0x586c6b2f, 0x0aa1e7d0, 0x0d1f8a33,
+ 0xf95e28bc, 0x70f13b45, 0x548740b0, 0x42be7f0d, 0x4254ac6f,
+ 0xb7363b68, 0x48f1c461, 0x06b8f936, 0xd3274353, 0x121219e4,
+ 0x98d8e770, 0x39e1bb17, 0x1a005ad4, 0x673985f4, 0x6f2cfd4a,
+ 0xba537c5f, 0x1ca6bdad, 0x5e7bdb7d, 0x9b6783bd, 0xf3a1e998,
+ 0xa5dc56f6, 0x149d6bb5, 0x9437917a, 0xfeb89880, 0x6e6ce5f9,
+ 0x07bece66, 0xaab327ae, 0x1ff13a9e, 0x35e3b280, 0x645b636a,
+ 0x34628104, 0xda8148ee, 0x95d22ce1, 0x78f4e1a0, 0xec9bdf2e,
+ 0x42fc69d0, 0x4b8e5244, 0x192a0454, 0x7bfd31dc, 0x09a07d77,
+ 0x2a3c745b, 0x8d5deeb7, 0xb539505c, 0xd5352a21, 0x22fd9774,
+ 0x6fd4f48f, 0x60d2c5e9, 0x9292c725, 0x035797d8, 0x8bbb8d02,
+ 0x977bdd02, 0x2da179b2, 0xa9779cc9, 0x13c5fe29, 0x607c3673,
+ 0x8e52aeca, 0x6fd9ea3a, 0x5915a281, 0x69dc74c2, 0x162207fb,
+ 0x1efa0497, 0x0a9e1a61, 0x3542ac58, 0x885d5d5e, 0x29623b26,
+ 0x14cbc783, 0xa2f9511e, 0xfcb8986f, 0x6b7ca8d8, 0xde4c53b2,
+ 0x4f8fd997, 0x2eded334, 0xe9d492dd, 0xd0751bc1, 0x9077d8cd,
+ 0x5563ec91,
+ },
+ // Note: This is not the least non-negative residue of sig^2*R^-1 mod n.
+ .sig_mont_mul =
+ {
+ 0x5a6fe519, 0x7f5b040d, 0x363568d4, 0xf199dc93, 0x0b88ca6a,
+ 0xa8dc9812, 0xba42c5e1, 0x3c7e0b39, 0x02142e93, 0x517784b3,
+ 0x442c3a51, 0xdf015f60, 0xc1168915, 0x85fd610e, 0xcf28e92f,
+ 0xb6397f84, 0x4a263275, 0x3419dd89, 0x1ffa6455, 0xf13b29be,
+ 0xf567fc9f, 0x3592d2e6, 0xf2d5cdfd, 0x62ffa92d, 0x05fd99f0,
+ 0xde88fbc2, 0x32f074d2, 0x5773eac8, 0xefb84135, 0x7ec58441,
+ 0xaa2d38c6, 0xd14bdab5, 0xc67281b9, 0xeab5ff55, 0xfd71e3c8,
+ 0x758b576c, 0xf28f53fb, 0x454f996a, 0x08734870, 0xb7f17b3e,
+ 0x33a58eab, 0xbb6a4b69, 0xe3ed75b5, 0x83a05765, 0x3dcc3502,
+ 0xe34a0bc9, 0x33146f45, 0x762645b2, 0xdfda8a41, 0xd05f66db,
+ 0x4367ffb2, 0xceec2aa3, 0x791f3c44, 0x83e7e788, 0x7b8b8b74,
+ 0x1bd3032d, 0x111ba6d1, 0xd075cc96, 0x3aebbe0f, 0xc928abf1,
+ 0x87090f1f, 0x7d937d59, 0xb030bd9d, 0xdb397398, 0x6ea6fc58,
+ 0xcae53095, 0xc1a23d24, 0x814d9abc, 0x8e73da7e, 0x84924ef0,
+ 0xd82cee3b, 0xd46dd52f, 0x21cf7a77, 0xba8e9f48, 0x6eac3832,
+ 0x59eb8346, 0xf4944cde, 0x99b5fa50, 0xa6803df2, 0xa047f7cd,
+ 0x8caff8bd, 0x9b171d90, 0x7a5f94f2, 0xfe787dbd, 0x30b6dba0,
+ 0x59aff83b, 0xc63302d1, 0x6f34350f, 0xc533c9ea, 0x44833e9d,
+ 0xf3720531, 0xbc55560c, 0xf6ac39fb, 0xfaa3ed21, 0xfb77f6ed,
+ 0xb365e0b4,
+ },
+ .enc_msg = &kEncMsgTest,
+ },
+};
+
+TEST(SigTestCases, AllKeys) {
+ std::unordered_set<uint32_t> ids;
+ for (auto const &test_case : kSigTestCases) {
+ ids.insert(sigverify_rsa_key_id_get(test_case.key));
+ }
+
+ EXPECT_EQ(ids.size(), kSigVerifyNumRsaKeys);
+}
+
+class MontMul : public testing::TestWithParam<SigTestCase> {};
+
TEST(MontMul, SmallNumbers) {
- // Values are from ex. 14.35 in Handbook of Applied Cryptography except for m'
- // and expected result are computed for base 2^32 and R = 2^3072 (96 base 2^32
- // digits):
+ // Values are from ex. 14.35 in Handbook of Applied Cryptography except for
+ // m' and expected result are computed for base 2^32 and R = 2^3072 (96 base
+ // 2^32 digits):
// - m' = -m^-1 mod b = 3837733825
// - R^-1 mod m = 72136
// - x * y * R^-1 mod m = 55123
@@ -35,49 +339,22 @@
EXPECT_THAT(exp_res.data, ::testing::ElementsAreArray(act_res.data));
}
-TEST(MontMul, LargeNumbers) {
- constexpr sigverify_rsa_buffer_t sig{
- 0xceb7e983, 0xe693b200, 0xf9153989, 0xcf899599, 0x1ec09fae, 0xf2f88007,
- 0x2a24eed5, 0x9c5b7c4e, 0x21a153b2, 0xaf7583ae, 0x04fdd694, 0x7550094b,
- 0xb2a69ac4, 0xe49d8022, 0x7ed6f162, 0x14bb3a1b, 0xbb29d8dd, 0x5c5815c2,
- 0x7a80d848, 0xb122f449, 0x59dca808, 0xbc1443e2, 0xe304ff93, 0xcc97ee4b,
- 0x42ef6b57, 0x1436839f, 0xae860b45, 0x6a843a17, 0x2381fb91, 0x09fd0635,
- 0xa431aac3, 0xd7220269, 0xdf3e2697, 0x35e2915e, 0xedba6956, 0x1d387448,
- 0x930006df, 0x961e5f00, 0xf2a7e960, 0x884e4add, 0x7dfe76b1, 0x4079aa79,
- 0x1f3a378d, 0x96c20697, 0x268aea57, 0x2c8569a4, 0x0474f512, 0x2388555c,
- 0x58679953, 0xe73da3a0, 0x43431b9a, 0x699f04d3, 0xfc0be066, 0xcce606f2,
- 0xd94cdfa0, 0x6c1ddca3, 0xe96c11f6, 0xfc635db4, 0x3bdb4f69, 0xa621c3e7,
- 0x9f292111, 0xb86e1e6b, 0xb74f923b, 0x592967a0, 0xc412097f, 0x8c1c8ca7,
- 0x494fcdb6, 0x87c5fe0f, 0x50c01aee, 0x8a26368e, 0xeaf12232, 0x7dade4d8,
- 0x39eb2ac6, 0x744f8aaa, 0xf34908ca, 0x1e0c656c, 0xe96d4e29, 0x8575d194,
- 0xe439bd31, 0xa74a77e3, 0x0f465b88, 0xf4e21152, 0x80400ad8, 0xe58501ec,
- 0xa29d7536, 0x55c19326, 0x9ebbc63e, 0x20c75aee, 0xef6783d7, 0x59ffdba5,
- 0x879b937b, 0x43a5c74c, 0x82b8f825, 0xfdf04b3a, 0x8fc62fbe, 0x114e6da5,
- };
- constexpr sigverify_rsa_buffer_t exp_res{
- 0x7603d6bd, 0xe7714c93, 0x97cf4c0a, 0xa2f79f2b, 0xd6d9a47a, 0x666d8e1d,
- 0x298e418a, 0xdbb713ec, 0x84d319fd, 0x1e89e6c3, 0xa4671f40, 0xc324a13b,
- 0x528c47d0, 0xa4dd82ef, 0x07d00906, 0xa42d7bc9, 0xdaa7dabb, 0x7833ef95,
- 0x8bd072e1, 0x79cc5b32, 0x0acce463, 0x72341597, 0x48771929, 0x7ed99ffe,
- 0x16c6323b, 0x79dfb968, 0xf0a209fe, 0x7f92c8aa, 0x0f1588aa, 0xc83fdf6f,
- 0x5711982a, 0x2dae9583, 0x7cb22468, 0x646a7389, 0x5dde7838, 0x3d7bfa5e,
- 0xf044da0c, 0xe18031a3, 0x41f219eb, 0x137f03e7, 0xeee7e63b, 0x0ca6e484,
- 0x7a7834fd, 0x9dc43ffe, 0x2e577301, 0xf35042b3, 0x6617b57c, 0xda6b7dc4,
- 0xf8a6dd5b, 0x67059290, 0x86866edc, 0x094355af, 0xc7989f1a, 0x10a9d520,
- 0xda9ee036, 0x7e54f825, 0xbcd4f122, 0xe3e10de1, 0xed1d7412, 0xd84936df,
- 0x2afb47dd, 0xee084c01, 0xf3dc8101, 0x56e4539c, 0xf16a855a, 0x3e09bf8f,
- 0xa01e4b9d, 0x09791f8b, 0x94e0ffc6, 0x698b0428, 0x066418c3, 0x418bf9fa,
- 0x9e07ba2a, 0xf5487bfd, 0x7e4ddea5, 0x31086807, 0x4c4cc5d9, 0xb4e58126,
- 0x9bb65989, 0xf88824e9, 0xd97fb609, 0xa4cafb2e, 0x932e86d1, 0x59f0d7d2,
- 0x71df95b3, 0x083ec525, 0x0759cea9, 0xe487335d, 0xbeb42a5c, 0x7dc33154,
- 0x59e45235, 0x11ca6d14, 0x43334239, 0xfe7cd561, 0xb161f750, 0xafcef8de,
- };
- // Uninitialized on purpose.
- sigverify_rsa_buffer_t act_res;
+TEST_P(MontMul, Sig) {
+ sigverify_rsa_buffer_t res;
+ mont_mul(GetParam().key, &GetParam().sig, &GetParam().sig, &res);
+ EXPECT_THAT(res.data,
+ ::testing::ElementsAreArray(GetParam().sig_mont_mul.data));
+}
- mont_mul(&kSigVerifyRsaKeys[0], &sig, &sig, &act_res);
+INSTANTIATE_TEST_SUITE_P(AllCases, MontMul, testing::ValuesIn(kSigTestCases));
- EXPECT_THAT(act_res.data, ::testing::ElementsAreArray(exp_res.data));
+class ModExp : public testing::TestWithParam<SigTestCase> {};
+
+TEST_P(ModExp, EncMsg) {
+ sigverify_rsa_buffer_t res;
+ EXPECT_EQ(sigverify_mod_exp_ibex(GetParam().key, &GetParam().sig, &res),
+ true);
+ EXPECT_THAT(res.data, ::testing::ElementsAreArray(GetParam().enc_msg->data));
}
TEST(ModExp, BadExp) {
@@ -88,104 +365,7 @@
EXPECT_EQ(sigverify_mod_exp_ibex(&bad_key, &empty, &empty), false);
}
-TEST(ModExp, Exp65537) {
- constexpr sigverify_rsa_buffer_t sig{
- 0xceb7e983, 0xe693b200, 0xf9153989, 0xcf899599, 0x1ec09fae, 0xf2f88007,
- 0x2a24eed5, 0x9c5b7c4e, 0x21a153b2, 0xaf7583ae, 0x04fdd694, 0x7550094b,
- 0xb2a69ac4, 0xe49d8022, 0x7ed6f162, 0x14bb3a1b, 0xbb29d8dd, 0x5c5815c2,
- 0x7a80d848, 0xb122f449, 0x59dca808, 0xbc1443e2, 0xe304ff93, 0xcc97ee4b,
- 0x42ef6b57, 0x1436839f, 0xae860b45, 0x6a843a17, 0x2381fb91, 0x09fd0635,
- 0xa431aac3, 0xd7220269, 0xdf3e2697, 0x35e2915e, 0xedba6956, 0x1d387448,
- 0x930006df, 0x961e5f00, 0xf2a7e960, 0x884e4add, 0x7dfe76b1, 0x4079aa79,
- 0x1f3a378d, 0x96c20697, 0x268aea57, 0x2c8569a4, 0x0474f512, 0x2388555c,
- 0x58679953, 0xe73da3a0, 0x43431b9a, 0x699f04d3, 0xfc0be066, 0xcce606f2,
- 0xd94cdfa0, 0x6c1ddca3, 0xe96c11f6, 0xfc635db4, 0x3bdb4f69, 0xa621c3e7,
- 0x9f292111, 0xb86e1e6b, 0xb74f923b, 0x592967a0, 0xc412097f, 0x8c1c8ca7,
- 0x494fcdb6, 0x87c5fe0f, 0x50c01aee, 0x8a26368e, 0xeaf12232, 0x7dade4d8,
- 0x39eb2ac6, 0x744f8aaa, 0xf34908ca, 0x1e0c656c, 0xe96d4e29, 0x8575d194,
- 0xe439bd31, 0xa74a77e3, 0x0f465b88, 0xf4e21152, 0x80400ad8, 0xe58501ec,
- 0xa29d7536, 0x55c19326, 0x9ebbc63e, 0x20c75aee, 0xef6783d7, 0x59ffdba5,
- 0x879b937b, 0x43a5c74c, 0x82b8f825, 0xfdf04b3a, 0x8fc62fbe, 0x114e6da5,
- };
- constexpr sigverify_rsa_buffer_t exp_res{
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- };
- // Uninitialized on purpose.
- sigverify_rsa_buffer_t act_res;
-
- EXPECT_EQ(sigverify_mod_exp_ibex(&kSigVerifyRsaKeys[0], &sig, &act_res),
- true);
- EXPECT_THAT(act_res.data, ::testing::ElementsAreArray(exp_res.data));
-}
-
-TEST(ModExp, Exp3) {
- constexpr sigverify_rsa_buffer_t sig{
- 0xca60cb6e, 0xd3a786de, 0x37623afb, 0x7f6cbc1a, 0x5366d957, 0xe69ffe2f,
- 0x3560dc40, 0xf8b205c5, 0xa612764f, 0xb0415cf7, 0x5c5b87d9, 0xe0081c67,
- 0xadc8d9bd, 0xdd072b18, 0x8e22b48b, 0x758b9df3, 0xb208d5ab, 0x5f1bcb08,
- 0xb16f9e88, 0xf2d37daf, 0xf7fc6ecb, 0x5a102bb9, 0xe61a9b3f, 0x96541e3e,
- 0x3718d3ef, 0x769b35c2, 0xf571f77a, 0x82a6f325, 0xaa5ef30c, 0x17048840,
- 0xc71ddc21, 0xc7bc71ed, 0x14f7ed74, 0x7a3d6a80, 0xebb0c73d, 0x5f28b2c2,
- 0x56a502db, 0x39a3814f, 0x37df9ba4, 0x397e700d, 0x6c03a24d, 0x9efa0232,
- 0x257c4b77, 0xa928a03a, 0x43455edd, 0x57e509fb, 0x32458a00, 0x09941f22,
- 0xca9af629, 0x76a01068, 0x4c638cbe, 0x9b8a3ff6, 0x3979752d, 0x6d4c9bb8,
- 0x3ee6189c, 0xab9b7212, 0x2116de70, 0x429344c4, 0x072412c7, 0x747fff3d,
- 0x9d07cc3f, 0xb188d846, 0xcf4959ed, 0xc622387c, 0x32aeb26b, 0xf2921d28,
- 0x60793032, 0x061e4108, 0x6d70682b, 0x062ffa0b, 0x2b1f1696, 0x507a26f5,
- 0x1401059c, 0x202485a9, 0xfe963ae9, 0x54423a9d, 0x9731f9bb, 0x227e9788,
- 0x50846b54, 0x1e9f59f1, 0x3f158119, 0xc36f0b7b, 0xbef3b349, 0xf9172b6f,
- 0x3daf21c0, 0x819ee37e, 0x0bba9299, 0x90727884, 0xc74908f9, 0xec095a40,
- 0x8e2120dd, 0xfbefd497, 0x2227f721, 0xb7abdc98, 0xf7e55656, 0x3be75b5c,
- };
- constexpr sigverify_rsa_buffer_t exp_res{
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555, 0x55555555,
- };
- // Uninitialized on purpose.
- sigverify_rsa_buffer_t act_res;
-
- EXPECT_EQ(sigverify_mod_exp_ibex(&kSigVerifyRsaKeys[1], &sig, &act_res),
- true);
- EXPECT_THAT(act_res.data, ::testing::ElementsAreArray(exp_res.data));
-}
-
-TEST(Keys, UniqueIds) {
- std::unordered_set<uint32_t> ids;
- for (auto const &key : kSigVerifyRsaKeys) {
- ids.insert(sigverify_rsa_key_id_get(&key));
- }
-
- EXPECT_EQ(ids.size(), kSigVerifyNumRsaKeys);
-}
+INSTANTIATE_TEST_SUITE_P(AllCases, ModExp, testing::ValuesIn(kSigTestCases));
} // namespace
} // namespace rsa_verify_unittest
diff --git a/sw/device/silicon_creator/mask_rom/sig_verify_keys.c b/sw/device/silicon_creator/mask_rom/sig_verify_keys.c
index 00372d1..1283bd3 100644
--- a/sw/device/silicon_creator/mask_rom/sig_verify_keys.c
+++ b/sw/device/silicon_creator/mask_rom/sig_verify_keys.c
@@ -6,102 +6,71 @@
/**
* Public keys for signature verification.
+ *
+ * Note: Updating the struct below currently requires some manual steps since we
+ * don't have a tool to generate them yet:
+ * - `n` (modulus) can be obtained using `openssl` and converting its output to
+ * little-endian,
+ * - `n0_inv` can be computed using `n[0]`, and
+ * - `exponent` can be obtained using `openssl`.
+ *
+ * Please see sw/device/silicon_creator/keys/README.md for more details.
*/
const sigverify_rsa_key_t kSigVerifyRsaKeys[kSigVerifyNumRsaKeys] = {
+ // sw/device/silicon_creator/keys/fpga_key_0.public.der
[0] =
{
- // Private exponent d:
- // 0xbebf06e3, 0x59d7e511, 0xe619ae0c, 0xb93ce7f6, 0xa83b89ca,
- // 0x53c176f4, 0x869ef22b, 0xf8df4b83, 0x12ab013a, 0x98c927fc,
- // 0xa4d57150, 0x0ce4696f, 0xdc931298, 0x2ced7d20, 0x973b5537,
- // 0x2069a742, 0xf1559248, 0x13158c94, 0x16fef892, 0x82581bed,
- // 0x15a7cba4, 0xc72a52e0, 0x7455bd70, 0x23eab41c, 0x0158da45,
- // 0x82db6557, 0xec7bc157, 0x111b4eb0, 0x81c487dc, 0xf166df69,
- // 0xde9a6b93, 0xedec8247, 0x6ddc889a, 0x5224cc0a, 0xce4b46fd,
- // 0xde1e8772, 0x6417d968, 0x1d960144, 0x72dffbec, 0xd2619e50,
- // 0x4ce73407, 0x25d7da23, 0xae72329a, 0xe43d4e29, 0x3e177edf,
- // 0x70c58f2c, 0x8c9b7735, 0x514af916, 0x7e40bb19, 0xfab769ff,
- // 0xdebb08e7, 0x6814f4f4, 0x352e82b3, 0x29c4d1b5, 0x61d485c8,
- // 0x5cdb05a4, 0xcc6dd5cb, 0xd36a6e38, 0xf987ff5b, 0x2d060e8b,
- // 0x84e66f62, 0xb0812761, 0x43414a06, 0xd21ff673, 0xa1317052,
- // 0xf6f8cc01, 0x51c14c15, 0x1809b28f, 0x176965e5, 0x19b912be,
- // 0x4097243f, 0xd7db29e3, 0xdf239b2c, 0xd08adbd2, 0xe25a3638,
- // 0x2aac03ff, 0xa852eef0, 0xc41587cb, 0x8e20154b, 0x5232c192,
- // 0x1d222a04, 0x5dedf724, 0x2fc54533, 0x3280b58b, 0x48e91ae9,
- // 0x7748ae0c, 0x5a41dee3, 0xf5d82e3e, 0x85ff1006, 0x84bd1a55,
- // 0x51f24349, 0x6f3e7cb3, 0x2cdaa80f, 0x947efef7, 0x07bffad6,
- // 0x60417307,
.n = {{
- 0x6a6a75e1, 0xa018ddc5, 0x687bb168, 0x8e8205a5, 0x7dbfffa7,
- 0xc8722ac5, 0xf84d21cf, 0xe1312531, 0x0ce3f8a3, 0xa825f988,
- 0x57f51964, 0xb27e206a, 0x8e1dd008, 0x1c4fb8d7, 0x824fb142,
- 0x1c8be7b3, 0x7b9d6366, 0xc56ad0f2, 0xef762d5b, 0x4b1431e3,
- 0x8ae28eb9, 0xd41db7aa, 0x43cccdf7, 0x91b74a84, 0x80183850,
- 0x30e74d0d, 0xb62ed015, 0x235574d2, 0x8c28f251, 0x4f40def2,
- 0x24e2efdb, 0x9ebd1ff2, 0xfa7b49ee, 0x2819a938, 0x6e66b8c8,
- 0x24e41546, 0x4d783a7c, 0xd2947d3d, 0x1ab269e9, 0xfad39f16,
- 0xaab78f7b, 0x49d8b510, 0x35bf0dfb, 0xeb274754, 0x069eccc9,
- 0xc13c437e, 0xe3bc0f60, 0xc9e0e12f, 0xc253ac43, 0x89c240e0,
- 0xc4aba4e5, 0xedf34bc0, 0x5402c462, 0x4021b0bd, 0x996b6241,
- 0xc3d9945f, 0xa137ac60, 0xf0250bf5, 0xc8c7100f, 0xb70d6b88,
- 0x78916a8c, 0x33370e5d, 0x3970dcb9, 0xaf4c58b4, 0x5f78cb0d,
- 0xb02d90b7, 0xeb6c3d05, 0x04afc71a, 0x45185f0f, 0x987caa5b,
- 0x33976249, 0x565afdbc, 0x80a85056, 0x59e07655, 0x9a29e77d,
- 0x7a8dfb7f, 0x782e0204, 0x4d6713ff, 0x131000ea, 0xe18e1206,
- 0x21f57f30, 0xf24f038b, 0x59cf874d, 0x24c50525, 0xb52f170d,
- 0x46c9adde, 0x90e82c73, 0x1344ceaf, 0x663209f2, 0x24bd4fbf,
- 0x5e4ed04d, 0x0fce770a, 0x81f78793, 0xa792e13e, 0xa6c7bf58,
- 0xe1df9be8,
+ 0x5801a2bd, 0xeff64a46, 0xc8cf2251, 0xa7cd62cb, 0x634a39c2,
+ 0x55c936d3, 0x463d61fc, 0x762ebbaa, 0x01aadfb2, 0x23da15d1,
+ 0x8475fdc6, 0x4ec67b7b, 0xe9364570, 0xd23ec7c7, 0x98038d63,
+ 0x5688a56b, 0x68037add, 0xb20ff289, 0x9d96c1ce, 0xbac0b8cd,
+ 0xead33d0b, 0x195f89c8, 0xd7dc110e, 0xf5bccc12, 0x8dfa33dc,
+ 0xedc404d2, 0x74ef8524, 0x9197c0c8, 0x79cc448e, 0x4c9c505d,
+ 0x4a586ad7, 0xe2d0f071, 0x589f28c2, 0x2ca7fc22, 0x0354b0e2,
+ 0xefb63b44, 0x33a75b04, 0x9e194454, 0x1b4b2cde, 0x8e3f78e0,
+ 0x5260877c, 0x05685b72, 0x4868ad4e, 0x10303ac9, 0x05ac2411,
+ 0x5e797381, 0xd5407668, 0xe3522348, 0xa33134f8, 0x38f7a953,
+ 0xd926f672, 0x136f6753, 0xb186b0ab, 0x5ccab586, 0x61e5bf2e,
+ 0x9fc0eebb, 0x788ed0bd, 0x47b5fc70, 0xf971262a, 0x3b40d99b,
+ 0x5b9fd926, 0xce3c93bf, 0xd406005e, 0x72b9e555, 0xc9b9273e,
+ 0xfcef747f, 0xf0a35598, 0x2761e8f6, 0xec1799df, 0x462bc52d,
+ 0x8e47218b, 0x429ccdae, 0xe7e7d66c, 0x70c70b03, 0x0356c3d2,
+ 0x3cb3e7d1, 0xd42d035d, 0x83c529a3, 0x8df9930e, 0xb082e1f0,
+ 0x07509c30, 0x5c33a350, 0x4f6884b9, 0x7b9d2de0, 0x0f1d16b3,
+ 0x38dbcf55, 0x168580ea, 0xc2f2aca4, 0x43f0ae60, 0x227dd2ed,
+ 0xd8dc61f4, 0x9404e8bc, 0x0db76fe3, 0x3491d3b0, 0x6ca44e27,
+ 0xcda63719,
}},
- .n0_inv = 4036719071,
+ .n0_inv = 0x9c9a176b,
.exponent = 65537,
},
+ // sw/device/silicon_creator/keys/fpga_key_1.public.der
[1] =
{
- // Private exponent d:
- // 0x129c022b, 0x13e47956, 0xdfec2aca, 0xb814ecac, 0x72c55992,
- // 0xfcf87ab5, 0x29091c15, 0xed118f4d, 0xcdf98cba, 0x8ce9d3c4,
- // 0x5870f4aa, 0x1466b189, 0xf61cd198, 0x898e7523, 0xb083e2af,
- // 0x41c9533c, 0xf3a3d236, 0xb85f886e, 0x3a3d6426, 0x310a128e,
- // 0x6bd63e65, 0xa8b5a275, 0xb01bd973, 0x0bfd31a7, 0xc0860d67,
- // 0x9c82b2e4, 0x58b5313d, 0x10a5cdbb, 0x4c8756e1, 0xde699fc1,
- // 0x64b7ea15, 0x0de1a5ab, 0x5ec3810e, 0xcdab8036, 0x2914896e,
- // 0x3fc10cdd, 0x029e6787, 0x8a9fb6ee, 0x114d4a63, 0x48e7fb42,
- // 0x28593dc1, 0x72ae9ccf, 0x921ad67b, 0xcccc6d1e, 0x79956f79,
- // 0x6bc6189e, 0x1cb13c91, 0x80c0e7c9, 0x0c6ea14b, 0xf631e8ac,
- // 0x866f54e7, 0xe1771b9a, 0x57026f77, 0xa4068cb9, 0xde218576,
- // 0x932e8df6, 0xd0641b5b, 0x65cc6e0f, 0x3fdaac0e, 0x9d036254,
- // 0x74f8e2f2, 0x55245512, 0xa3626209, 0x8bdec1d9, 0x393ce8b3,
- // 0xa013b9bb, 0xf9708b92, 0x62aa3401, 0x7eed6670, 0xcc084151,
- // 0xc594ff05, 0x359ba561, 0x6735cc4a, 0xbba98282, 0x3dec3980,
- // 0xe91eb975, 0x854dc579, 0x09c5dc6f, 0x660655d4, 0x46d4c3fc,
- // 0x7b942f7c, 0x756586c2, 0x7057ce35, 0x2ca213c7, 0xd900854e,
- // 0xb22aab06, 0xb8c816a0, 0x941aa9ae, 0x864e97a1, 0xf69ecc7d,
- // 0x5a3b56bc, 0xca0180ca, 0x67012e82, 0x4f7ac33c, 0x391a1b40,
- // 0x1e70f217,
.n = {{
- 0x3489eab3, 0x23e3d222, 0xbe69ae96, 0xccc537fa, 0xf83c6774,
- 0xe683f91b, 0x9c588896, 0x44654dec, 0x96729ce1, 0x625a6410,
- 0x6435e750, 0xec42933f, 0x130c9e34, 0xeb1834b6, 0x2a117689,
- 0xb3b2f7bf, 0x21f92171, 0x4c1a1765, 0x9a92fe4b, 0xac9b5286,
- 0x0049c14f, 0x2531d556, 0x3f6e28ae, 0xe12124a6, 0x40b11690,
- 0xecfb1d29, 0x9af61602, 0x3d0f71b9, 0x1b9246cf, 0xbe254ff6,
- 0xb2003ba0, 0x440c6682, 0x251589aa, 0xb65e34bb, 0x3c17861f,
- 0xc24717a0, 0x35588598, 0xf8b64e80, 0x71cd790b, 0xa7ba410a,
- 0x98ece611, 0x3502cc9b, 0xc75ac49f, 0x415dd4ee, 0x657989ed,
- 0x784146ac, 0x3d6dada5, 0xb59e1a7a, 0x4a97c7c6, 0xc52b7408,
- 0x269bfd6f, 0x48caa59f, 0x0a0e9ccf, 0xd8274c58, 0x34c920c7,
- 0x731753c9, 0xe258a425, 0x62ca945e, 0x7f200856, 0xae144df9,
- 0xbdd551af, 0xfed9fe6e, 0xd44e4c37, 0x47388b19, 0x576d7435,
- 0xc0765a63, 0xd8a3456f, 0x4ffd380b, 0xf99066a2, 0xc83187e8,
- 0xa17dfa22, 0x41a5e04a, 0x6b42c9bd, 0x65f90f0e, 0x73895904,
- 0x76b858bf, 0x1fd2a0db, 0x3aa32a9d, 0x642602f8, 0xa8fc97ea,
- 0xe5791ce9, 0xc061288e, 0xa20ed540, 0x0bcc76ac, 0x16031fd5,
- 0x2d000229, 0x54b087c4, 0x789ffa18, 0x25d78dc9, 0xc7b8caf1,
- 0x1d64086d, 0xbc0904be, 0x6a071710, 0xdce0936a, 0x569ca381,
- 0xb6a5ac8b,
+ 0xbd158913, 0xab75ea1a, 0xc04e5292, 0x68f5778a, 0xa71418c7,
+ 0xddc4fc1c, 0xcb09302d, 0xedf3142b, 0x656d7d85, 0xf761d32a,
+ 0x2d334d1b, 0x26c91770, 0x5b9ba5a0, 0x00ac6c05, 0xbabaf1bb,
+ 0xa8299ecc, 0xb4223f99, 0x5b676ad3, 0xcaa786c2, 0x3e2f1785,
+ 0x204b6991, 0x21fa118f, 0x435573ab, 0xa3353ba1, 0x1074c161,
+ 0x2ad5e901, 0x7310247c, 0x1e21b8e9, 0x0cfc7762, 0x0a9139b1,
+ 0xfc655b33, 0x6990faaf, 0xbb88faec, 0x7c7bd6ef, 0x261e4555,
+ 0x6bc3d813, 0x5ce6e18b, 0xdd308629, 0x37d3d54d, 0x65acd84d,
+ 0x97b7e0c3, 0xc0d35caa, 0xb0be177a, 0x09473af3, 0x67f43155,
+ 0x3b2f7661, 0xf9255df2, 0x1b42c84c, 0x355cd607, 0x835e74ca,
+ 0x1d011c4e, 0x46652555, 0x1566f96f, 0x6cffd2f9, 0x204e783e,
+ 0xa178a2eb, 0xe7297a95, 0xd7380039, 0x1a685545, 0x76ed97c9,
+ 0x6bc0b1b7, 0xd9b1338e, 0xa3b23005, 0x6fe7109f, 0x01c232e1,
+ 0x851639c5, 0xe81d338c, 0x25ebe0c4, 0x5b0202cd, 0x3690cb70,
+ 0xad13b664, 0x8bf7833e, 0x6017349c, 0xf6e90b08, 0x953ef3d8,
+ 0x4bc11817, 0xd0f6e840, 0xfe01a954, 0x9b866209, 0xb9653ff8,
+ 0x0d654f5c, 0xff78177c, 0x3688833c, 0x57cc0c30, 0x71965be7,
+ 0xf61fb728, 0xaeac8ca2, 0xbdc9848b, 0x954c529f, 0x9917ac7f,
+ 0x4ba4c007, 0xce2dbf0b, 0xfc7d8504, 0x2712580b, 0xd0293151,
+ 0xa4dbbff3,
}},
- .n0_inv = 0x88df2b85,
+ .n0_inv = 0x079056e5,
.exponent = 3,
},
};
diff --git a/sw/device/silicon_creator/rom_exts/keys/README.md b/sw/device/silicon_creator/rom_exts/keys/README.md
deleted file mode 100644
index b9acedb..0000000
--- a/sw/device/silicon_creator/rom_exts/keys/README.md
+++ /dev/null
@@ -1,112 +0,0 @@
-# Introduction
-
-The main idea of the development key pair and other signing artefacts is to
-make cross-development of on device and host side components for ROM_EXT
-signing easier.
-
-It is also useful when starting new development, as it is easier to make sure
-that signing process is correct by matching the produced hashes and signatures
-against the reference files provided.
-
-Typical use-case would be - signing ROM_EXT image via host side tooling, and
-then using the same key pair on device to validate the signature.
-
-Files breakdown:
-- `test_key_private.pem` : private key (DER encoded binary) in PEM
- representation.
-- `test_key_public.pem` : public key (DER encoded binary) in PEM
- representation.
-`testing` sub-directory:
-- `hello_world.bin` : reference file containing "Hello World!".
-- `hello_world_digest.base64` : SHA-256 digest in base64 representation.
-- `hello_world.sign.base64` : RSASSA-PKCS1-V1_5-SIGN signature (DER encoded
- binary) in base64 representation.
-
-** Please note that some tools/libraries require files in DER binary encoding.
-Instructions below include commands to generate DER keys and signature
-artifacts. **
-
-# Keys
-
-This guide assumes that commands are run from within `sw/device/silicon_creator/rom_exts/keys`
-directory.
-
-`cd sw/device/silicon_creator/rom_exts/keys`
-
-## How the key pair was generated?
-
-```
-// Private RSA key in `.pem` and `.der` representations.
-openssl genrsa -3 -out test_key_private.pem 3072
-openssl rsa -in test_key_private.pem -outform DER -out test_key_private.der
-```
-
-```
-// Public RSA key in `.pem` and `.der` representations.
-openssl rsa -in test_key_private.pem -pubout -out test_key_public.pem
-openssl rsa \
- -in test_key_private.pem \
- -outform DER -pubout \
- -out test_key_public.der
-```
-
-# Hash, signature generation and verification.
-
-This guide assumes that commands are run from within
-`sw/device/silicon_creator/rom_exts/keys/testing` directory.
-
-`cd sw/device/silicon_creator/rom_exts/keys/testing`
-
-## How the reference file was signed?
-
-```
-// Hash generation.
-openssl dgst -sha256 -binary -out hello_world_digest.bin hello_world.bin
-
-// Convert hash from binary to base64.
-openssl base64 -in hello_world_digest.bin -out hello_world_digest.base64
-
-// Convert hash from base64 to binary.
-openssl base64 -d -in hello_world_digest.base64 -out hello_world_digest.bin
-```
-
-```
-// RSASSA-PKCS1-V1_5-SIGN.
-// For DER use `-keyform DER` and `-inkey ../test_key_private.der`.
-openssl pkeyutl \
- -keyform PEM \
- -inkey ../test_key_private.pem \
- -pkeyopt rsa_padding_mode:pkcs1 \
- -pkeyopt digest:sha256 \
- -in hello_world_digest.bin \
- -out hello_world.sign -sign
-```
-
-```
-// Convert the signature from binary to base64.
-openssl base64 -in hello_world.sign -out hello_world.sign.base64
-
-// Convert the signature from base64 to binary.
-openssl base64 -d -in hello_world.sign.base64 -out hello_world.sign
-```
-
-## Signature verification.
-
-```
-// From source.
-openssl dgst \
- -sha256 \
- -verify ../test_key_public.pem \
- -signature hello_world.sign \
- hello_world.bin
-```
-
-```
-// From hash.
-openssl pkeyutl \
- -verify \
- -in hello_world_digest.bin \
- -sigfile hello_world.sign \
- -pkeyopt digest:sha256 \
- -inkey ../test_key_private.pem
-```
diff --git a/sw/device/silicon_creator/rom_exts/keys/test_key_private.pem b/sw/device/silicon_creator/rom_exts/keys/test_key_private.pem
deleted file mode 100644
index d24715a..0000000
--- a/sw/device/silicon_creator/rom_exts/keys/test_key_private.pem
+++ /dev/null
@@ -1,39 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-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
------END RSA PRIVATE KEY-----
diff --git a/sw/device/silicon_creator/rom_exts/keys/test_key_public.pem b/sw/device/silicon_creator/rom_exts/keys/test_key_public.pem
deleted file mode 100644
index fa708e4..0000000
--- a/sw/device/silicon_creator/rom_exts/keys/test_key_public.pem
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PUBLIC KEY-----
-MIIBoDANBgkqhkiG9w0BAQEFAAOCAY0AMIIBiAKCAYEA1UaqkxKjjxVY1TnvkaIQ
-JGZoMky1sAVmbWmu8U6Yh/HIRfwoHOI7ZU6oYP2MZrC9DvGIsGAS3sjnbwmEont6
-83dYj1ZIXGorwfozYP8ZdWXO/ADfspoVPCyztaJPgXM4ZKF9fOXQalW1MLd0/3hT
-tDbufbSCgyXSsf9oAhpQPMcIETUXd3RuLl6frHXxpdZjLsE31mY6XxtH/VVd4nYO
-9JW8Rvx6mgv5hG/hRTw/oD+v4Px6pE6dXIPSEBElRvOiE4/MO2O01Vb4n1WgVO8g
-k5V++VB6lCGHLgEcV9NRwnIxuBr7SNAA321sSvEin9Nh7SwqK1ZK/uEBl3Y5l+JQ
-ReZD7tcJMdRqrtXspMYanyDm3JTE7zAhrbp1Q7C6CBnT8QqXKL61xIE5cb1k2/Bu
-1cZjh70uBcHz2zKntAe43Tp35kWWDEZrJkSLYZcLMmK3P6O3VzL6gJvWSu/wMs8q
-rQB1kmthD/2c2X+VCrsMarabKLmIEkWBvTtMSZRpWT5fAgED
------END PUBLIC KEY-----
diff --git a/sw/device/silicon_creator/rom_exts/keys/testing/hello_world.sign.base64 b/sw/device/silicon_creator/rom_exts/keys/testing/hello_world.sign.base64
deleted file mode 100644
index 2d3cc3d..0000000
--- a/sw/device/silicon_creator/rom_exts/keys/testing/hello_world.sign.base64
+++ /dev/null
@@ -1,8 +0,0 @@
-X11NVgfrm7cE5zWg3ExDTZ/kQuohY2Z2xvLzhOXIXbA4Z6p6cAyslFL3CfLUyFlt
-RgO/1pKZG8ix0l86d5oKccS7+HYPJOuigEN02saQGa4pLqKD5RQ7eA036CdyLhld
-uUFECpt+jlSGS/XCtbxuMxdCqTRQ9S+a90gcxv/T1O3ZZHss9EOPMCXVF4MP6itw
-8QsDCTMCZLZP61i13RJZyUBnreR98FLCT1P6V7wFk093pgYQNHwE7trEGsAi8qxh
-/k+2AOoG79qKfxeYsctWYl+bZPLSIlnBHm6rW8zb27McHxpodVQaJS3Kvw9E4Off
-xBGqKciyIWIol9MPamYnxufV+VmHgPdLrfs7DwsW35Ep5RKuk4MOagwP6366I/6w
-re0Muaqb9hKQ6lWxyRhaBFELu1KaOphpJ6jcjjhb90WF4JzCcRpPg5jKcDoDmX2m
-oVmU/TQYsMw6c549RkIud8KykRVfFzab/AMoo1k7fUMP3Ejpg3lJa7838C6NFAKT
diff --git a/sw/device/silicon_creator/rom_exts/keys/testing/hello_world_digest.base64 b/sw/device/silicon_creator/rom_exts/keys/testing/hello_world_digest.base64
deleted file mode 100644
index 79c4de5..0000000
--- a/sw/device/silicon_creator/rom_exts/keys/testing/hello_world_digest.base64
+++ /dev/null
@@ -1 +0,0 @@
-f4OxZX/x/FO5LcGBSKHWXfwtSx+j1ncoSt3SABJtkGk=