boot: mynewt: add ECIES-X25519 support
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/boot/bootutil/pkg.yml b/boot/bootutil/pkg.yml
index 3f114f3..531d6a2 100644
--- a/boot/bootutil/pkg.yml
+++ b/boot/bootutil/pkg.yml
@@ -53,3 +53,9 @@
- "@mcuboot/ext/tinycrypt-sha512/lib"
- "@mcuboot/ext/mbedtls-asn1"
- "@mcuboot/ext/fiat"
+
+pkg.deps.BOOTUTIL_ENCRYPT_X25519:
+ - "@mcuboot/ext/tinycrypt/lib"
+ - "@mcuboot/ext/tinycrypt-sha512/lib"
+ - "@mcuboot/ext/mbedtls-asn1"
+ - "@mcuboot/ext/fiat"
diff --git a/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h b/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
index d29ddc3..696f2e7 100644
--- a/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
+++ b/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
@@ -63,8 +63,11 @@
#if MYNEWT_VAL(BOOTUTIL_ENCRYPT_EC256)
#define MCUBOOT_ENCRYPT_EC256 1
#endif
+#if MYNEWT_VAL(BOOTUTIL_ENCRYPT_X25519)
+#define MCUBOOT_ENCRYPT_X25519 1
+#endif
#if MYNEWT_VAL(BOOTUTIL_ENCRYPT_RSA) || MYNEWT_VAL(BOOTUTIL_ENCRYPT_KW) || \
- MYNEWT_VAL(BOOTUTIL_ENCRYPT_EC256)
+ MYNEWT_VAL(BOOTUTIL_ENCRYPT_EC256) || MYNEWT_VAL(BOOTUTIL_ENCRYPT_X25519)
#define MCUBOOT_ENC_IMAGES 1
#endif
#if MYNEWT_VAL(BOOTUTIL_SWAP_USING_MOVE)
diff --git a/boot/mynewt/mcuboot_config/syscfg.yml b/boot/mynewt/mcuboot_config/syscfg.yml
index d51cd34..06e9768 100644
--- a/boot/mynewt/mcuboot_config/syscfg.yml
+++ b/boot/mynewt/mcuboot_config/syscfg.yml
@@ -49,6 +49,9 @@
BOOTUTIL_ENCRYPT_EC256:
description: 'Support for encrypted images using ECIES-P256.'
value: 0
+ BOOTUTIL_ENCRYPT_X25519:
+ description: 'Support for encrypted images using ECIES-X25519.'
+ value: 0
BOOTUTIL_USE_MBED_TLS:
description: 'Use mbed TLS for crypto operations.'
value: 1