opensc/src/tools
Doug Engert 3ff7309520 Pkcs11-tool.c changes to accommodate ECDH operations using SoftHSM. (#901)
PKCS#11 v2.20 in not clear on the format of the public key of the other party
pased during ECDH key derivation. Some implementations (OpenSC) pass just the value
of the public key (RAW), while others (SoftHSM) pass an ASN.1 DER encoded OCTET_STRING.

PKCS$11 v2.40 points out this problem and says implementations must support the
RAW format and may also support the DER format.

To allow pkcs11-tool.c to work with ECDH derivation and using the current libSoftHSM2.so
a new parameter was added to pkcs11-tool, --derive-pass-der.

Also added to teh template fot the new key were:

CKA_SENSITIVE = false
CKA_EXTRACTABLE = true
CKA_VALUE_LEN = size of key to be derived.

OpenSC currently only support derivation of ECDH session keys, (CKA_TOKEN = false)
The derived key must be CK_KEY_TYPE = CKK_GENERIC_SECRET
Additional changes could be made to support AES or DES3 keys.

It is not clear if there is a need to support CKA_TOKEN =  true which says the
derived key must be on the hardware token. For ECDH, these keys are short lived.

 On branch pkcs11-tool-simple-ecdh
 Changes to be committed:
	modified:   src/tools/pkcs11-tool.c
2016-11-20 18:28:42 +01:00
..
Makefile.am First support for GIDS card 2016-02-19 00:12:16 +01:00
Makefile.mak pkcs15-tool: implemented --clear-cache (#873) 2016-10-07 14:19:03 +02:00
cardos-tool.c fixed Printf arg type mismatch 2015-01-24 20:00:03 +01:00
cryptoflex-tool.c Move include for internal.h from aux-date.h to aux-data.c (#888) 2016-10-16 20:09:00 +02:00
dnie-tool.c fixed dereference before null check 2015-01-22 20:29:33 +01:00
eidenv.c Update domain name. paljak.pri.ee is gone since 2011. 2013-02-25 11:58:25 +02:00
gids-tool.c Use OpenSSL versions OpenSSL-0.9.7 to 1.1.0a for OpenSC 2016-10-08 06:15:06 -05:00
iasecc-tool.c iasecc: coverity scan warning OVERRUN-STATIC 2012-06-11 20:59:45 +02:00
netkey-tool.c Use OpenSSL versions OpenSSL-0.9.7 to 1.1.0a for OpenSC 2016-10-08 06:15:06 -05:00
openpgp-tool.c openpgp-tool.c: fix compiler warning 2016-02-29 20:19:42 +01:00
opensc-explorer.c opensc-explorer.c: fix compiler warning 2016-02-29 20:19:42 +01:00
opensc-tool.c tools: print package revision 2016-03-04 14:16:06 +01:00
piv-tool.c Use OpenSSL versions OpenSSL-0.9.7 to 1.1.0a for OpenSC 2016-10-08 06:15:06 -05:00
pkcs11-tool.c Pkcs11-tool.c changes to accommodate ECDH operations using SoftHSM. (#901) 2016-11-20 18:28:42 +01:00
pkcs15-crypt.c tools: fix help message 2016-04-27 20:07:54 +02:00
pkcs15-init.c pkcs15init: explicitly lock the card 2016-10-31 12:35:22 +01:00
pkcs15-tool.c pkcs15-tool: add compact output format 2016-11-17 09:46:51 +01:00
sc-hsm-tool.c Add support for LibreSSL compatability as well as OpenSSL-1.1.0 2016-10-08 06:17:44 -05:00
util.c Allow tools to enable card lock (#875) 2016-09-19 17:49:34 +02:00
util.h Allow tools to enable card lock (#875) 2016-09-19 17:49:34 +02:00
versioninfo-tools.rc.in build: define in configure.ac.in the common fields of version-info 2013-12-30 10:31:21 +01:00
westcos-tool.c Use OpenSSL versions OpenSSL-0.9.7 to 1.1.0a for OpenSC 2016-10-08 06:15:06 -05:00