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

sys/include/crypto/modes/ccm: specify implem limits #13095

Merged
merged 1 commit into from
Jan 12, 2020

Conversation

fjmolinas
Copy link
Contributor

Contribution description

This PR specifys the length limits according to our ccm implementation for plaintext and adata.
See #12362 and #12364 for reference.

Testing procedure

  • Verify limits in code:

adata:

RIOT/sys/crypto/modes/ccm.c

Lines 115 to 125 in be0a24e

if (auth_data_len <= 0xFEFF) {
/* length (0x0001 ... 0xFEFF) */
len_encoding = 2;
auth_data_encoded[1] = auth_data_len & 0xFF;
auth_data_encoded[0] = (auth_data_len >> 8) & 0xFF;
}
else {
DEBUG("UNSUPPORTED Adata length: %" PRIu32 "\n", auth_data_len);
return -1;
}

plaintext:

uint32_t offset;

Issues/PRs references

@fjmolinas fjmolinas added Area: doc Area: Documentation Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jan 12, 2020
@fjmolinas fjmolinas added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jan 12, 2020
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds valid and helpful details about input parameter to the documentation.

ACK and go

@aabadie aabadie merged commit 76cfe2b into RIOT-OS:master Jan 12, 2020
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Jan 15, 2020
@fjmolinas fjmolinas deleted the pr_ccm_doc branch July 31, 2020 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants