-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: Controller: Deprecate tinycrypt part2 (testing) #81221
Draft
cvinayak
wants to merge
28
commits into
zephyrproject-rtos:main
Choose a base branch
from
cvinayak:deprecate-tinycrypt-part2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Bluetooth: Controller: Deprecate tinycrypt part2 (testing) #81221
cvinayak
wants to merge
28
commits into
zephyrproject-rtos:main
from
cvinayak:deprecate-tinycrypt-part2
+1,483
−1,774
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
zephyrbot
added
manifest
manifest-mbedtls
DNM
This PR should not be merged (Do Not Merge)
labels
Nov 11, 2024
Fix to reschedule before overlap and be collision resolved in the next periodic interval for tickers using slot window yield. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Introduce ticker reschedule with drift so that role like AUX_ADV_IND can start after overlapping states and roles using time reservations. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Add implementation for Extended Advertising Auxiliary PDUs to use ticks slot window feature. This will allow the periodic scheduling of AUX_ADV_IND PDUs to drift upto 10 ms advertising delay minus the ticks_slot time reservation of the AUX_ADV_IND PDU when overlapping with other states/roles that cannot be moved around, to avoid skipping them. Having an active Extended Advertising simultaneously with an ISO Synchronized Receiver or Connected ISO connection will now have less ISO SDU loss when using 10 ms ISO intervals. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Fix ISO Sync Receiver implementation to correctly reflect the payload number and timestamp. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Fix ISO Sync Receiver time reservation calculation to use peer broadcasted bis_spacing and sub_interval, instead of incorrectly calculating using local implementation used tMSS value. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Fix ISO Sync Receiver implementation to correctly prevent subevent from pre-empted in the unreserve time space. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Several tests were using K_FOREVER when allocating the buffer for TX in the system workqueue, which is illegal behavior. The solution chosen was to create a TX thread to handle TX, similar to the solution used in the audio shell and some sample applications. This way we can continue to use K_FOREVER when allocting buffers and it will always be done in a round-robin fashion while TXing as much as possible, by always enqueuing all the buffers with mock data. Since this works for all streams (both broadcast and unicast), it was obvious to use the same implementation for all tests, and thus cleaning up the tests a bit and more them more similar. Signed-off-by: Emil Gydesen <[email protected]>
Remove a duplicated advertising set in the CAP acceptor babblesim test. The advertising set is configured in test_start_adv. Signed-off-by: Emil Gydesen <[email protected]>
The BSIM test for the CAP acceptor used legacy instead of extended advertising. This also adds the required advertising data and validation on the CAP initiator and CAP commander. Signed-off-by: Emil Gydesen <[email protected]>
Align audio test Controller Kconfig value same as used with nRF53bsim. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Enable some high reliability CAP tests by increasing ISO Tx buffer counts in the Controller to sufficiently generate number of complete when multiple SDUs are transmitted in single ISO interval with use of pre-transmissions. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Squash of commits from PR 80136 Signed-off-by: Valerio Setti <[email protected]>
Squash of commits from PR 80368 Signed-off-by: Valerio Setti <[email protected]>
Increase timeout between procedures in access_tx_transmitt test to avoid packet loss. Signed-off-by: Pavel Vasilyev <[email protected]>
As part of the deprecation process of TinyCrypt in Zephyr codebase (zephyrproject-rtos#79566) this commit removes CONFIG_BT_USE_PSA_API symbol. This was used in BT crypto/host modules to select PSA crypto API over TinyCrypt (which was the default until now). Since TinyCrypt is removed and PSA crypto API is the new standard library for crypto operations, CONFIG_BT_USE_PSA_API is no more needed. Signed-off-by: Valerio Setti <[email protected]>
As part of the deprecation process of TinyCrypt in Zephyr codebase (zephyrproject-rtos#79566) this commit sets PSA Crypto API as the default library to perform ECC-DH in HCI, replacing TinyCrypt. Therefore the symbol BT_TINYCRYPT_ECC is renamed as BT_SEND_ECC_EMULATION. Rreference in samples/tests are also fixed. Signed-off-by: Valerio Setti <[email protected]>
As part of the deprecation process of TinyCrypt in Zephyr codebase (zephyrproject-rtos#79566) this commit removes TinyCrypt usage from BT mesh and also the related CONFIG_BT_MESH_USES_TINYCRYPT symbol and it sets PSA Crypto APIs as the default library for crypto operations. Tests are also updated in this commit. Signed-off-by: Valerio Setti <[email protected]>
As part of the deprecation process of TinyCrypt in Zephyr codebase (zephyrproject-rtos#79566) this commit modified the dependencies of BT_RPA. Instead of selecting TinyCrypt, it relies on BT_HOST_CRYPTO or BT_CTLR_CRYPTO. This helps both in the deprecation process of TinyCrypt, but also this is more correct dependency since these 2 symbols are extensively used in the rpa.c source code. Signed-off-by: Valerio Setti <[email protected]>
As part of the work of deprecating TinyCrypt in favor of PSA crypto API, this commit fixes some kconfigs in order to reduce the RAM footprint. In all involved samples RAM usage was extremely high even with TinyCrypt (usually > 98%) and of course it got overflowed once TinyCrypt got replaced by Mbed TLS's PSA Crypto API. Signed-off-by: Valerio Setti <[email protected]>
Replace all references to TinyCrypt with PSA Crypto API in BT unit tests. Signed-off-by: Valerio Setti <[email protected]>
Include Mbed TLS headers to the build system. This is required because these tests do not follow the "standard build pattern" of Mbed TLS in Zephyr, otherwise include files would be already available after the library has been linked. In these examples some BT source files and Kconfigs are manually added to the CmakeLists.txt file bypassing the standard library build pattern, so Mbed TLS headers must also be added manually. Signed-off-by: Valerio Setti <[email protected]>
Increase the number of key slots in the PSA Crypto core for some tests using more keys than the default (16). Signed-off-by: Valerio Setti <[email protected]>
Moving from TinyCrypt to PSA Crypto API caused an entropy source to be always required, so this commit adds it in tests where necessary. Signed-off-by: Valerio Setti <[email protected]>
BT uses PSA Crypto API to perform crypto operations and, on this platform, these APIs are implemented through Mbed TLS. In order to properly initialize this library, a random number generator is required. Since this platform does not have a true random number generator, we enable the test one. This holds only when BT is enabled, of course. Signed-off-by: Valerio Setti <[email protected]>
The tests were using the default of 1 which is very low, especially when we might have multiple RX streams. Signed-off-by: Emil Gydesen <[email protected]>
On platforms like nrf5340 there are 2 CPUs: - one is the cpu_net which takes care of the radio stuff and owns the HW random generator - one is the cpu_app which holds application data and polls cpu_net through HCI commands when it needs some random data. The PSA core implemented in Mbed TLS needs random data at initialization time, which happens early in the boot process. If we wait for BT to be ready before issuing the HCI command, then PSA core intialization will fail. In facts there is no need for the BT to be completely initialized just to ask for some random data from the cpu_app to the cpu_net since the HW random generator will likely be already functional in the cpu_net. So let's just try the HCI command and, if something is not right, it will fail anyway. There's no need to anticipate the failure. Signed-off-by: Valerio Setti <[email protected]>
On the native_sim platform, BT relies on Mbed TLS to implement PSA Crypto API. This library requires a valid entropy source to initialize properly. Therefore we enable ENTROPY_GENERATOR at board level instead of editing _all_ the samples/tests configuration files to make a more compact change. Signed-off-by: Valerio Setti <[email protected]>
Increase test and main stack sizes for the qemu_cortex_m3 platform in order to be able to successfully run the test. Signed-off-by: Valerio Setti <[email protected]>
cvinayak
force-pushed
the
deprecate-tinycrypt-part2
branch
from
November 14, 2024 09:44
5693836
to
8f79404
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Deprecate tinycrypt part2