Skip to content

Commit

Permalink
keys: Add sample x25519 priv/pub keys
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Utzig <utzig@apache.org>
  • Loading branch information
utzig committed Apr 10, 2020
1 parent feb6c4c commit 3fc84bf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions enc-x25519-priv.pem
@@ -0,0 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VuBCIEICiAL+/vgpVQ8UGTA2wbuUlsUeUmh493B/i0HwRFbYRP
-----END PRIVATE KEY-----
3 changes: 3 additions & 0 deletions enc-x25519-pub.pem
@@ -0,0 +1,3 @@
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VuAyEApnrfU1lvc6n45HmsC6ogwvmJkv+Wltehx3CxYYsqD3A=
-----END PUBLIC KEY-----
14 changes: 14 additions & 0 deletions sim/mcuboot-sys/csupport/keys.c
Expand Up @@ -283,3 +283,17 @@ const struct bootutil_key bootutil_enc_key = {
.len = &enc_key_len,
};
#endif

#if defined(MCUBOOT_ENCRYPT_X25519)
unsigned char enc_key[] = {
0x30, 0x2e, 0x02, 0x01, 0x00, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65, 0x6e,
0x04, 0x22, 0x04, 0x20, 0x28, 0x80, 0x2f, 0xef, 0xef, 0x82, 0x95, 0x50,
0xf1, 0x41, 0x93, 0x03, 0x6c, 0x1b, 0xb9, 0x49, 0x6c, 0x51, 0xe5, 0x26,
0x87, 0x8f, 0x77, 0x07, 0xf8, 0xb4, 0x1f, 0x04, 0x45, 0x6d, 0x84, 0x4f,
};
static unsigned int enc_key_len = 48;
const struct bootutil_key bootutil_enc_key = {
.key = enc_key,
.len = &enc_key_len,
};
#endif

0 comments on commit 3fc84bf

Please sign in to comment.