Argon2: Add Argon2d/i/id version 1.3 - #11165
Conversation
|
|
Jenkins: retest this please Aborted |
There was a problem hiding this comment.
Pull request overview
This PR adds a new wolfCrypt implementation of Argon2 (RFC 9106) supporting Argon2d/Argon2i/Argon2id (v1.3 / 0x13), including an optional threaded slice-filling mode, plus build-system integration and test/benchmark coverage.
Changes:
- Introduces the Argon2 public API (
wc_Argon2*) and implementation (wolfcrypt/src/argon2.c) with optionalWOLFSSL_ARGON2_THREADS. - Integrates Argon2 into Autotools/CMake/Zephyr builds, and ensures
HAVE_BLAKE2Bis implied whenHAVE_ARGON2is enabled to keep public headers buildable. - Adds wolfCrypt test vectors + API unit tests and a benchmark entry for Argon2.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| zephyr/CMakeLists.txt | Adds Argon2 source to Zephyr module build. |
| wolfssl/wolfcrypt/settings.h | Implies HAVE_BLAKE2B when HAVE_ARGON2 is set. |
| wolfssl/wolfcrypt/include.am | Installs the new wolfssl/wolfcrypt/argon2.h header. |
| wolfssl/wolfcrypt/argon2.h | New public Argon2 API + context types and limits. |
| wolfcrypt/src/argon2.c | New Argon2 implementation (RFC 9106) with optional threading. |
| wolfcrypt/test/test.h | Declares argon2_test() for wolfcrypt test runner. |
| wolfcrypt/test/test.c | Wires argon2_test() into the wolfcrypt test runner and adds vectors. |
| wolfcrypt/benchmark/benchmark.h | Declares bench_argon2(). |
| wolfcrypt/benchmark/benchmark.c | Adds -argon2 benchmark option and implementation. |
| tests/api/test_argon2.h | Declares Argon2 API test cases and test group macro. |
| tests/api/test_argon2.c | Adds unit tests for vectors, long tags, params, bad args, context APIs, and threads. |
| tests/api/include.am | Adds Argon2 API tests to Automake test sources/dist. |
| tests/api.c | Registers Argon2 API tests in the main API test list. |
| src/include.am | Adds Argon2 source to Automake library sources under BUILD_ARGON2. |
| doc/dox_comments/header_files/doxygen_groups.h | Adds Doxygen group for Argon2. |
| doc/dox_comments/header_files/argon2.h | Adds Doxygen documentation for Argon2 APIs. |
| doc/ALGORITHM_DEFINES.md | Documents HAVE_ARGON2 and WOLFSSL_ARGON2_THREADS defines/options. |
| configure.ac | Adds --enable-argon2 and --enable-argon2-threads plus dependency/consistency checks. |
| CMakeLists.txt | Adds WOLFSSL_ARGON2 / WOLFSSL_ARGON2_THREADS options and implies BLAKE2b as needed. |
| cmake/options.h.in | Adds HAVE_ARGON2 and WOLFSSL_ARGON2_THREADS to generated options header. |
| cmake/functions.cmake | Adds Argon2 to CMake build-flag selection and source lists. |
| ChangeLog.md | Documents the new Argon2 feature and APIs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11165
Scan targets checked: wolfcrypt-bugs, wolfcrypt-port-bugs, wolfcrypt-rs-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src
Findings: 7
7 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
|
I reviewed this PR and determined that KATs and interop tests have passed. Looks Great To Me!! |
Add implementation of Argon2d/Argon2i/Argon2id. Supports threading.
Description
Add implementation of Argon2d/Argon2i/Argon2id.
Supports threading.
Testing
Added tests.
./configure --enable-argon2
./configure --enable-argon2 --enable-smallstack
./configure --enable-all --enable-kernel-settings --enable-argon2
./configure --enable-argon2 --enable-argon2-threads