-
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
Refactor message encryption and pairing code #4401
Conversation
- Extract message encryption/decryption to its own functions. These can be reused for pairing, and CASE based session setup - Cleanup pairing and rendezvous code to use the new functions.
702b50c
to
7acb5fa
Compare
Size increase report for "esp32-example-build" from 6243e6a
Full report output
|
Size increase report for "nrfconnect-example-build" from 6243e6a
Full report output
|
@saurabhst, @jelderton, @BroderickCarlin, any feedback? |
Sorry, I may have merged too soon. I just saw that you asked for a couple more people to take a look. |
@jelderton, that's totally fine. Only one of the requested reviews was needed. |
Since project-chip#4401 has been merged, the test pairing/secret is added to the session manager only if rendezvous is bypassed. However, we would like to keep the possibility to test nRF Connect examples with and without the full rendezvous procedure without the need to recompile a project with different settings. Add a setting CHIP_DEVICE_CONFIG_USE_TEST_PAIRING which allows to initialize the session manager with the test secret even if rendezvous bypass mode is not used.
Since project-chip#4401 has been merged, the test pairing/secret is added to the session manager only if rendezvous is bypassed. However, we would like to keep the possibility to test nRF Connect examples with and without the full rendezvous procedure without the need to recompile a project with different settings. Add a setting CHIP_DEVICE_CONFIG_USE_TEST_PAIRING which allows to initialize the session manager with the test secret even if rendezvous bypass mode is not used.
Since #4401 has been merged, the test pairing/secret is added to the session manager only if rendezvous is bypassed. However, we would like to keep the possibility to test nRF Connect examples with and without the full rendezvous procedure without the need to recompile a project with different settings. Add a setting CHIP_DEVICE_CONFIG_USE_TEST_PAIRING which allows to initialize the session manager with the test secret even if rendezvous bypass mode is not used.
Since project-chip#4401 has been merged, the test pairing/secret is added to the session manager only if rendezvous is bypassed. However, we would like to keep the possibility to test nRF Connect examples with and without the full rendezvous procedure without the need to recompile a project with different settings. Add a setting CHIP_DEVICE_CONFIG_USE_TEST_PAIRING which allows to initialize the session manager with the test secret even if rendezvous bypass mode is not used. Signed-off-by: Damian Krolik <[email protected]>
Problem
The packet encryption/decryption code is duplicated in
SecureSessionMgr
andRendezvousSession
classes. The code can use some refactoring.Summary of Changes
These can be reused for pairing, and CASE based session setup.
SecureSessionMgr
to send encrypted messages generated by Rendezvous process.