Skip to content

Commit 7324391

Browse files
committed
sim: add EC256 encryption key
Signed-off-by: Fabio Utzig <utzig@apache.org>
1 parent 5fde832 commit 7324391

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

enc-ec256-priv.pem

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg9h5Rnfj63aG32alk
3+
ZDtU0D3QH+V42ReYpSjKzGtnngahRANCAASKRHMAlMmAJzENIzZr6Wmfy8V8yEQa
4+
k+bufYamrl6TcnTZ4Vocm2UaK2FBKAJzhBKXOi2ioGd3AtpnGkvd13HM
5+
-----END PRIVATE KEY-----

enc-ec256-pub.pem

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-----BEGIN PUBLIC KEY-----
2+
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEikRzAJTJgCcxDSM2a+lpn8vFfMhE
3+
GpPm7n2Gpq5ek3J02eFaHJtlGithQSgCc4QSlzotoqBndwLaZxpL3ddxzA==
4+
-----END PUBLIC KEY-----

sim/mcuboot-sys/csupport/keys.c

+22
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,25 @@ const struct bootutil_key bootutil_enc_key = {
266266
.len = &enc_key_len,
267267
};
268268
#endif
269+
270+
#if defined(MCUBOOT_ENCRYPT_EC256)
271+
unsigned char enc_key[] = {
272+
0x30, 0x81, 0x87, 0x02, 0x01, 0x00, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
273+
0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,
274+
0x03, 0x01, 0x07, 0x04, 0x6d, 0x30, 0x6b, 0x02, 0x01, 0x01, 0x04, 0x20,
275+
0xf6, 0x1e, 0x51, 0x9d, 0xf8, 0xfa, 0xdd, 0xa1, 0xb7, 0xd9, 0xa9, 0x64,
276+
0x64, 0x3b, 0x54, 0xd0, 0x3d, 0xd0, 0x1f, 0xe5, 0x78, 0xd9, 0x17, 0x98,
277+
0xa5, 0x28, 0xca, 0xcc, 0x6b, 0x67, 0x9e, 0x06, 0xa1, 0x44, 0x03, 0x42,
278+
0x00, 0x04, 0x8a, 0x44, 0x73, 0x00, 0x94, 0xc9, 0x80, 0x27, 0x31, 0x0d,
279+
0x23, 0x36, 0x6b, 0xe9, 0x69, 0x9f, 0xcb, 0xc5, 0x7c, 0xc8, 0x44, 0x1a,
280+
0x93, 0xe6, 0xee, 0x7d, 0x86, 0xa6, 0xae, 0x5e, 0x93, 0x72, 0x74, 0xd9,
281+
0xe1, 0x5a, 0x1c, 0x9b, 0x65, 0x1a, 0x2b, 0x61, 0x41, 0x28, 0x02, 0x73,
282+
0x84, 0x12, 0x97, 0x3a, 0x2d, 0xa2, 0xa0, 0x67, 0x77, 0x02, 0xda, 0x67,
283+
0x1a, 0x4b, 0xdd, 0xd7, 0x71, 0xcc,
284+
};
285+
static unsigned int enc_key_len = 138;
286+
const struct bootutil_key bootutil_enc_key = {
287+
.key = enc_key,
288+
.len = &enc_key_len,
289+
};
290+
#endif

0 commit comments

Comments
 (0)