Skip to content

Commit f7522e5

Browse files
Vge0rgeSebastianBoe
authored andcommitted
crypto: Adding nrf_cc3xx_platform/mbedcrypto v0.9.11
-Adding version 0.9.11 of CryptoCell runtime library -Fixed mutex locking issue in CTR_DRBG reseed and random number generator functions -Modified the KMU APIs to remove the reservation of slots 0 and 1, they can be used freely now -Fixed issue with the global CTR_DRBG context getting stuck when it reached the reseed interval -Fixed building issue with the derived key APIs -Adding changelog items -Setting 0.9.11 as selected version in crypto/CMakeLists.txt Ref:NCSDK-10988 Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 1ed467f commit f7522e5

File tree

61 files changed

+211
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+211
-62
lines changed

crypto/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if (CONFIG_NRF_CC3XX_PLATFORM)
8989
set (CC3XX_ARCH cc310)
9090
endif()
9191
set (NRF_CC3XX_PLATFORM_BASE ${CMAKE_CURRENT_SOURCE_DIR}/nrf_${CC3XX_ARCH}_platform)
92-
set (NRF_CC3XX_PLATFORM_VER 0.9.10)
92+
set (NRF_CC3XX_PLATFORM_VER 0.9.11)
9393
if (NOT CONFIG_HW_CC3XX_INTERRUPT)
9494
set(CC3XX_PLATFORM_FLAVOR no-interrupts)
9595
endif()
@@ -131,7 +131,7 @@ if (CONFIG_CC3XX_BACKEND)
131131
set (CC3XX_ARCH cc310)
132132
endif()
133133
set(NRF_CC3XX_BASE ${CMAKE_CURRENT_SOURCE_DIR}/nrf_${CC3XX_ARCH}_mbedcrypto)
134-
set(NRF_CC3XX_VER 0.9.10)
134+
set(NRF_CC3XX_VER 0.9.11)
135135
if (NOT CONFIG_HW_CC3XX_INTERRUPT)
136136
set(CC3XX_FLAVOR no-interrupts)
137137
endif()

crypto/nrf_cc310_mbedcrypto/CHANGELOG.rst

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,90 @@ Changelog - nrf_cc3xx_mbedcrypto
99

1010
All notable changes to this project are documented in this file.
1111

12+
nrf_cc3xx_mbedcrypto - 0.9.11
13+
****************************
14+
15+
New version of the runtime library with the following bug fix:
16+
17+
* Fixed an issue with the locking of mutex in the CTR_DRBG reseed
18+
and random number generator functions.
19+
20+
Library built against Mbed TLS version 2.26.0.
21+
22+
This version is dependent on the nrf_cc310_platform or nrf_cc312_platform library for low-level initialization of the system and proper RTOS integration.
23+
24+
Added
25+
=====
26+
27+
Added a new build of nRF_cc3xx_mbedcrypto libraries for nRF9160, nRF52840, and nRF5340.
28+
29+
.. note::
30+
31+
The *short-wchar* libraries are compiled with a wchar_t size of 16 bits.
32+
33+
* nrf_cc312_mbedcrypto, nRF5340 variants
34+
35+
* ``cortex-m33/hard-float/libnrf_cc312_mbedcrypto_0.9.11.a``
36+
* ``cortex-m33/soft-float/libnrf_cc312_mbedcrypto_0.9.11.a``
37+
38+
* No interrupts
39+
40+
* ``cortex-m33/soft-float/no-interrupts/libnrf_cc312_mbedcrypto_0.9.11.a``
41+
* ``cortex-m33/hard-float/no-interrupts/libnrf_cc312_mbedcrypto_0.9.11.a``
42+
43+
* short-wchar
44+
45+
* ``cortex-m33/hard-float/short-wchar/libnrf_cc312_mbedcrypto_0.9.11.a``
46+
* ``cortex-m33/soft-float/short-wchar/libnrf_cc312_mbedcrypto_0.9.11.a``
47+
48+
* short-wchar, no interrupts
49+
50+
* ``cortex-m33/hard-float/short-wchar/no-interrupts/libnrf_cc312_mbedcrypto_0.9.11.a``
51+
* ``cortex-m33/soft-float/short-wchar/no-interrupts/libnrf_cc312_mbedcrypto_0.9.11.a``
52+
53+
54+
* nrf_cc310_mbedcrypto, nRF9160 variants
55+
56+
* ``cortex-m33/hard-float/libnrf_cc312_mbedcrypto_0.9.11.a``
57+
* ``cortex-m33/soft-float/libnrf_cc310_mbedcrypto_0.9.11.a``
58+
59+
* No interrupts
60+
61+
* ``cortex-m33/soft-float/no-interrupts/libnrf_cc310_mbedcrypto_0.9.11.a``
62+
* ``cortex-m33/hard-float/no-interrupts/libnrf_cc310_mbedcrypto_0.9.11.a``
63+
64+
* short-wchar
65+
66+
* ``cortex-m33/hard-float/short-wchar/libnrf_cc310_mbedcrypto_0.9.11.a``
67+
* ``cortex-m33/soft-float/short-wchar/libnrf_cc310_mbedcrypto_0.9.11.a``
68+
69+
* short-wchar, no interrupts
70+
71+
* ``cortex-m33/hard-float/short-wchar/no-interrupts/libnrf_cc310_mbedcrypto_0.9.11.a``
72+
* ``cortex-m33/soft-float/short-wchar/no-interrupts/libnrf_cc310_mbedcrypto_0.9.11.a``
73+
74+
75+
* nrf_cc310_mbedcrypto, nRF52840 variants
76+
77+
* ``cortex-m4/soft-float/libnrf_cc310_mbedcrypto_0.9.11.a``
78+
* ``cortex-m4/hard-float/libnrf_cc310_mbedcrypto_0.9.11.a``
79+
80+
* No interrupts
81+
82+
* ``cortex-m4/hard-float/no-interrupts/libnrf_cc310_mbedcrypto_0.9.11.a``
83+
* ``cortex-m4/soft-float/no-interrupts/libnrf_cc310_mbedcrypto_0.9.11.a``
84+
85+
* short-wchar
86+
87+
* ``cortex-m4/soft-float/short-wchar/libnrf_cc310_mbedcrypto_0.9.11.a``
88+
* ``cortex-m4/hard-float/short-wchar/libnrf_cc310_mbedcrypto_0.9.11.a``
89+
90+
* short-wchar, no interrupts
91+
92+
* ``cortex-m4/soft-float/short-wchar/no-interrupts/libnrf_cc310_mbedcrypto_0.9.11.a``
93+
* ``cortex-m4/hard-float/short-wchar/no-interrupts/libnrf_cc310_mbedcrypto_0.9.11.a``
94+
95+
1296
nrf_cc3xx_mbedcrypto - 0.9.10
1397
*****************************
1498

crypto/nrf_cc310_mbedcrypto/include/mbedtls/cc3xx_kmu.h

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
#include MBEDTLS_CONFIG_FILE
2929
#endif
3030

31-
#define NRF_KMU_FIRST_SLOT (0U) //!< First addressable key slot in KMU (reserved for Kdr)
32-
#define NRF_KMU_SECOND_SLOT (1U) //!< Second addressable key slot in KMU (reserved for Kdr)
31+
#define NRF_KMU_FIRST_SLOT (0U) //!< First addressable key slot in KMU
32+
#define NRF_KMU_SECOND_SLOT (1U) //!< Second addressable key slot in KMU
3333
#define NRF_KMU_LAST_SLOT (127U) //!< Last addressable key slot in KMU.
3434

3535
#define NRF_KMU_SLOT_KDR (0U) //!< Key slot reserved for Kdr (Also known as HUK or Root derivation key).
@@ -77,10 +77,8 @@ extern "C"
7777
* If derived key usage is intended, please use the API
7878
* nrf_cc3xx_platform_kmu_aes_setkey_enc_shadow_key_derived.
7979
*
80-
* @note KMU slots 0 and 1 is reserved for Kdr and can't be used directly.
81-
*
8280
* @param ctx AES context to set the key by KMU slot
83-
* @param slot_id Identifier of the key slot (2 - 127)
81+
* @param slot_id Identifier of the key slot (0 - 127)
8482
* @param keybits Key size in bits
8583
*
8684
* @returns 0 on success, otherwise a negative number.
@@ -103,10 +101,8 @@ int mbedtls_aes_setkey_enc_shadow_key(
103101
* If derived key usage is intended, please use the API
104102
* nrf_cc3xx_platform_kmu_aes_setkey_dec_shadow_key_derived.
105103
*
106-
* @note KMU slots 0 and 1 is reserved for Kdr and can't be used directly.
107-
*
108104
* @param ctx AES context to set the key by KMU slot.
109-
* @param slot_id Identifier of the key slot (2 - 127).
105+
* @param slot_id Identifier of the key slot (0 - 127).
110106
* @param keybits Key size in bits.
111107
*
112108
* @returns 0 on success, otherwise a negative number.
@@ -214,11 +210,9 @@ extern "C"
214210
* If derived key usage is intended, please use the API
215211
* nrf_cc3xx_platform_kmu_aes_setkey_enc_shadow_key_derived.
216212
*
217-
* @note KMU slots 0 and 1 is reserved for Kdr and can't be used directly.
218-
*
219213
* @param ctx AES context to set the key by KMU slot.
220214
* @param cipher Cipher id to use.
221-
* @param slot_id Identifier of the key slot (2 - 127).
215+
* @param slot_id Identifier of the key slot (0 - 127).
222216
* @param keybits Key size in bits.
223217
*
224218
* @returns 0 on success, otherwise a negative number.
@@ -296,11 +290,9 @@ extern "C"
296290
* If derived key usage is intended, please use the API
297291
* nrf_cc3xx_platform_kmu_aes_setkey_enc_shadow_key_derived.
298292
*
299-
* @note KMU slots 0 and 1 is reserved for Kdr and can't be used directly.
300-
*
301293
* @param ctx AES context to set the key by KMU slot.
302294
* @param cipher Cipher id to use.
303-
* @param slot_id Identifier of the key slot (2 - 127).
295+
* @param slot_id Identifier of the key slot (0 - 127).
304296
* @param keybits Key size in bits.
305297
*
306298
* @returns 0 on success, otherwise a negative number.

0 commit comments

Comments
 (0)