Skip to content
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

nimble/ll: Fix encryption start procedure #1505

Merged

Conversation

andrzej-kaczmarek
Copy link
Contributor

We need to update rx packet counter and direction bit after sending LL_START_ENC_RSP in central role as otherwise we will fail to decrypt LL_START_ENC_RSP from peripheral and will drop connection due to MIC failure.

This only happens if peripheral replies with LL_START_ENC_RSP in the next slot after we send LL_START_ENC_RSP. If peripheral replies with an empty PDU instead, we will update direction bit on continuation and decryption on rx will be successful.

We need to update rx packet counter and direction bit after sending
LL_START_ENC_RSP in central role as otherwise we will fail to decrypt
LL_START_ENC_RSP from peripheral and will drop connection due to MIC
failure.

This only happens if peripheral replies with LL_START_ENC_RSP in the
next slot after we send LL_START_ENC_RSP. If peripheral replies with an
empty PDU instead, we will update direction bit on continuation and
decryption on rx will be successful.
@mkasenberg
Copy link
Contributor

#AutoPTS run mynewt SM/CEN/JW/BI-04-C

@codecoup-tester
Copy link

Scheduled PR ##1505 (comment) after 16:00:26.

@codecoup-tester
Copy link

AutoPTS Bot results:
No failed test found.

Successful testsSM SM/CEN/JW/BI-04-C PASS

@andrzej-kaczmarek andrzej-kaczmarek merged commit a60ee37 into apache:master May 23, 2023
8 checks passed
@andrzej-kaczmarek andrzej-kaczmarek deleted the ll-encrypt-start-fix branch May 23, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants