Add Mynewt ed25519 support
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/boot/bootutil/pkg.yml b/boot/bootutil/pkg.yml
index 1837163..506bfcf 100644
--- a/boot/bootutil/pkg.yml
+++ b/boot/bootutil/pkg.yml
@@ -47,3 +47,7 @@
pkg.deps.BOOTUTIL_USE_TINYCRYPT:
- "@mcuboot/ext/tinycrypt/lib"
- "@mcuboot/ext/mbedtls"
+
+pkg.deps.BOOTUTIL_SIGN_ED25519:
+ - "@apache-mynewt-core/crypto/mbedtls"
+ - "@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 fbc45be..b539e48 100644
--- a/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
+++ b/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
@@ -43,6 +43,9 @@
#define MCUBOOT_SIGN_RSA 1
#define MCUBOOT_SIGN_RSA_LEN MYNEWT_VAL(BOOTUTIL_SIGN_RSA_LEN)
#endif
+#if MYNEWT_VAL(BOOTUTIL_SIGN_ED25519)
+#define MCUBOOT_SIGN_ED25519 1
+#endif
#if MYNEWT_VAL(BOOTUTIL_SIGN_EC)
#define MCUBOOT_SIGN_EC 1
#endif
diff --git a/boot/mynewt/mcuboot_config/syscfg.yml b/boot/mynewt/mcuboot_config/syscfg.yml
index 9e52cab..32bdc97 100644
--- a/boot/mynewt/mcuboot_config/syscfg.yml
+++ b/boot/mynewt/mcuboot_config/syscfg.yml
@@ -34,6 +34,9 @@
BOOTUTIL_SIGN_EC256:
description: 'Images are signed using ECDSA NIST P-256.'
value: 0
+ BOOTUTIL_SIGN_ED25519:
+ description: 'Images are signed using ED25519.'
+ value: 0
BOOTUTIL_ENCRYPT_RSA:
description: 'Support for encrypted images using RSA-2048-OAEP.'
value: 0
diff --git a/ext/fiat/pkg.yml b/ext/fiat/pkg.yml
new file mode 100644
index 0000000..73a6559
--- /dev/null
+++ b/ext/fiat/pkg.yml
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: ext/fiat
+pkg.description: "MCUboot's bundled fiat-crypto"
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords: