Allow imgtool to generated encrypted ed25519 keys

Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/scripts/imgtool/main.py b/scripts/imgtool/main.py
index 0a8fe0d..b4ae0c1 100755
--- a/scripts/imgtool/main.py
+++ b/scripts/imgtool/main.py
@@ -42,7 +42,7 @@
 
 
 def gen_ed25519(keyfile, passwd):
-    keys.Ed25519.generate().export_private(path=keyfile)
+    keys.Ed25519.generate().export_private(path=keyfile, passwd=passwd)
 
 
 valid_langs = ['c', 'rust']