Algo examples - #610
Open
aidankeefe2022 wants to merge 16 commits into
Open
Conversation
Key generation, signing and verification for all SHAKE and SHA2 parameter sets, with corrupted-signature rejection.
wolfCrypt-level ShangMi examples: SM3 hash (GB/T 32905 known answer), SM4-GCM with tamper detection, SM2 sign/verify including the ZA digest step, and SM2 ECDH. Requires the wolfSSL/wolfsm overlay.
Incremental hashing checked against the RFC 7693 known-answer vectors, plus BLAKE2b's native keyed mode used as a MAC.
SipHash-2-4 one-shot 64/128-bit MACs and the incremental API, checked against the reference implementation's test vector.
HKDF (RFC 5869), PBKDF2 (RFC 2898) and scrypt (RFC 7914), each verified against its RFC known-answer test vector.
One KEM encapsulation protecting an ordered message sequence via wc_HpkeInitSealContext()/wc_HpkeContextSealBase() and the open equivalents, with out-of-order rejection.
Full exchange (enrollment through mutual proof verification) using SHA-256 and the RFC 5054 2048-bit group.
Identity-based key exchange per RFC 6507-6509: KMS provisions user key material, ECCSI signs the SAKKE-encapsulated SSV, receiver verifies and derives the shared secret.
Add check entries for slh_dsa, blake2, siphash, kdf and mikey-sakke; extend the crypto, pq and pk profiles with their configure flags. crypto/sm is a documented skip: it needs the wolfsm overlay patched into the wolfSSL tree before configure.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #610
Scan targets checked: wolfssl-examples-bugs, wolfssl-examples-src
Findings: 3
3 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Examples
Revisions on the AI generated examples
Changed the peer to peer/ client server examples to represent the different actors as structs ie. Alice struct and Bob struct to show how data moves and what information is used for each task.
Also added comments to spell out each step using boxing style for the more complex examples
Example: