scd: Add support of ECC pubkey attribute.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 16 Sep 2016 06:20:32 +0000 (15:20 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 16 Sep 2016 06:36:45 +0000 (15:36 +0900)
commitdd06d33655bc872a6310edac8e448419479d3312
treeda153f950d2349fb3c58c18fae70f534e93c6f58
parentc0e620cee86b5dacc941964bd187bba0dfa90eea
scd: Add support of ECC pubkey attribute.

* scd/app-openpgp.c (ECC_FLAG_PUBKEY): New.
(send_key_attr, get_public_key, ecc_writekey, do_auth, do_decipher)
(parse_algorithm_attribute): Check ECC_FLAG_DJB_TWEAK.
(build_ecc_privkey_template): Add ECC_Q and ECC_Q_LEN.
Support offering public key when ECC_FLAG_PUBKEY sets.
(ecc_writekey): Supply ECC_Q and ECC_Q_LEN.
(parse_algorithm_attribute): Parse pubkey-required byte.

--

OpenPGPcard protocol specification version 3.2 supports algorithm
attributes for ECC key which specifies public key data is required for
"keytocard" command.  This change supports the feature.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/app-openpgp.c