-
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
Open
dengert
wants to merge
62
commits into
OpenSC:master
Choose a base branch
from
dengert:X25519-improvements-2
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
dcc7346
pkcs11-tool.c - fix tag len in OID
dengert c060f7d
pkcs11-tool.c - Incorrect OID for edwards25519
dengert d85b52c
pkcs11-tool.c - CKK_GENERIC_SECRET do not have CKA_ENCRYPT or CKA_DEC…
dengert 43d58d4
pkcs11-tool.c Add derive key support for CKK_MONTGOMERY
dengert a633845
pkcs11-tool.c - Update EC type curves
dengert 584e7cc
pkcs11-tool.c - EVP_KEY_X448 not defined in LibreSSL
dengert 2a63099
pkcs11-tool.c calculate size in bits for eddsa and xeddsa CKA_EC_POINT
dengert f8ce754
pkcs11-tool.c - EC_POINT DER in BIT STRING or OCTET STRING
dengert f83208b
pkcs11-tool.c - remore wrap/unwrap from template
dengert 556c0cc
pkcs15.h - PKCS11 ecparams are used by CKK_EC, CKK_EDWARDS and CKK_MO…
dengert e8bbf37
pkcs15-prkey.c pkcs15-pubkey.c - Use common EC params
dengert 732eda2
card-openpgp.c - Use common "ec_pointQ" for EC, EDDSA and XEDDSA
dengert c9e1de3
pkcs15init/pkcs15-lib.c pkcs15init/pkcs15-openpgp.c - EDDSA and XEDDSA
dengert a1c1fb6
card-openpgp.c - add SC_ALGORITHM_ONBOARD_KEY_GEN
dengert ad86f56
pkcs15-pubkey.c update ec curves and map printable strings
dengert 61df246
pkcs15-init.c squash adding additional if statement
dengert b428eb0
pkcs15-algo.c - add Ed448, X448 and openpgp oids
dengert 5fe507f
OpenPGP - Move mapping of OpenPGP specifix OIDs
dengert 1c8bff8
pkcs15init/pkcs15-opensc.c unused variable
dengert 82b7213
tools/pkcs15-init.c accept and case and convert to correct case
dengert 80effc1
card-openpgp.c card-openpgp.h
dengert fba9f26
doc/tools/pkcs15-init.1.xml document Curve names for eddsa and xeddsa
dengert 3042e6b
framework-pkcs15.c - Support CKA_PUBKEY_KEY_INFO
dengert 491977c
WIP to accept pkcs11 ec_point encoded in bit string or byte string
dengert 70d2496
pkcs15-pubkey.c make default for CKA_EC_POINT to return old OCTET S…
dengert 1493774
test-oseid.sh use restart-pcscd.sh
dengert 7e84589
Revert "test-oseid.sh use restart-pcscd.sh"
dengert a4543d4
pkcs15-pubkey.c fix bug found by fuzzer
dengert 58ccef4
pkcs15-pubkey.c - no need to test if key is null before free
dengert a4265fd
pkcs15-pubkey.c - comments, whitespace and code style
dengert e0800ed
card-openpgp.c - whitespace and code style
dengert 4d454fc
framework-pkcs15,c - whitespace and code style
dengert 19b56b3
pkcs15-alg.c whitespace and code style
dengert 7f5931e
pkcs15-init.c whitespace and code style
dengert 2dfbe4d
files.html, tools.html - rebuild
dengert 95696f0
pkcs15-pubkey.c - readability of mapped_string
dengert 57c1f6f
card-openpgp.c - renove TODO comments as code was added
dengert a45ab3e
pkcs15-algo.c - removed comments and added asn1 calls
dengert 064b805
pkcs15-prkey.c - moved comment
dengert 30ec795
pkcs11-tool.c - formating
dengert 8ef8507
pkcs15-pubkey.c - Use sc_asn1_read_tag for printable string
dengert 64a7100
pkcs15-pubkey.c opensc.h - Add SC_ALGORITHM_* to ec_curve_info
dengert 2009bfc
card-openpgp.c card-openpgp.h - Add SC_ALGORITHM_* to ec_curves_open…
dengert fc7c6d2
card.c - when adding an EC type alg call sc_pkcs15_fix_ec_parameters
dengert 818d26a
pkcs15-pubkey.c - FIXUP order of key_type in sc_curve_info
dengert be1e3d9
card.c - fix bug in sc_copy_ec_params
dengert 17834c5
pkcs15init/pkcs15-openpgp.c - test id and ec type keys
dengert 97a8d3a
card.c when copying sc_ec_parameters get new key_type too
dengert 9c7c398
pkcs15init/pkcs15-openpgp.c - set key_info.algorithm so EDDSA and XE…
dengert 9b1d102
card-openpgp.c - fix invalid read found by valgrind
dengert 951567b
pkcs15init/pkcs15-lib.c - fix double free
dengert 8f55e45
cardctl.h - add key_type as SC_ALGORITHM_* to sc_cardctl_openpgp_keyg…
dengert d8546f2
opensc.h - add
dengert 8550203
opensc.h - add sc_clear_ec_params
dengert bb099fb
pkcs11-tool.c - CKK_EC_EDWARDS and CKK_EC_MONTGOMERY improvements
dengert 5df6fc8
card.c - add sc_clear_ec_params expand sc_card_find_alg
dengert 3215bcf
pkcs15init/pkcs15-lib.c - Changes for sc_clear_ec_params
dengert 4856c56
card-openpgp.c pkcs15init/pkcs15-openpgp.c - fixes
dengert 42b82bf
libopensc.exports - export sc_clear_ec_params
dengert d0da85d
framework-pkcs15.c - added support for more 448 size keys
dengert 1f2ada9
pkcs15-isoApplet.c - use sc_clear_ec_params
dengert 3fa1d48
pkcs15-algo.c, pkcs15-prkey.c and pkcs15-pubkey.c
dengert File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
WIP to accept pkcs11 ec_point encoded in bit string or byte string
See opensc issue #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
- Loading branch information
commit 491977ccf5ca6bc4740bfc4e83cebde4fec7670b
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -769,15 +769,19 @@ parse_alg_spec(const struct alg_spec *types, const char *spec, unsigned int *key | |
spec++; | ||
|
||
/* if we have everything for EDDSA or XEDDSA */ | ||
if (*spec == 0x00 && *keybits && (algorithm == SC_ALGORITHM_EDDSA || SC_ALGORITHM_XEDDSA) && prkey) { | ||
if (*spec == 0x00 && *keybits && (algorithm == SC_ALGORITHM_EDDSA || algorithm == SC_ALGORITHM_XEDDSA) && prkey) { | ||
prkey->u.ec.params.named_curve = strdup(types[types_idx].spec); /* correct case */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could use some error checking on strdup |
||
*keybits = types[types_idx].keybits; | ||
return algorithm; | ||
} | ||
|
||
if (*spec) { | ||
if (isalpha((unsigned char)*spec) | ||
&& (algorithm == SC_ALGORITHM_EC || algorithm == SC_ALGORITHM_EDDSA || SC_ALGORITHM_XEDDSA) | ||
&& algorithm == SC_ALGORITHM_EC && prkey) | ||
prkey->u.ec.params.named_curve = strdup(spec); | ||
else | ||
if (isalpha((unsigned char)*spec) | ||
&& (algorithm == SC_ALGORITHM_EDDSA || algorithm == SC_ALGORITHM_XEDDSA) | ||
&& prkey) { | ||
prkey->u.ec.params.named_curve = strdup(types[types_idx].spec); /* copy correct case */ | ||
} else { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the DEE identifier