crypto: DS uses RSA peripheral, added shared lock

This commit is contained in:
Marius Vikhammer
2020-04-07 12:30:00 +08:00
committed by bot
parent a521921788
commit a2a204c2b9
11 changed files with 75 additions and 58 deletions
+14 -4
View File
@@ -27,14 +27,24 @@ extern "C" {
*/
/**
* Acquire lock for the ESP cryptography peripheral.
* Acquire lock for the AES and SHA cryptography peripherals, which both use the crypto DMA.
*/
void esp_crypto_lock_acquire(void);
void esp_crypto_dma_lock_acquire(void);
/**
* Release the lock for the ESP cryptography peripheral.
* Release lock for the AES and SHA cryptography peripherals, which both use the crypto DMA.
*/
void esp_crypto_lock_release(void);
void esp_crypto_dma_lock_release(void);
/**
* Acquire lock for the MPI/RSA cryptography peripheral
*/
void esp_crypto_mpi_lock_acquire(void);
/**
* Release lock for the MPI/RSA cryptography peripheral
*/
void esp_crypto_mpi_lock_release(void);
#ifdef __cplusplus
}
+2 -2
View File
@@ -97,7 +97,7 @@ typedef struct {
* in parallel.
* It blocks until the signing is finished and then returns the signature.
*
* @note This function locks the HMAC, SHA and AES components during its entire execution time.
* @note This function locks the HMAC, SHA, AES and RSA components during its entire execution time.
*
* @param message the message to be signed; its length is determined by data->rsa_length
* @param data the encrypted signing key data (AES encrypted RSA key + IV)
@@ -126,7 +126,7 @@ esp_err_t esp_ds_sign(const void *message,
* This function yields a context object which needs to be passed to \c esp_ds_finish_sign() to finish the signing
* process.
*
* @note This function locks the HMAC, SHA and AES components, so the user has to ensure to call
* @note This function locks the HMAC, SHA, AES and RSA components, so the user has to ensure to call
* \c esp_ds_finish_sign() in a timely manner.
*
* @param message the message to be signed; its length is determined by data->rsa_length