forked from OpenSC/OpenSC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/pkcs11-tool.c - Changes for PKCS11 v3.0 errata and v3.1
https://docs.oasis-open.org/pkcs11/pkcs11-curr/v3.0/os/pkcs11-curr-v3.0-os.html PKCS11 3.0 OASIS Standard (15 June 2020) said for Edwards and Montgomery public keys: "CKA_EC_POINT | byte array | DER-encoding of ANSI X9.62 ECPoint value Q" https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/pkcs11-spec-v3.1.pdf PKCS11 3.1 OASIS Standard (23 July 2023) says for Edwards public keys: "CKA_EC_POINT | Byte array | Public key bytes in little endian order as defined in RFC 8032" and for Montgomery public keys: "CKA_EC_POINT | Byte array | Public key bytes in little endian order as defined in RFC 7748" https://docs.oasis-open.org/pkcs11/pkcs11-curr/v3.0/errata01/csd01/pkcs11-curr-v3.0-errata01-csd01-public-review-metadata.html announces v3.0 errata with comments ending on 07 June 2024. This puts V3.0 in line with v3.1 In order to align OpenSC PKCS11 module and pkcs11-tool to v3.1 specs: Pkcs11-tool will send EC_POINT for Edwards and Montgomery public keys to a PKCS11 module as raw byte string. pkcs11-tool will accept an EC_POINT from a pkcs11 module as raw byte string, OCTET STRING or BIT STRING. Note: CKA_PUBLIC_KEY_INFO is SubjectPublicKeyInfo as defined in RFC8410. Additional tests when compiled by OpenSSL older versions and Libressl 3.8.4 have been added and a signautre operation using a Yubkey Ed25519 key verifies using OpenSSL 3.3.2 utilities. Pkcs11-tool as input and output files use RFC 8410 formats as OpenSSL formats are based on RFC 8410. On branch X25519-improvements-2 Changes to be committed: modified: tools/pkcs11-tool.c
- Loading branch information
Showing
1 changed file
with
65 additions
and
20 deletions.
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