mpicalc: Accept lowercase hex digits.

* src/mpicalc.c (main): Test for lowercase hex digits.
--

This change is useful so to make use of Libgcrypt debug code easier.
pubkey: Remove duplicated flag parsing code.

* cipher/pubkey-util.c (_gcry_pk_util_preparse_encval)
(_gcry_pk_util_data_to_mpi): Factor flag parsing code out to ..
(parse_flag_list): New.
* src/cipher.h (PUBKEY_FLAG_RAW_FLAG): New.
--

A minor disadvantage of that code is that invalid flags are not
anymore detected depending on the use.  According to the documentation
this is anyway the expected behavior.

Signed-off-by: Werner Koch <wk@gnupg.org>
pubkey: Support flags list in gcry_pk_genkey.

* src/cipher.h (PUBKEY_FLAG_TRANSIENT_KEY): New.
(PUBKEY_FLAG_USE_X931): New.
(PUBKEY_FLAG_USE_FIPS186): New.
(PUBKEY_FLAG_USE_FIPS186_2): New.
* cipher/pubkey-util.c (_gcry_pk_util_parse_flaglist): Rename from
parse_flags_list.  Parse new flags.
* cipher/dsa.c (dsa_generate): Support flag list.
* cipher/ecc.c (ecc_generate): Ditto.
* cipher/rsa.c (rsa_generate): Ditto.

Signed-off-by: Werner Koch <wk@gnupg.org>
ecc:  Support use of Ed25519 with ECDSA.

* src/cipher.h (PUBKEY_FLAG_ECDSA): New.
* cipher/pubkey-util.c (_gcry_pk_util_parse_flaglist): Add flag "ecdsa".
* cipher/ecc.c (verify_ecdsa, verify_eddsa): Remove some debug output.
(ecc_generate, ecc_sign, ecc_verify): Support Ed25519 with ECDSA.
* tests/keygen.c (check_ecc_keys): Create such a test key.
* tests/pubkey.c (fail, info, data_from_hex, extract_cmp_data): New.
Take from dsa-6979.c
(check_ed25519ecdsa_sample_key): new.
(main): Call new test.

Signed-off-by: Werner Koch <wk@gnupg.org>