| #
b7abff72 |
| 06-Sep-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
ta: pkcs11: add CKM_RSA_X_509 ciphering
Add support for CKM_RSA_X_509 mechanism for encrypt/decrypt operations.
Signed-off-by: Alexandre Marechal <alexandre.marechal@st.com> Signed-off-by: Etienne
ta: pkcs11: add CKM_RSA_X_509 ciphering
Add support for CKM_RSA_X_509 mechanism for encrypt/decrypt operations.
Signed-off-by: Alexandre Marechal <alexandre.marechal@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
show more ...
|
| #
e02f17f3 |
| 24-Jul-2024 |
Alexandre Marechal <alexandre.marechal@st.com> |
ta: pkcs11: add CKM_RSA_X_509 authentication
Add support for CKM_RSA_X_509 mechanism for sing/verify operations.
Sign and verify operations are processed using TEE decrypt/encrypt operation since G
ta: pkcs11: add CKM_RSA_X_509 authentication
Add support for CKM_RSA_X_509 mechanism for sing/verify operations.
Sign and verify operations are processed using TEE decrypt/encrypt operation since GP TEE Internal Core API specification only allows these modes for TEE_ALG_RSA_NOPAD algorithm. The pkcs11 TA only support sign operation when the provided payload is exactly of the same size as the RSA key used and checks the generate signature is of right size.
This mechanism can be needed to support CKM_RSA_X_509 for TLSv1.2 connections.
Add CFG_PKCS11_TA_RSA_X_509 to allow configuring the pkcs11 TA with or without raw RSA crypto support. The config switch is default enabled.
Signed-off-by: Alexandre Marechal <alexandre.marechal@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
show more ...
|
| #
571857c0 |
| 15-Feb-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
ta: pkcs11: factorize second operation handle
Factorize fields tee_hash_op_handle and tee_op_handle2 of struct active_processing that both are used as second operation handle for specific algorithm.
ta: pkcs11: factorize second operation handle
Factorize fields tee_hash_op_handle and tee_op_handle2 of struct active_processing that both are used as second operation handle for specific algorithm.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
c7f1b4f7 |
| 13-Dec-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
Upgrade in-tree TAs to use latest version of TEE Internal Core API
Upgrades in-tree TAs to use latest version of TEE Internal Core API and the compatibility flag is by default turned off.
Upgrading
Upgrade in-tree TAs to use latest version of TEE Internal Core API
Upgrades in-tree TAs to use latest version of TEE Internal Core API and the compatibility flag is by default turned off.
Upgrading the TAs is basically a matter of replacing a few uint32_t pointers with size_t pointers instead. This is done in as few places as possible. So in particular the PKCS#11 TA might benefit from another round of refactoring now that the contagious use of uint32_t as size field is removed.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
909efccb |
| 06-Dec-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: save mechanism type on operation initialization
Sets session active processing mechanism type from init_symm_operation(), init_asymm_operation() and init_disgest_operation() rather than
ta: pkcs11: save mechanism type on operation initialization
Sets session active processing mechanism type from init_symm_operation(), init_asymm_operation() and init_disgest_operation() rather than from their caller functions. No functional change.
Reviewed-by: Valerii Chubar <valerii_chubar@epam.com> Reviewed-by: Xiaoxu Zeng <zengxiaoxu@huawei.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
45d40bda |
| 05-Dec-2022 |
Valerii Chubar <valerii_chubar@epam.com> |
ta: pkcs11: Add RSA AES key wrap
The PKCS#11 Specification: https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/cs01/ pkcs11-spec-v3.1-cs01.pdf
6.1.23 RSA AES KEY WRAP
The mechanism requires AES K
ta: pkcs11: Add RSA AES key wrap
The PKCS#11 Specification: https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/cs01/ pkcs11-spec-v3.1-cs01.pdf
6.1.23 RSA AES KEY WRAP
The mechanism requires AES KWP mechanism CKM_AES_KEY_WRAP_KWP which is not currently implemented in OP-TEE nor mentioned in Global Platform specification.
Use the MBedTLS to wrap/unwrap the target key.
Signed-off-by: Valerii Chubar <valerii_chubar@epam.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
03e07432 |
| 28-Sep-2022 |
Valerii Chubar <valerii_chubar@epam.com> |
ta: pkcs11: Add Ed25519 support
Add functionality to generate, import keys, sign/verify for ED25519, ED25519ctx and ED25519ph.
The values for the object identifies originates from: https://www.rfc-
ta: pkcs11: Add Ed25519 support
Add functionality to generate, import keys, sign/verify for ED25519, ED25519ctx and ED25519ph.
The values for the object identifies originates from: https://www.rfc-editor.org/rfc/rfc8420.html A.1. ASN.1 Object for Ed25519
The PKCS#11 Specification: https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/cs01/ pkcs11-spec-v3.1-cs01.pdf
Signed-off-by: Valerii Chubar <valerii_chubar@epam.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
cc062b46 |
| 23-Feb-2022 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
ta: pkcs11: support for ECDH1_DERIVE
Add support for ECDH1_DERIVE operation.
Only the key derivation function CKD_NULL is supported: the raw shared secret value is therefore generated without apply
ta: pkcs11: support for ECDH1_DERIVE
Add support for ECDH1_DERIVE operation.
Only the key derivation function CKD_NULL is supported: the raw shared secret value is therefore generated without applying any key derivation function.
Tested with pkcs11_tool -m ECDH1-DERIVE
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Co-developed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
9df68186 |
| 24-Aug-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: fix error code in asymmetric signature update sequence
Correct return code in asymmetric update sequence when digest of the input data is updated on a multi-stage operation. Prior this c
ta: pkcs11: fix error code in asymmetric signature update sequence
Correct return code in asymmetric update sequence when digest of the input data is updated on a multi-stage operation. Prior this change, the implementation returned CKR_GENERAL_ERROR instead of CKR_OK because the expected success return value was loaded for that stage.
Fixes: fb279d8b608e ("ta: pkcs11: Add support for elliptic curve signing & verification") Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| #
f27310a5 |
| 06-Aug-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Correct return value for decryption with invalid ciphertext
When invalid input data is provided for TEE_AsymmetricDecrypt() it will fail with TEE_ERROR_BAD_PARAMETERS.
PCSK#11 operation
ta: pkcs11: Correct return value for decryption with invalid ciphertext
When invalid input data is provided for TEE_AsymmetricDecrypt() it will fail with TEE_ERROR_BAD_PARAMETERS.
PCSK#11 operation for C_Decrypt()/C_DecryptFinal() should return in this case CKR_ENCRYPTED_DATA_INVALID or CKR_ENCRYPTED_DATA_LEN_RANGE.
As it is hard to determine which case it is return matching error similar to encryption case.
Specified in: PKCS #11 Cryptographic Token Interface Base Specification Version 2.40 Plus Errata 01 5.9 Decryption functions C_Decrypt/C_DecryptFinal
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
6a6299fb |
| 06-Aug-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Correct return value for encryption with invalid input
When invalid input data is provided for TEE_AsymmetricEncrypt() it will fail with TEE_ERROR_BAD_PARAMETERS.
PCSK#11 operation for
ta: pkcs11: Correct return value for encryption with invalid input
When invalid input data is provided for TEE_AsymmetricEncrypt() it will fail with TEE_ERROR_BAD_PARAMETERS.
PCSK#11 operation for C_Encrypt()/C_EncryptFinal() should return in this case CKR_DATA_LEN_RANGE.
Specified in: PKCS #11 Cryptographic Token Interface Base Specification Version 2.40 Plus Errata 01 5.8 Encryption functions C_Encrypt/C_EncryptFinal
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
dc8c77fc |
| 06-Aug-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Add support for RSA OAEP encryption & decryption
Add support for performing PKCS #1 RSA OAEP encryption & decryption operations for:
- MGF1 SHA-1 - MGF1 SHA-224 - MGF1 SHA-256 - MGF1 SH
ta: pkcs11: Add support for RSA OAEP encryption & decryption
Add support for performing PKCS #1 RSA OAEP encryption & decryption operations for:
- MGF1 SHA-1 - MGF1 SHA-224 - MGF1 SHA-256 - MGF1 SHA-384 - MGF1 SHA-512
Specified in: PKCS #11 Cryptographic Token Interface Current Mechanisms Specification Version 2.40 Plus Errata 01 2.1.8 PKCS #1 RSA OAEP
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
d9af50bc |
| 14-Jul-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Add support for RSA PSS signing & verification
Add support for performing RSA PSS signing & verification operations for:
- PKCS #1 RSA PSS with supplied hash value - Multi stage SHA-1 -
ta: pkcs11: Add support for RSA PSS signing & verification
Add support for performing RSA PSS signing & verification operations for:
- PKCS #1 RSA PSS with supplied hash value - Multi stage SHA-1 - Multi stage SHA-224 - Multi stage SHA-256 - Multi stage SHA-384 - Multi stage SHA-512
Specified in: PKCS #11 Cryptographic Token Interface Current Mechanisms Specification Version 2.40 Plus Errata 01 2.1.10 PKCS #1 RSA PSS
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
0442c956 |
| 04-Jan-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Add support for RSA signing & verification
Add support for performing RSA signing & verification operations for:
- PKCS #1 v1.5 RSA with supplied hash value - Multi stage MD5 - Multi st
ta: pkcs11: Add support for RSA signing & verification
Add support for performing RSA signing & verification operations for:
- PKCS #1 v1.5 RSA with supplied hash value - Multi stage MD5 - Multi stage SHA-1 - Multi stage SHA-224 - Multi stage SHA-256 - Multi stage SHA-384 - Multi stage SHA-512
Specified in: PKCS #11 Cryptographic Token Interface Current Mechanisms Specification Version 2.40 Plus Errata 01 2.1 RSA
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
fb279d8b |
| 26-Dec-2020 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Add support for elliptic curve signing & verification
Add support for performing elliptic curve signing & verification operations for:
- ECDSA with supplied hash value - Multi stage SHA
ta: pkcs11: Add support for elliptic curve signing & verification
Add support for performing elliptic curve signing & verification operations for:
- ECDSA with supplied hash value - Multi stage SHA-1 - Multi stage SHA-224 - Multi stage SHA-256 - Multi stage SHA-384 - Multi stage SHA-512
Specified in: PKCS #11 Cryptographic Token Interface Current Mechanisms Specification Version 2.40 Plus Errata 01 2.3 Elliptic Curve
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|