-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Silabs] Add partial hardware acceleration of SPAKE2+ on EFR32xG2x #24845
Merged
bzbarsky-apple
merged 7 commits into
project-chip:master
from
stevew817:efr32xg2x_spake2p_speedup
Feb 8, 2023
Merged
[Silabs] Add partial hardware acceleration of SPAKE2+ on EFR32xG2x #24845
bzbarsky-apple
merged 7 commits into
project-chip:master
from
stevew817:efr32xg2x_spake2p_speedup
Feb 8, 2023
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
Silicon Labs devices with SEMAILBOX have a feature to return the full result of the ECDH key derivation operation, which is equal to the result of a scalar ECPoint multiplication operation. Leverage that hardware- accelerated primitive to speed up the commissioning process versus doing ECP calculations in pure software.
Now that the base point multiplication operation is accelerated, split up the AddMul function in two (accelerated) multiplications and one software-backed addition.
Replace the last instance of mbedtls_ecp_mul with the accelerated operation
PR #24845: Size comparison from 87e7510 to 8fb6543 Increases (5 builds for cc13x2_26x2, efr32, esp32, psoc6)
Decreases (16 builds for bl602, bl702, cc13x2_26x2, efr32, nrfconnect, psoc6, qpg, telink)
Full report (53 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
stevew817
changed the title
Add partial hardware acceleration of SPAKE2+ on EFR32xG2x
[Silabs] Add partial hardware acceleration of SPAKE2+ on EFR32xG2x
Feb 3, 2023
pullapprove
bot
requested review from
amitnj,
andy31415,
anush-apple,
arkq,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
franck-apple,
gjc13,
harsha-rajendran,
hawk248,
jelderton,
jepenven-silabs and
jmartinez-silabs
February 3, 2023 16:54
pullapprove
bot
requested review from
mrjerryjohns,
msandstedt,
pjzander-signify,
rgoliver,
robszewczyk,
saurabhst,
selissia,
tcarmelveilleux,
tecimovic,
tehampson,
turon,
vijs,
vivien-apple and
woody-apple
February 3, 2023 16:54
rcasallas-silabs
approved these changes
Feb 3, 2023
jmartinez-silabs
approved these changes
Feb 3, 2023
PR #24845: Size comparison from 87e7510 to b6d99a5 Increases (8 builds for cc13x2_26x2, efr32, esp32, psoc6, telink)
Decreases (12 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, nrfconnect, psoc6, telink)
Full report (53 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #24845: Size comparison from 4d6db27 to affb7ab Full report (1 build for cc32xx)
|
bzbarsky-apple
approved these changes
Feb 8, 2023
lpbeliveau-silabs
pushed a commit
to lpbeliveau-silabs/connectedhomeip
that referenced
this pull request
Feb 13, 2023
…roject-chip#24845) * Reuse curve parameters stored in object instead of recreating * Speed up SPAKE2+ point multiplication on devices with HSE Silicon Labs devices with SEMAILBOX have a feature to return the full result of the ECDH key derivation operation, which is equal to the result of a scalar ECPoint multiplication operation. Leverage that hardware- accelerated primitive to speed up the commissioning process versus doing ECP calculations in pure software. * Speed up SPAKE2+ point multiplication on devices with HSE (2) Now that the base point multiplication operation is accelerated, split up the AddMul function in two (accelerated) multiplications and one software-backed addition. * Speed up SPAKE2+ point multiplication on devices with HSE (3) Replace the last instance of mbedtls_ecp_mul with the accelerated operation * Restyled by clang-format * Add error handling to EFR32 accelerated version of PointAddMul --------- Co-authored-by: Restyled.io <[email protected]>
lecndav
pushed a commit
to lecndav/connectedhomeip
that referenced
this pull request
Mar 22, 2023
…roject-chip#24845) * Reuse curve parameters stored in object instead of recreating * Speed up SPAKE2+ point multiplication on devices with HSE Silicon Labs devices with SEMAILBOX have a feature to return the full result of the ECDH key derivation operation, which is equal to the result of a scalar ECPoint multiplication operation. Leverage that hardware- accelerated primitive to speed up the commissioning process versus doing ECP calculations in pure software. * Speed up SPAKE2+ point multiplication on devices with HSE (2) Now that the base point multiplication operation is accelerated, split up the AddMul function in two (accelerated) multiplications and one software-backed addition. * Speed up SPAKE2+ point multiplication on devices with HSE (3) Replace the last instance of mbedtls_ecp_mul with the accelerated operation * Restyled by clang-format * Add error handling to EFR32 accelerated version of PointAddMul --------- Co-authored-by: Restyled.io <[email protected]>
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.
Leverage the available hardware acceleration on EFR32xG2x to use the ECDH operation as a proxy for scalar-ECpoint multiplication. This speeds up the device-side SPAKE2+ handshake calculation tremendously: from 3.8 seconds down to 81 milliseconds.