Skip to content

Argon2: Add Argon2d/i/id version 1.3 - #11165

Open
SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:argon2
Open

Argon2: Add Argon2d/i/id version 1.3#11165
SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:argon2

Conversation

@SparkiDev

Copy link
Copy Markdown
Contributor

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

@SparkiDev SparkiDev self-assigned this Aug 13, 2026
@SparkiDev

SparkiDev commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Jenkins: retest this please

Aborted

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 optional WOLFSSL_ARGON2_THREADS.
  • Integrates Argon2 into Autotools/CMake/Zephyr builds, and ensures HAVE_BLAKE2B is implied when HAVE_ARGON2 is 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.

Comment thread wolfcrypt/src/argon2.c Outdated

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread wolfcrypt/src/argon2.c Outdated
Comment thread wolfcrypt/src/argon2.c
Comment thread wolfcrypt/src/argon2.c Outdated
Comment thread tests/api/test_argon2.c
Comment thread wolfcrypt/src/argon2.c
Comment thread tests/api/test_argon2.c Outdated
Comment thread wolfcrypt/src/argon2.c
@anhu

anhu commented Aug 13, 2026

Copy link
Copy Markdown
Member

I reviewed this PR and determined that KATs and interop tests have passed. Looks Great To Me!!

@anhu anhu removed their assignment Aug 13, 2026
Add implementation of Argon2d/Argon2i/Argon2id.
Supports threading.
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.

5 participants