tools: in ndnsec-key-gen, change default key type to ECDSA
Change-Id: Ib80da42d2969bb6288ee7949e6588c260476ef39
diff --git a/docs/manpages/ndnsec-key-gen.rst b/docs/manpages/ndnsec-key-gen.rst
index 6e18c20..2df5237 100644
--- a/docs/manpages/ndnsec-key-gen.rst
+++ b/docs/manpages/ndnsec-key-gen.rst
@@ -29,7 +29,7 @@
.. option:: -t <type>, --type <type>
- Type of key to generate. "r" for RSA (the default), "e" for ECDSA.
+ Type of key to generate. "r" for RSA, "e" for ECDSA (the default).
.. option:: -k <keyidtype>, --keyid-type <keyidtype>
diff --git a/tools/ndnsec/key-gen.cpp b/tools/ndnsec/key-gen.cpp
index 3da06be..1d3d79a 100644
--- a/tools/ndnsec/key-gen.cpp
+++ b/tools/ndnsec/key-gen.cpp
@@ -44,7 +44,7 @@
("help,h", "produce help message")
("identity,i", po::value<Name>(&identityName), "identity name, e.g., /ndn/edu/ucla/alice")
("not-default,n", po::bool_switch(&wantNotDefault), "do not set the identity as default")
- ("type,t", po::value<char>(&keyTypeChoice)->default_value('r'),
+ ("type,t", po::value<char>(&keyTypeChoice)->default_value('e'),
"key type: 'r' for RSA, 'e' for ECDSA")
("keyid-type,k", po::value<char>(&keyIdTypeChoice),
"key id type: 'h' for the SHA-256 of the public key, 'r' for a 64-bit "