History log of /optee_os/core/drivers/crypto/caam/acipher/caam_rsa.c (Results 1 – 19 of 19)
Revision Date Author Comments
# 36179ff1 31-May-2024 Sahil Malhotra <sahil.malhotra@nxp.com>

drivers: caam: check only format bit in operation

operation variable has been updated after entering the function
so we cannot check against full RSA operations.
Updated to check only format bit in

drivers: caam: check only format bit in operation

operation variable has been updated after entering the function
so we cannot check against full RSA operations.
Updated to check only format bit in operation

Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# e64a5512 05-Nov-2024 Sahil Malhotra <sahil.malhotra@nxp.com>

drivers: caam: Update comments in RSA driver

There were some typos in comments in the code, updated them

Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>


# 86ee543b 07-Mar-2024 Sami Tolvanen <samitolvanen@google.com>

core: pass TEE_ATTR_RSA_OAEP_MGF_HASH to RSA-OAEP implementations

OP-TEE currently doesn't support using a different hash for MGF1
with RSA-OAEP. However, this is required for AOSP compatibility
(e.

core: pass TEE_ATTR_RSA_OAEP_MGF_HASH to RSA-OAEP implementations

OP-TEE currently doesn't support using a different hash for MGF1
with RSA-OAEP. However, this is required for AOSP compatibility
(e.g. in EncryptionOperationsTest.RsaOaepWithMGFDigestSuccess [1]).

Pass the MGF1 attribute to crypto implementations. Note that
only libtomcrypt supports this feature at the moment, so other
implementations will either fail or fall back to libtomcrypt when
passed a different MGF1 hash.

Link: https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/main/security/keymint/aidl/vts/functional/KeyMintTest.cpp#5552 [1]
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# ccbcceeb 20-Mar-2023 Clement Faure <clement.faure@nxp.com>

drivers: caam: add CAAM key support for RSA

Add CAAM key support for RSA.
Add RSA black key support for key pair generation and sign/decrypt
functions.

Signed-off-by: Clement Faure <clement.faure@n

drivers: caam: add CAAM key support for RSA

Add CAAM key support for RSA.
Add RSA black key support for key pair generation and sign/decrypt
functions.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# e2ec831c 03-Jul-2023 Jihwan Park <jihwp@amazon.com>

core: crypto_bignum_free(): add indirection and set pointer to NULL

To prevent human mistake, crypto_bignum_free() sets the location of the
bignum pointer to NULL after freeing it.

Signed-off-by: J

core: crypto_bignum_free(): add indirection and set pointer to NULL

To prevent human mistake, crypto_bignum_free() sets the location of the
bignum pointer to NULL after freeing it.

Signed-off-by: Jihwan Park <jihwp@amazon.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 8ac3cb37 22-Feb-2023 Anton Antonov <Anton.Antonov@arm.com>

core: drivers: crypto: caam: Check PKCS_V1_5 decryption buffer size

Check if original buffer is large enough for a result of
RSA PKCS_V1_5 decryption operation.
With this change PKCS11 variable leng

core: drivers: crypto: caam: Check PKCS_V1_5 decryption buffer size

Check if original buffer is large enough for a result of
RSA PKCS_V1_5 decryption operation.
With this change PKCS11 variable length buffers are supported
for all RSA operations:
- Crypto API checks it for PKCS_V1_5 and OAEP encryptions.
- OAEP decryption already supports it.

This fixes: https://github.com/OP-TEE/optee_os/issues/5841

Acked-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>

show more ...


# 8b63b7dd 25-Oct-2021 Clement Faure <clement.faure@nxp.com>

drivers: caam: acipher: initialize driver with the JR base address

Instead of systematically using the job ring 0 registers to initialize
the CAAM acipher drivers, use the job ring allocated to OPTE

drivers: caam: acipher: initialize driver with the JR base address

Instead of systematically using the job ring 0 registers to initialize
the CAAM acipher drivers, use the job ring allocated to OPTEE OS.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 5d49c2f4 01-Oct-2021 Clement Faure <clement.faure@nxp.com>

drivers: caam: check destination buffer size before copying message

At the end of the RSA-OAEP decryption operation, check if the
destination message buffer is big enough to hold the output of the
d

drivers: caam: check destination buffer size before copying message

At the end of the RSA-OAEP decryption operation, check if the
destination message buffer is big enough to hold the output of the
decryption operation.
If the buffer is too small, return TEE_ERROR_SHORT_BUFFER error code
along the expected buffer size.

Fixes: 796ea6d867 ("drivers: caam: implement NXP CAAM Driver - RSA")
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 8bdff4a4 07-Apr-2021 Clement Faure <clement.faure@nxp.com>

drivers: caam: append RSA to CAAM prime driver

Rename caam_prime.c to caam_prime_rsa.c
Rename struct prime_data {} to struct prime_data_rsa {}
Rename caam_prime_gen() to caam_prime_rsa_gen()

The re

drivers: caam: append RSA to CAAM prime driver

Rename caam_prime.c to caam_prime_rsa.c
Rename struct prime_data {} to struct prime_data_rsa {}
Rename caam_prime_gen() to caam_prime_rsa_gen()

The reason why specifying the RSA algorithm for the current CAAM prime
implementation is to prepare the merge for DSA algorithm that will
feature a different prime generation implementation.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>

show more ...


# a9591ed5 06-Apr-2020 Cedric Neveux <cedric.neveux@nxp.com>

drivers: caam: use CAAM DMA object in RSA

Update the RSA driver to use the CAAM DMA object

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>


# e0e51e3f 05-Mar-2021 Franck LENORMAND <franck.lenormand@nxp.com>

drivers: caam: fix read of length of D component

Read the RSA D component with caam_read_val32() which handles
endianness.
The CAAM endianness might differ between IMX and LS platforms.

Signed-off-

drivers: caam: fix read of length of D component

Read the RSA D component with caam_read_val32() which handles
endianness.
The CAAM endianness might differ between IMX and LS platforms.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 44bc8ae9 02-Feb-2021 Jerome Forissier <jerome@forissier.org>

drivers: caam: drop useless & before function names

There is no need to use & on a function name to obtain the function
address. Drop the useless & characters.

Signed-off-by: Jerome Forissier <jero

drivers: caam: drop useless & before function names

There is no need to use & on a function name to obtain the function
address. Drop the useless & characters.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# b3d204fa 12-Nov-2020 Jerome Forissier <jerome@forissier.org>

drivers: caam: use do_free_keypair() instead of open-coding

There is a function to free an RSA keypair, use it instead of
duplicating the code.

Signed-off-by: Jerome Forissier <jerome@forissier.org

drivers: caam: use do_free_keypair() instead of open-coding

There is a function to free an RSA keypair, use it instead of
duplicating the code.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 6eaf556a 12-Nov-2020 Jerome Forissier <jerome@forissier.org>

drivers: caam: do_free_keypair(): add missing free for key->dq

The do_free_keypair() function lacks a call to crypto_bignum_free() for
the dq member of the key. Add it.

Fixes: a1d5c81f8834 ("crypto

drivers: caam: do_free_keypair(): add missing free for key->dq

The do_free_keypair() function lacks a call to crypto_bignum_free() for
the dq member of the key. Add it.

Fixes: a1d5c81f8834 ("crypto: add function to free rsa keypair")
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# a1d5c81f 11-Aug-2020 Elias von Däniken <elias.vondaeniken@bluewin.ch>

crypto: add function to free rsa keypair

There was no function to proper free a rsa kepair from inside a PTA.
Now there is crypto_acipher_free_rsa_keypair().

Signed-off-by: Elias von Däniken <elias

crypto: add function to free rsa keypair

There was no function to proper free a rsa kepair from inside a PTA.
Now there is crypto_acipher_free_rsa_keypair().

Signed-off-by: Elias von Däniken <elias.vondaeniken@bluewin.ch>
Acked-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 6f0990d8 11-Jun-2020 Clement Faure <clement.faure@nxp.com>

drivers: caam: change caam_set_or_alloc_align_buf() prototype

The function now returns an `enum caam_status`.
It also returns a boolean with realloc pointer : true if the buffer is
reallocated by th

drivers: caam: change caam_set_or_alloc_align_buf() prototype

The function now returns an `enum caam_status`.
It also returns a boolean with realloc pointer : true if the buffer is
reallocated by the function, false otherwise.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 9a8fe07e 06-Mar-2020 Clement Faure <clement.faure@nxp.com>

drivers: caam: add descriptive defines for RSA key formats

Add descriptive defines for RSA private key formats for a better
readability.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-b

drivers: caam: add descriptive defines for RSA key formats

Add descriptive defines for RSA private key formats for a better
readability.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# b6ceb65c 06-Mar-2020 Clement Faure <clement.faure@nxp.com>

drivers: caam: fix RSA key format number 3

Fix the RSA private key format number 3.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>


# 796ea6d8 04-Feb-2020 Cedric Neveux <cedric.neveux@nxp.com>

drivers: caam: implement NXP CAAM Driver - RSA

Add the NXP CAAM drivers:
- Asymmetric RSA:
- Encrypt/Decrypt
- Sign/Verify
- Mathematical operation XOR (mod N)

Signed-off-by: Cedric Neveux <cedric.

drivers: caam: implement NXP CAAM Driver - RSA

Add the NXP CAAM drivers:
- Asymmetric RSA:
- Encrypt/Decrypt
- Sign/Verify
- Mathematical operation XOR (mod N)

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...