Dilithium: fix check hint#7803
Merged
douzzer merged 1 commit intowolfSSL:masterfrom Aug 6, 2024
Merged
Conversation
Contributor
|
retest this please |
dgarske
approved these changes
Aug 5, 2024
douzzer
requested changes
Aug 5, 2024
Contributor
douzzer
left a comment
There was a problem hiding this comment.
not passing unit test (see the build config below):
284: test_wc_dilithium_der :
ERROR - tests/api.c line 33410 failed with:
expected: wc_Dilithium_PrivateKeyToDer(key , ((void *)0), 0 ) == BAD_FUNC_ARG
result: 2590 != -173
The test, both before and after the PR, is also rendering a slew of hex digits to stdout:
0xc5, 0x57, 0x8b, 0x6b, 0x17, 0x21, 0xcb, 0x73,
0xcf, 0xc7, 0x0b, 0xe6, 0x81, 0x5c, 0x63, 0xf0,
[...]
failed ( 0.00398)
ERROR - tests/api.c line 85884 failed with:
expected: Test failed
config (from multi-test quantum-safe-wolfssl-all-gcc-latest):
'--enable-all' '--enable-testcert' '--enable-srtp' '--enable-intelasm' '--enable-sp-asm' '--enable-experimental' '--enable-kyber' '--enable-lms' '--enable-xmss' '--enable-dilithium' '--disable-qt' 'CPPFLAGS=-DNO_WOLFSSL_CIPHER_SUITE_TEST -DWOLFSSL_OLD_PRIME_CHECK -pedantic'
When all indeces are 0, then don't check hints against indeces.
61e958d to
fc19c36
Compare
douzzer
approved these changes
Aug 6, 2024
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.
Description
When all indeces are 0, then don't check hints against indeces.
Testing
./configure '--disable-shared' '--enable-experimental' '--enable-dilithium'
valgrind ./tests/unit.test -test_wc_dilithium_verify
(new test case in test_wc_dilithium_verify() will have buffer overrun without fix)
Checklist