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

Enable CCM encrypt/decrypt for 0 byte plaintext #9973

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

pan-apple
Copy link
Contributor

Problem

CASE resumption requires encrypt/decrypt for 0 byte sized values. The generated tag/MIC is actually used for session resumption. The current CHIPCrypto code is expecting the input buffer to be > 0 length.

Change overview

Remove the check, and update unit tests to verify 0 byte crypto operations.

Testing

Enabled checks for test vectors of 0 byte inputs in CHIPCryptoPALTest.

@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from bb7e53f

File Section File VM
chip-qpg6100-lighting-example.out .text -16 -16
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
[Unmapped],0,16
.debug_str,0,1
.debug_line,0,-9
.text,-16,-16


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from bb7e53f

File Section File VM
chip-shell.elf text -16 -16
chip-lock.elf text -16 -16
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_loc,0,4
.debug_line,0,-12
text,-16,-16

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_line,0,-8
text,-16,-16


@github-actions
Copy link

Size increase report for "esp32-example-build" from bb7e53f

File Section File VM
chip-all-clusters-app.elf .flash.text -20 -20
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_ranges,0,24
.debug_abbrev,0,20
[Unmapped],0,20
.debug_loc,0,3
.riscv.attributes,0,2
.debug_info,0,1
.flash.text,-20,-20
.debug_line,0,-46


@bzbarsky-apple bzbarsky-apple merged commit 8804076 into project-chip:master Sep 27, 2021
@pan-apple pan-apple deleted the crypto-case-resume branch September 27, 2021 17:07
mkardous-silabs pushed a commit to mkardous-silabs/connectedhomeip that referenced this pull request Oct 15, 2021
* Enable CCM encrypt/decrypt for 0 byte plaintext

* check for buffer allocation iff length > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants