Skip to content

sys/crypto: improve doxygen markup, add ACCESS() attribute, ...#22380

Open
maribu wants to merge 26 commits into
RIOT-OS:masterfrom
maribu:sys/crypto/cleanup
Open

sys/crypto: improve doxygen markup, add ACCESS() attribute, ...#22380
maribu wants to merge 26 commits into
RIOT-OS:masterfrom
maribu:sys/crypto/cleanup

Conversation

@maribu

@maribu maribu commented Jun 14, 2026

Copy link
Copy Markdown
Member

Contribution description

  • clean up and extend the doxygen markup
  • use ACCESS() macro to annotate functions to allow GCC to provide better -Wstringop-overflow diagnostics
  • encode size information into APIs using uint8_t param[size] instead of uint8_t *param where possible
  • use idomatic types in API, e.g. consistently size_t for size of in-memory structures and ssize_t for when that is mixed with in-band error signaling
  • fix style issues pointed out by the linter

Testing procedure

  • make -C tests/sys/crypto flash test -j32
  • build tests

(Both done by Murdock)

Issues/PRs references

None

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • used Qwen Coder 30B A3B to crunch over function signatures in header files and list signatures that might be annotated
  • No AI tools were used for actual code changes

@maribu
maribu requested a review from leandrolanzieri as a code owner June 14, 2026 21:58
@maribu maribu added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Jun 14, 2026
@maribu maribu added 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 Jun 14, 2026
@github-actions github-actions Bot added Area: tests Area: tests and testing framework Area: sys Area: System labels Jun 14, 2026
@riot-ci

riot-ci commented Jun 14, 2026

Copy link
Copy Markdown

Murdock results

FAILED

f0cf5a5 fixup! fixup! sys/crypto: improve doxygen markup, add ACCESS() attribute, ...

Success Failures Total Runtime
114 0 10116 01m:06s

Artifacts

- clean up and extend the doxygen markup
- use `ACCESS()` macro to annotate functions to allow GCC to provide
  better `-Wstringop-overflow` diagnostics
- encode size information into APIs using `uint8_t param[size]` instead
  of `uint8_t *param` where possible
- use idomatic types in API, e.g. consistently `size_t` for size of
  in-memory structures and `ssize_t` for when that is mixed with in-band
  error signaling
- fix style issues pointed out by the linter
@maribu
maribu force-pushed the sys/crypto/cleanup branch from 3e3402d to 109680b Compare June 15, 2026 11:47
@crasbe
crasbe requested a review from mguetschow June 26, 2026 11:49
Comment thread sys/crypto/modes/ccm.c Outdated
Comment thread sys/crypto/modes/ccm.c Outdated
Comment thread sys/crypto/modes/ocb.c Outdated
Comment thread sys/crypto/modes/ocb.c Outdated
Comment thread sys/crypto/helper.c Outdated
Comment thread sys/include/crypto/ciphers.h
Comment thread sys/include/crypto/ciphers.h
Comment thread sys/include/crypto/ciphers.h Outdated
Comment thread sys/include/crypto/ciphers.h Outdated
Comment thread sys/include/crypto/ciphers.h Outdated
maribu and others added 15 commits June 26, 2026 15:39
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
@AnnsAnns

AnnsAnns commented Jul 3, 2026

Copy link
Copy Markdown
Member

Whats the state of this PR? I see a lot of commits post review

@maribu maribu added the State: waiting for author State: Action by the author of the PR is required label Jul 3, 2026
@crasbe crasbe added the Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines label Jul 3, 2026
maribu added 2 commits July 4, 2026 15:54
On legacy ARM and AVR targets, `limits.h` does not define `SSIZE_MAX`.
The POSIX standard however requires this. This adds a custom `limits.h`
wrapper header that does `#include_next <limits.h>` and then adds an
`#define SSIZE_MAX` when it was not provided by the libc.
@maribu maribu removed the State: waiting for author State: Action by the author of the PR is required label Jul 5, 2026
@github-actions github-actions Bot added the Area: tools Area: Supplementary tools label Jul 5, 2026
@maribu

maribu commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

Should be good now. Maybe @mguetschow as cryptography expert could take a look as well?

@maribu maribu added the AI: Helped PR/Issue uses AI sparingly, e.g. code inline assistant, debugging with AI, etc. label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Helped PR/Issue uses AI sparingly, e.g. code inline assistant, debugging with AI, etc. Area: sys Area: System Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants