Select one of the symbols to view example projects that use it.
 
Outline
#include "soc/soc_caps.h"
esp_crypto_sha_aes_lock_acquire();
esp_crypto_sha_aes_lock_release();
esp_crypto_mpi_lock_acquire();
esp_crypto_mpi_lock_release();
Files
loading (3/5)...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/esp_hw_support/include/esp_crypto_lock.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #pragma once #include "soc/soc_caps.h" #ifdef __cplusplus extern "C" { #endif #ifdef SOC_HMAC_SUPPORTED /** * @brief Acquire lock for HMAC cryptography peripheral * * Internally also locks the SHA peripheral, as the HMAC depends on the SHA peripheral *//* ... */ void esp_crypto_hmac_lock_acquire(void); /** * @brief Release lock for HMAC cryptography peripheral * * Internally also releases the SHA peripheral, as the HMAC depends on the SHA peripheral *//* ... */ void esp_crypto_hmac_lock_release(void);/* ... */ #endif /* SOC_HMAC_SUPPORTED */ #ifdef SOC_DIG_SIGN_SUPPORTED /** * @brief Acquire lock for DS cryptography peripheral * * Internally also locks the HMAC (which locks SHA), AES and MPI peripheral, as the DS depends on these peripherals *//* ... */ void esp_crypto_ds_lock_acquire(void); /** * @brief Release lock for DS cryptography peripheral * * Internally also releases the HMAC (which locks SHA), AES and MPI peripheral, as the DS depends on these peripherals *//* ... */ void esp_crypto_ds_lock_release(void);/* ... */ #endif /* SOC_DIG_SIGN_SUPPORTED */ #if defined(SOC_SHA_SUPPORTED) || defined(SOC_AES_SUPPORTED) /** * @brief Acquire lock for the SHA and AES cryptography peripheral. * *//* ... */ void esp_crypto_sha_aes_lock_acquire(void); /** * @brief Release lock for the SHA and AES cryptography peripheral. * *//* ... */ void esp_crypto_sha_aes_lock_release(void);/* ... */ #endif /* defined(SOC_SHA_SUPPORTED) || defined(SOC_AES_SUPPORTED) */ #if defined(SOC_SHA_CRYPTO_DMA) || defined(SOC_AES_CRYPTO_DMA) /** * This API should be used by all components which use the SHA, AES, HMAC and DS crypto hardware on the ESP32S2. * They can not be used in parallel because they use the same DMA or are calling each other. * E.g., HMAC uses SHA or DS uses HMAC and AES. See the ESP32S2 Technical Reference Manual for more details. * * Other unrelated components must not use it. *//* ... */ /** * Acquire lock for the AES and SHA cryptography peripherals, which both use the crypto DMA. *//* ... */ void esp_crypto_dma_lock_acquire(void); /** * Release lock for the AES and SHA cryptography peripherals, which both use the crypto DMA. *//* ... */ void esp_crypto_dma_lock_release(void);/* ... */ #endif /* defined(SOC_SHA_CRYPTO_DMA) || defined(SOC_AES_CRYPTO_DMA) */ #ifdef SOC_MPI_SUPPORTED /** * @brief Acquire lock for the mpi cryptography peripheral. * *//* ... */ void esp_crypto_mpi_lock_acquire(void); /** * @brief Release lock for the mpi/rsa cryptography peripheral. * *//* ... */ void esp_crypto_mpi_lock_release(void);/* ... */ #endif /* SOC_MPI_SUPPORTED */ #ifdef SOC_ECC_SUPPORTED /** * @brief Acquire lock for the ECC cryptography peripheral. * *//* ... */ void esp_crypto_ecc_lock_acquire(void); /** * @brief Release lock for the ECC cryptography peripheral. * *//* ... */ void esp_crypto_ecc_lock_release(void);/* ... */ #endif /* SOC_ECC_SUPPORTED */ #ifdef SOC_ECDSA_SUPPORTED /** * @brief Acquire lock for ECDSA cryptography peripheral * * Internally also locks the ECC and MPI peripheral, as the ECDSA depends on these peripherals *//* ... */ void esp_crypto_ecdsa_lock_acquire(void); /** * @brief Release lock for ECDSA cryptography peripheral * * Internally also releases the ECC and MPI peripheral, as the ECDSA depends on these peripherals *//* ... */ void esp_crypto_ecdsa_lock_release(void);/* ... */ #endif /* SOC_ECDSA_SUPPORTED */ #ifdef SOC_KEY_MANAGER_SUPPORTED /** * @brief Acquire lock for Key Manager peripheral * *//* ... */ void esp_crypto_key_manager_lock_acquire(void); /** * @brief Release lock for Key Manager peripheral * *//* ... */ void esp_crypto_key_manager_lock_release(void);/* ... */ #endif /* SOC_KEY_MANAGER_SUPPORTED */ #ifdef __cplusplus }{...} #endif
Details
Show:
from
Types: Columns: