Skip to content

Commit

Permalink
pkcs11/framework-pkcs15.c - Edwards and Montgomery public keys
Browse files Browse the repository at this point in the history
PKCS11 3.0 errata and 3.1 define Edwards and Montgomery public keys
as raw byte strings.
framework-pkcs15,c will now use sc_pkcs15_encode_pubkey_eddsa_raw
return these EC_POINTs as raw byte strings.

 On branch X25519-improvements-2
 Changes to be committed:
	modified:   pkcs11/framework-pkcs15.c
  • Loading branch information
dengert committed Nov 27, 2024
1 parent fdd65c1 commit 4e1fc5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pkcs11/framework-pkcs15.c
Original file line number Diff line number Diff line change
Expand Up @@ -6075,7 +6075,8 @@ get_ec_pubkey_point(struct sc_pkcs15_pubkey *key, CK_ATTRIBUTE_PTR attr)
switch (key->algorithm) {
case SC_ALGORITHM_EDDSA:
case SC_ALGORITHM_XEDDSA:
rc = sc_pkcs15_encode_pubkey_eddsa(context, &key->u.ec, &value, &value_len);
/* For PKCS11 3.0 errata and 3.1, Edwards and Montgomery EC_POINT is raw byte string */
rc = sc_pkcs15_encode_pubkey_eddsa_raw(context, &key->u.ec, &value, &value_len);
if (rc != SC_SUCCESS)
return sc_to_cryptoki_error(rc, NULL);

Expand Down

0 comments on commit 4e1fc5a

Please sign in to comment.