-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X25519 improvements 2 in PKCS11-tool, PKCS15 routines and tools and openpgp #3090
base: master
Are you sure you want to change the base?
Commits on May 17, 2024
-
pkcs11-tool.c - fix tag len in OID
On branch X25519-improvements-2 Changes to be committed: modified: tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for dcc7346 - Browse repository at this point
Copy the full SHA dcc7346View commit details -
pkcs11-tool.c - Incorrect OID for edwards25519
1.3.6.1.4.1159.15.1 should be 1.3.6.1.4.11591.15.1 openpgp writes 2B 06 01 04 01 DA 47 0F 01 to card which comes from OID 06 09 2B 06 01 04 01 DA 47 0F 01 https://lapo.it/asn1js/ (asn.1 parser) reports this as: OBJECT IDENTIFIER 1.3.6.1.4.1.11591.15.1 curve25519 (GNU encryption algorithm) https://www.gnupg.org/oids.html lists this as Ed25519 On branch X25519-improvements-2 Changes to be committed: modified: tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for c060f7d - Browse repository at this point
Copy the full SHA c060f7dView commit details -
pkcs11-tool.c - CKK_GENERIC_SECRET do not have CKA_ENCRYPT or CKA_DEC…
…RYPT On branch X25519-improvements-2 Changes to be committed: modified: tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for d85b52c - Browse repository at this point
Copy the full SHA d85b52cView commit details -
pkcs11-tool.c Add derive key support for CKK_MONTGOMERY
OpenSSL treats EVP_PKEY_EC, EVP_PKEY_X25519 and EVP_PKEY_X448 as different key types. Refer to the other key as a peer key. Use mech_mech as it is passed into derive_ec_key. On branch X25519-improvements-2 Changes to be committed: modified: src/tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for 43d58d4 - Browse repository at this point
Copy the full SHA 43d58d4View commit details -
pkcs11-tool.c - Update EC type curves
On branch X25519-improvements-2 Changes to be committed: modified: tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for a633845 - Browse repository at this point
Copy the full SHA a633845View commit details -
pkcs11-tool.c - EVP_KEY_X448 not defined in LibreSSL
EVP_KEY_X25519 is defined but not EVP_KEY_X448. Test if defined. Changes to be committed: modified: src/tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for 584e7cc - Browse repository at this point
Copy the full SHA 584e7ccView commit details -
pkcs11-tool.c calculate size in bits for eddsa and xeddsa CKA_EC_POINT
CKA_EC_POINT for eddsa and xeddsa are bit strings. Changes to be committed: modified: src/tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for 2a63099 - Browse repository at this point
Copy the full SHA 2a63099View commit details -
pkcs11-tool.c - EC_POINT DER in BIT STRING or OCTET STRING
Accept either encoding. On branch X25519-improvements-2 Changes to be committed: modified: src/tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for f8ce754 - Browse repository at this point
Copy the full SHA f8ce754View commit details -
pkcs11-tool.c - remore wrap/unwrap from template
On branch X25519-improvements-2 Changes to be committed: modified: pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for f83208b - Browse repository at this point
Copy the full SHA f83208bView commit details -
pkcs15.h - PKCS11 ecparams are used by CKK_EC, CKK_EDWARDS and CKK_MO…
…NTGOMERY Remove redundent code for struct sc_pkcs15_prkey_eddsa eddsa. Please enter the commit message for your changes. Lines starting
Configuration menu - View commit details
-
Copy full SHA for 556c0cc - Browse repository at this point
Copy the full SHA 556c0ccView commit details -
pkcs15-prkey.c pkcs15-pubkey.c - Use common EC params
On branch X25519-improvements-2 Changes to be committed: modified: libopensc/pkcs15-prkey.c modified: libopensc/pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for e8bbf37 - Browse repository at this point
Copy the full SHA e8bbf37View commit details -
card-openpgp.c - Use common "ec_pointQ" for EC, EDDSA and XEDDSA
In previous OpenSC code EC public key is called a ec_pointQ. EDDSA and XEDDSA called it public. Both are stored asvalue and len. So to simplify the code, we use the same structures. The difference comes when they are returned in pkcs11. EC is encoded in an OCTET STRING, The others are iencoded in a BIT STRING. Changes to be committed: modified: src/libopensc/card-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for 732eda2 - Browse repository at this point
Copy the full SHA 732eda2View commit details -
pkcs15init/pkcs15-lib.c pkcs15init/pkcs15-openpgp.c - EDDSA and XEDDSA
Improvments to allow for key generation via pkcs11 or pkcs15 Date: Sat Dec 9 18:57:26 2023 -0600 On branch X25519-improvements-2 Changes to be committed: modified: pkcs15init/pkcs15-lib.c modified: pkcs15init/pkcs15-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for c9e1de3 - Browse repository at this point
Copy the full SHA c9e1de3View commit details -
card-openpgp.c - add SC_ALGORITHM_ONBOARD_KEY_GEN
This will add PKCS11 key gen mechanisms. On branch X25519-improvements-2 Changes to be committed: modified: src/libopensc/card-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for a1c1fb6 - Browse repository at this point
Copy the full SHA a1c1fb6View commit details -
pkcs15-pubkey.c update ec curves and map printable strings
GnuPG says with version 5 cards, the RFC8410 OIDs can be written to the card so we will accept these and if needed use the older OpenPGP curves on older cards within the card-openpgp.c ec_params using the printablestring will be mapped to ones with OIDs if possible/ Date: Sun Dec 10 17:08:05 2023 -0600 On branch X25519-improvements-2 Changes to be committed: modified: libopensc/pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for ad86f56 - Browse repository at this point
Copy the full SHA ad86f56View commit details -
pkcs15-init.c squash adding additional if statement
Changes to be committed: modified: src/tools/pkcs15-init.c
Configuration menu - View commit details
-
Copy full SHA for 61df246 - Browse repository at this point
Copy the full SHA 61df246View commit details -
pkcs15-algo.c - add Ed448, X448 and openpgp oids
Changes to be committed: modified: libopensc/pkcs15-algo.c
Configuration menu - View commit details
-
Copy full SHA for b428eb0 - Browse repository at this point
Copy the full SHA b428eb0View commit details -
OpenPGP - Move mapping of OpenPGP specifix OIDs
The mapping of curve OIDs to be written to a card is moved from pkcs15init/pkcs15-openpgp.c to card-openpgp.c pkcs15init/pkcs15-openpgp and pkcs11 can then provide old or new OIDSs. The card driver will remap if needed. Date: Mon Jan 15 13:00:51 2024 -0600 Changes to be committed: modified: src/libopensc/card-openpgp.c modified: src/libopensc/card-openpgp.h modified: src/pkcs15init/pkcs15-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for 5fe507f - Browse repository at this point
Copy the full SHA 5fe507fView commit details -
pkcs15init/pkcs15-opensc.c unused variable
On branch X25519-improvements-2 Changes to be committed: modified: pkcs15init/pkcs15-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for 1c8bff8 - Browse repository at this point
Copy the full SHA 1c8bff8View commit details -
tools/pkcs15-init.c accept and case and convert to correct case
Accept any case of curve names but pass corrected case to lower level routines. On branch X25519-improvements-2 Changes to be committed: modified: tools/pkcs15-init.c
Configuration menu - View commit details
-
Copy full SHA for 82b7213 - Browse repository at this point
Copy the full SHA 82b7213View commit details -
fix so will compile on mingw Date: Sat Jan 20 12:43:26 2024 -0600 Changes to be committed: modified: src/libopensc/card-openpgp.c modified: src/libopensc/card-openpgp.h
Configuration menu - View commit details
-
Copy full SHA for 80effc1 - Browse repository at this point
Copy the full SHA 80effc1View commit details -
doc/tools/pkcs15-init.1.xml document Curve names for eddsa and xeddsa
Changes to be committed: modified: doc/tools/pkcs15-init.1.xml
Configuration menu - View commit details
-
Copy full SHA for fba9f26 - Browse repository at this point
Copy the full SHA fba9f26View commit details -
framework-pkcs15.c - Support CKA_PUBKEY_KEY_INFO
PKCS11 V2.4 and V3.0 added CKA_PUBKEY_KEY_INFO as SPKI from pubkey On branch X25519-improvements-2 Changes to be committed: modified: framework-pkcs15.c
Configuration menu - View commit details
-
Copy full SHA for 3042e6b - Browse repository at this point
Copy the full SHA 3042e6bView commit details -
WIP to accept pkcs11 ec_point encoded in bit string or byte string
See opensc issue OpenSC#3000 On branch X25519-improvements-2 Changes to be committed: modified: libopensc/card-openpgp.c modified: libopensc/pkcs15-pubkey.c modified: tools/pkcs11-tool.c modified: tools/pkcs15-init.c
Configuration menu - View commit details
-
Copy full SHA for 491977c - Browse repository at this point
Copy the full SHA 491977cView commit details -
pkcs15-pubkey.c make default for CKA_EC_POINT to return old OCTET STRING
p11test is still using old way. On branch X25519-improvements-2 Changes to be committed: modified: pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for 70d2496 - Browse repository at this point
Copy the full SHA 70d2496View commit details -
test-oseid.sh use restart-pcscd.sh
Added github/restart-pcscd.sh On branch X25519-improvements-2 Changes to be committed: modified: test-oseid.sh
Configuration menu - View commit details
-
Copy full SHA for 1493774 - Browse repository at this point
Copy the full SHA 1493774View commit details -
Revert "test-oseid.sh use restart-pcscd.sh"
This is unrelated to to the PR so if needed submit as seperate PR This reverts commit 00c4a73. On branch X25519-improvements-2 Changes to be committed: modified: .github/test-oseid.sh
Configuration menu - View commit details
-
Copy full SHA for 7e84589 - Browse repository at this point
Copy the full SHA 7e84589View commit details -
pkcs15-pubkey.c fix bug found by fuzzer
On branch X25519-improvements-2 Changes to be committed: modified: pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for a4543d4 - Browse repository at this point
Copy the full SHA a4543d4View commit details -
pkcs15-pubkey.c - no need to test if key is null before free
As suggested in comments in OpenSC#3090 simplify code when clearing a pubkey. Not shown in diff next line is: sc_mem_clear(key, sizeof(*key)); Date: Thu Mar 28 15:37:32 2024 -0500 On branch X25519-improvements-2 Changes to be committed: modified: pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for 58ccef4 - Browse repository at this point
Copy the full SHA 58ccef4View commit details -
pkcs15-pubkey.c - comments, whitespace and code style
Code style from yshui/git-clang-format-lint On branch X25519-improvements-2 Changes to be committed: modified: pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for a4265fd - Browse repository at this point
Copy the full SHA a4265fdView commit details -
card-openpgp.c - whitespace and code style
Code style from yshui/git-clang-format-lint On branch X25519-improvements-2 Changes to be committed: modified: src/libopensc/card-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for e0800ed - Browse repository at this point
Copy the full SHA e0800edView commit details -
framework-pkcs15,c - whitespace and code style
Code style from yshui/git-clang-format-lint On branch X25519-improvements-2 Changes to be committed: modified: src/pkcs11/framework-pkcs15.c
Configuration menu - View commit details
-
Copy full SHA for 4d454fc - Browse repository at this point
Copy the full SHA 4d454fcView commit details -
pkcs15-alg.c whitespace and code style
Code style from yshui/git-clang-format-lint On branch X25519-improvements-2 Changes to be committed: modified: src/libopensc/pkcs15-algo.c
Configuration menu - View commit details
-
Copy full SHA for 19b56b3 - Browse repository at this point
Copy the full SHA 19b56b3View commit details -
pkcs15-init.c whitespace and code style
Code style from yshui/git-clang-format-lint On branch X25519-improvements-2 Changes to be committed: modified: src/tools/pkcs15-init.c
Configuration menu - View commit details
-
Copy full SHA for 7f5931e - Browse repository at this point
Copy the full SHA 7f5931eView commit details -
files.html, tools.html - rebuild
As suggeseted by .github/workflows/doc.yml On branch X25519-improvements-2 Changes to be committed: modified: files/files.html modified: tools/tools.html
Configuration menu - View commit details
-
Copy full SHA for 2dfbe4d - Browse repository at this point
Copy the full SHA 2dfbe4dView commit details -
pkcs15-pubkey.c - readability of mapped_string
On branch X25519-improvements-2 Changes to be committed: modified: pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for 95696f0 - Browse repository at this point
Copy the full SHA 95696f0View commit details -
card-openpgp.c - renove TODO comments as code was added
On branch X25519-improvements-2 Changes to be committed: modified: libopensc/card-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for 57c1f6f - Browse repository at this point
Copy the full SHA 57c1f6fView commit details -
pkcs15-algo.c - removed comments and added asn1 calls
On branch X25519-improvements-2 Changes to be committed: modified: libopensc/pkcs15-algo.c
Configuration menu - View commit details
-
Copy full SHA for a45ab3e - Browse repository at this point
Copy the full SHA a45ab3eView commit details -
pkcs15-prkey.c - moved comment
On branch X25519-improvements-2 Changes to be committed: modified: libopensc/pkcs15-prkey.c
Configuration menu - View commit details
-
Copy full SHA for 064b805 - Browse repository at this point
Copy the full SHA 064b805View commit details -
On branch X25519-improvements-2 Changes to be committed: modified: tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for 30ec795 - Browse repository at this point
Copy the full SHA 30ec795View commit details -
pkcs15-pubkey.c - Use sc_asn1_read_tag for printable string
On branch X25519-improvements-2 Changes to be committed: modified: libopensc/pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for 8ef8507 - Browse repository at this point
Copy the full SHA 8ef8507View commit details -
pkcs15-pubkey.c opensc.h - Add SC_ALGORITHM_* to ec_curve_info
Make it easier to tell difference between EC, EDDSA and XEDDSA On branch X25519-improvements-2 Changes to be committed: modified: src/libopensc/opensc.h modified: src/libopensc/pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for 64a7100 - Browse repository at this point
Copy the full SHA 64a7100View commit details -
card-openpgp.c card-openpgp.h - Add SC_ALGORITHM_* to ec_curves_openpgp*
On branch X25519-improvements-2 Changes to be committed: modified: src/libopensc/card-openpgp.c modified: src/libopensc/card-openpgp.h
Configuration menu - View commit details
-
Copy full SHA for 2009bfc - Browse repository at this point
Copy the full SHA 2009bfcView commit details -
card.c - when adding an EC type alg call sc_pkcs15_fix_ec_parameters
Changes to be committed: modified: libopensc/card.c
Configuration menu - View commit details
-
Copy full SHA for fc7c6d2 - Browse repository at this point
Copy the full SHA fc7c6d2View commit details -
pkcs15-pubkey.c - FIXUP order of key_type in sc_curve_info
On branch X25519-improvements-2 Changes to be committed: modified: libopensc/pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for 818d26a - Browse repository at this point
Copy the full SHA 818d26aView commit details -
card.c - fix bug in sc_copy_ec_params
Two fields were being copied from the dst the src sc_copy_ec_params is only used in pkcs15init/pkcs15-lib.c On branch X25519-improvements-2 Changes to be committed: modified: libopensc/card.c
Configuration menu - View commit details
-
Copy full SHA for be1e3d9 - Browse repository at this point
Copy the full SHA be1e3d9View commit details -
pkcs15init/pkcs15-openpgp.c - test id and ec type keys
On branch X25519-improvements-2 Changes to be committed: modified: ../pkcs15init/pkcs15-lib.c
Configuration menu - View commit details
-
Copy full SHA for 17834c5 - Browse repository at this point
Copy the full SHA 17834c5View commit details -
card.c when copying sc_ec_parameters get new key_type too
On branch X25519-improvements-2 Changes to be committed: modified: card.c
Configuration menu - View commit details
-
Copy full SHA for 97a8d3a - Browse repository at this point
Copy the full SHA 97a8d3aView commit details -
pkcs15init/pkcs15-openpgp.c - set key_info.algorithm so EDDSA and XED…
…DSA work On branch X25519-improvements-2 Changes to be committed: modified: src/pkcs15init/pkcs15-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for 9c7c398 - Browse repository at this point
Copy the full SHA 9c7c398View commit details -
card-openpgp.c - fix invalid read found by valgrind
On branch X25519-improvements-2 Changes to be committed: modified: libopensc/card-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for 9b1d102 - Browse repository at this point
Copy the full SHA 9b1d102View commit details -
pkcs15init/pkcs15-lib.c - fix double free
Changes to be committed: modified: pkcs15init/pkcs15-lib.c
Configuration menu - View commit details
-
Copy full SHA for 951567b - Browse repository at this point
Copy the full SHA 951567bView commit details -
cardctl.h - add key_type as SC_ALGORITHM_* to sc_cardctl_openpgp_keyg…
…en_info keytype is used to map SC_ALGORITHM_* to/from SC_OPENPGP_KEYALGO_* On branch X25519-improvements-2 Changes to be committed: modified: libopensc/cardctl.h modified: libopensc/pkcs15-prkey.c modified: pkcs15init/pkcs15-lib.c modified: pkcs15init/pkcs15-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for 8f55e45 - Browse repository at this point
Copy the full SHA 8f55e45View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8546f2 - Browse repository at this point
Copy the full SHA d8546f2View commit details -
opensc.h - add sc_clear_ec_params
sc_clear_ec_params used free allocated menory and clear other data in struct sc_ec_parameters On branch X25519-improvements-2 Changes to be committed: modified: libopensc/opensc.h
Configuration menu - View commit details
-
Copy full SHA for 8550203 - Browse repository at this point
Copy the full SHA 8550203View commit details -
pkcs11-tool.c - CKK_EC_EDWARDS and CKK_EC_MONTGOMERY improvements
Add support write_object support for ED448 and X448 objects, but no cards current suported by OpenSC implement these. Fix bug with n_attrs in derive-ec-key. Allow read_object of an EC_POINT to be in either OCTET_STRING or BIT_STRING On branch X25519-improvements-2 Changes to be committed: modified: tools/pkcs11-tool.c
Configuration menu - View commit details
-
Copy full SHA for bb099fb - Browse repository at this point
Copy the full SHA bb099fbView commit details -
card.c - add sc_clear_ec_params expand sc_card_find_alg
sc_clear_ec_params clears an struct sc_ec_parameters by freeing allocated memory. card_find_alg will first check if info->algroithm is one that uses sc_ec_parameters and then checks that the OIDs match. then check if keylength match. On branch X25519-improvements-2 Changes to be committed: modified: libopensc/card.c
Configuration menu - View commit details
-
Copy full SHA for 5df6fc8 - Browse repository at this point
Copy the full SHA 5df6fc8View commit details -
pkcs15init/pkcs15-lib.c - Changes for sc_clear_ec_params
Fix several problems with use of sc_ec_parameters On branch X25519-improvements-2 Changes to be committed: modified: pkcs15init/pkcs15-lib.c
Configuration menu - View commit details
-
Copy full SHA for 3215bcf - Browse repository at this point
Copy the full SHA 3215bcfView commit details -
card-openpgp.c pkcs15init/pkcs15-openpgp.c - fixes
Improvments and fixes for mem leaks and GUNK and mapping RFC8410 OIDs. When writing or generating a key add all known algs to card->algrorithms. Fix some BYTES4BITS bugs and formating. Add note about borblems trying to store RFC8410 type key. On branch X25519-improvements-2 Changes to be committed: modified: libopensc/card-openpgp.c modified: pkcs15init/pkcs15-openpgp.c
Configuration menu - View commit details
-
Copy full SHA for 4856c56 - Browse repository at this point
Copy the full SHA 4856c56View commit details -
libopensc.exports - export sc_clear_ec_params
On branch X25519-improvements-2 Changes to be committed: modified: libopensc/libopensc.exports
Configuration menu - View commit details
-
Copy full SHA for 42b82bf - Browse repository at this point
Copy the full SHA 42b82bfView commit details -
framework-pkcs15.c - added support for more 448 size keys
Base OIDs for EDWARDS and MONTGOMERY keys on the size of ecpointQ bewween 32 for 25519 and 56 for 448 keys. On branch X25519-improvements-2 Changes to be committed: modified: pkcs11/framework-pkcs15.c
Configuration menu - View commit details
-
Copy full SHA for d0da85d - Browse repository at this point
Copy the full SHA d0da85dView commit details -
pkcs15-isoApplet.c - use sc_clear_ec_params
On branch X25519-improvements-2 Changes to be committed: modified: pkcs15init/pkcs15-isoApplet.c
Configuration menu - View commit details
-
Copy full SHA for 1f2ada9 - Browse repository at this point
Copy the full SHA 1f2ada9View commit details -
pkcs15-algo.c, pkcs15-prkey.c and pkcs15-pubkey.c
Various changes for RFC8410 curves On branch X25519-improvements-2 Changes to be committed: modified: libopensc/pkcs15-algo.c modified: libopensc/pkcs15-prkey.c modified: libopensc/pkcs15-pubkey.c
Configuration menu - View commit details
-
Copy full SHA for 3fa1d48 - Browse repository at this point
Copy the full SHA 3fa1d48View commit details