| 0ef6b144 | 25-Sep-2021 |
Victor Chong <victor.chong@linaro.org> |
ta: pkcs11: Add support for AES CMAC mechanisms
Add support for CKM_AES_CMAC* mechanisms.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linar
ta: pkcs11: Add support for AES CMAC mechanisms
Add support for CKM_AES_CMAC* mechanisms.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| 70b6683b | 03-Jun-2021 |
Victor Chong <victor.chong@linaro.org> |
ta: pkcs11: Add support for more HMAC mechanisms
Add support for *_GENERAL MD5 and SHA based HMAC mechanisms.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <et
ta: pkcs11: Add support for more HMAC mechanisms
Add support for *_GENERAL MD5 and SHA based HMAC mechanisms.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| 42765f82 | 12-Jul-2021 |
Victor Chong <victor.chong@linaro.org> |
ta: pkcs11: Fix sign size comparison
The current check does not take into account input signature sizes that are larger than the hash size, which are invalid and should return an error. The input si
ta: pkcs11: Fix sign size comparison
The current check does not take into account input signature sizes that are larger than the hash size, which are invalid and should return an error. The input signature size can be less than the hash size, but not for the mechanisms the function is currently used for. Change the check to match exactly the hash size.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| 6f6d5e75 | 02-Jun-2021 |
Victor Chong <victor.chong@linaro.org> |
ta: pkcs11: Fix typo
Fix typo in comment.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta
ta: pkcs11: Fix typo
Fix typo in comment.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| 95636b36 | 25-Aug-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: make heap size configurable
Add a configuration switch for the PKCS11 TA heap size defaulting to 16kB as legacy.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-b
ta: pkcs11: make heap size configurable
Add a configuration switch for the PKCS11 TA heap size defaulting to 16kB as legacy.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| edce8377 | 25-Aug-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: describe CFG_PKCS11_TA_TOKEN_COUNT
Add a default value and a description for PKCS11 TA config switch CFG_PKCS11_TA_TOKEN_COUNT in ta/pkcs11/sub.mk.
Signed-off-by: Etienne Carriere <etie
ta: pkcs11: describe CFG_PKCS11_TA_TOKEN_COUNT
Add a default value and a description for PKCS11 TA config switch CFG_PKCS11_TA_TOKEN_COUNT in ta/pkcs11/sub.mk.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
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 ...
|
| 2364aa69 | 29-Jul-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: pkcs11: Add operation state in session
Add more operation states to take care of scenarios like failure of an incremental (update) operation if a one-shot/final operation has been started.
Sign
ta: pkcs11: Add operation state in session
Add more operation states to take care of scenarios like failure of an incremental (update) operation if a one-shot/final operation has been started.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f3cc23fe | 18-Jul-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Add missing PKCS11_CKR_ helpers
Adds used but missing PKCS11_CKR_ helpers: - PKCS11_CKR_KEY_TYPE_INCONSISTENT - PKCS11_CKR_KEY_NOT_WRAPPABLE - PKCS11_CKR_KEY_UNEXTRACTABLE
Signed-off-by
ta: pkcs11: Add missing PKCS11_CKR_ helpers
Adds used but missing PKCS11_CKR_ helpers: - PKCS11_CKR_KEY_TYPE_INCONSISTENT - PKCS11_CKR_KEY_NOT_WRAPPABLE - PKCS11_CKR_KEY_UNEXTRACTABLE
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 73124d51 | 18-Jul-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Sort PKCS11_CKR_ helper lines
Sort PKCS11_CKR_ helper lines to match their order in pkcs11_ta.h.
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Ca
ta: pkcs11: Sort PKCS11_CKR_ helper lines
Sort PKCS11_CKR_ helper lines to match their order in pkcs11_ta.h.
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 9cf1afce | 09-Jan-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Fix RSA public key import
Different requirements are in place when importing RSA public key vs. generaing a new RSA key pair.
Specified in: PKCS #11 Cryptographic Token Interface Curren
ta: pkcs11: Fix RSA public key import
Different requirements are in place when importing RSA public key vs. generaing a new RSA key pair.
Specified in: PKCS #11 Cryptographic Token Interface Current Mechanisms Specification Version 2.40 Plus Errata 01 2.1.2 RSA public key objects and 2.1.4 PKCS #1 RSA key pair generation
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@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 ...
|
| 86922832 | 04-Jan-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Add RSA key pair generation support
Specified in: PKCS #11 Cryptographic Token Interface Current Mechanisms Specification Version 2.40 Plus Errata 01 2.1.4 PKCS #1 RSA key pair generatio
ta: pkcs11: Add RSA key pair generation support
Specified in: PKCS #11 Cryptographic Token Interface Current Mechanisms Specification Version 2.40 Plus Errata 01 2.1.4 PKCS #1 RSA key pair generation
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| db28c542 | 14-Jul-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Add elliptic curve mecha bits to bytes conversions
Even thou not currently used by the code add support for EC bits to bytes conversions to mechanism_supported_key_sizes_bytes() as more
ta: pkcs11: Add elliptic curve mecha bits to bytes conversions
Even thou not currently used by the code add support for EC bits to bytes conversions to mechanism_supported_key_sizes_bytes() as more will be added for RSA.
This is to help to keep it in sync with pkcs11_mechanism_supported_key_sizes().
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 66594cdb | 29-Jul-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: pkcs11: Remove dual crypto operations from token capability
We don't support dual cryptographic operations in current implemenetation. So remove it from token capability.
Signed-off-by: Ruchika
ta: pkcs11: Remove dual crypto operations from token capability
We don't support dual cryptographic operations in current implemenetation. So remove it from token capability.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
show more ...
|
| 8abbc8f7 | 17-Jul-2021 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
ta: pkcs11: Fix calling twice of C_EncryptInit()/C_DecryptInit()
If C_EncryptInit()/C_DecryptInit() is called twice first starts the operation and should inform caller that operation is already in p
ta: pkcs11: Fix calling twice of C_EncryptInit()/C_DecryptInit()
If C_EncryptInit()/C_DecryptInit() is called twice first starts the operation and should inform caller that operation is already in progress and keep the operation active until it is terminated with C_Encrypt()/ C_Decrypt() or by C_EncryptFinal()/C_DecryptFinal().
Specified in:
PKCS #11 Cryptographic Token Interface Base Specification Version 2.40 Plus Errata 01 5.8 Encryption functions C_EncryptInit and 5.9 Decryption functions C_DecryptInit
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| f5c0739c | 22-Mar-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: pkcs11: Add access check on new object when deriving/unwrapping
Access check is also required on created attributes when a new object is created when deriving/unwrapping keys.
Reviewed-by: Vesa
ta: pkcs11: Add access check on new object when deriving/unwrapping
Access check is also required on created attributes when a new object is created when deriving/unwrapping keys.
Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| e3f0cb56 | 05-Jul-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: pkcs11: Add support for indirect templates
Add support for handling indirect template - CKA_DERIVE_TEMPLATE and CKA_UNWRAP_TEMPLATE during key derivation/unwrapping.
Reviewed-by: Vesa Jääskeläi
ta: pkcs11: Add support for indirect templates
Add support for handling indirect template - CKA_DERIVE_TEMPLATE and CKA_UNWRAP_TEMPLATE during key derivation/unwrapping.
Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| 3668310b | 05-Jul-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: pkcs11: Add implementation for unwrapping keys
Add implementation for handling C_UnwrapKey() for mechanisms : CKM_AES_ECB CKM_AES_CBC
Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.c
ta: pkcs11: Add implementation for unwrapping keys
Add implementation for handling C_UnwrapKey() for mechanisms : CKM_AES_ECB CKM_AES_CBC
Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| 5f80f270 | 25-Feb-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: pkcs11: Add implementation for wrapping keys
Add implementation for handling C_WrapKey() for mechanisms : CKM_AES_ECB CKM_AES_CBC
Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
ta: pkcs11: Add implementation for wrapping keys
Add implementation for handling C_WrapKey() for mechanisms : CKM_AES_ECB CKM_AES_CBC
Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|
| 06b47dc4 | 25-Feb-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
ta: pkcs11: Add missing error codes
Some error codes related with wrap, unwrap and random number API's were missing from the list. These have been added.
Reviewed-by: Vesa Jääskeläinen <vesa.jaaske
ta: pkcs11: Add missing error codes
Some error codes related with wrap, unwrap and random number API's were missing from the list. These have been added.
Reviewed-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
show more ...
|