summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/wycheproof (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Disable regression tests for small builtin curvestb2024-11-241-2/+16
|
* Exercise EVP_chacha20_poly1305() with in-place decryptiontb2024-05-221-2/+143
| | | | | This needs quite a bit of cleanup but let's have some tests rather than none.
* Fix an error message left out in the mustDecodeHexString() conversiontb2023-11-071-2/+2
|
* Pull up the handling of the two webcrypto special snowflakestb2023-11-071-13/+9
|
* Drop a useless line and bump copyright yearstb2023-11-071-4/+3
|
* Unwrap a few linestb2023-11-071-72/+32
|
* Wrap hex.DecodeString() into mustDecodeHexString()tb2023-11-071-390/+78
| | | | | | | | | | | | | The hex decoding is only done from the JSON files provided by the wycheproof-testvectors package. Failure is always fatal. So there is no need for repeated error checks, and we can use an ergonomic wrapper. Also rework the calculation of the message digest from input data this had a similar deficit. All in all this shaves off about 10% of the code and removes a lot of tedious repetition.
* Use maps to retrieve various AES variantstb2023-11-071-60/+72
|
* Convert hashEvpMdFromString() to a maptb2023-11-071-26/+19
|
* Add stringer interfaces to the test groupstb2023-11-071-102/+126
| | | | This simplifies and unifies a lot of error messages.
* Pull everything except the actual run call out of the closuretb2023-11-061-11/+9
| | | | | | | | The determination of the test group type and the JSON unmarshalling can be done before the closure without performance impact. This is more readable and eliminates the need of a temporary variable again. Suggested by jsing
* Introduce testGroupFromAlgorithm()tb2023-11-061-50/+54
| | | | | This factors another ugly switch into a helper function. This should probably become a map eventually, but for now keep things straightforward.
* Add a wycheproofTestGroupRunner interfacetb2023-11-061-72/+26
| | | | | This allows us to use a simpler way of running the individual test groups and gets rid of an ugly mostly copy-pasted switch inside a closure.
* Add aliases for AES AEAD constructions and ChaChatb2023-11-061-9/+12
| | | | | These used the wycheproofTestGroupAead type but an upcoming change requires to change this. Introduce the aliases now to make the next diff cleaner.
* Fix a for loop bug introduced in the concurrency refactortb2023-11-061-3/+4
| | | | | | | | | | | | | Due to Go's idiosyncratic semantics of for loops, tests would only run some of the test groups in the JSON file because by the time the closure is called, the array index could be changed. For example, on fast 8 core machines, the CMAC tests would run the last test group with key size 320 eight times rather than each of the eight test groups once. Make a copy of the pointer before passing it to the closure to avoid this issue. Simpler version of my initial fix from jsing
* Uncomment json webcrypto line. Packages will have caught up...tb2023-11-061-3/+2
|
* Fix whitespacetb2023-07-081-2/+2
|
* partial fix for make -j8 (bluhm@ is sitting right next to me and agreeing)espie2023-07-081-5/+4
| | | | | there is a subtler issue with make regress/make all that will be way more of a headache to sort !
* Update Wycheproof.go to exercise truncated SHA-2 and SHA-3tb2023-04-251-5/+27
|
* Skip sect* curve checkstb2023-04-171-2/+2
| | | | | GF2m curves will go away soon. This reduces the pile of diffs in my jungle a tiny little bit.
* wycheproof: fix copy-paste error in previoustb2023-04-061-2/+2
|
* wycheproof: use EVP_MD instead of importing "hash"tb2023-04-061-70/+52
|
* Enable FRP256v2 teststb2023-03-251-6/+2
| | | | | This was previously disabled because tb apparently can't grep. Exercise this curve as well as part of the new test cases in ECDH wycheproof.
* Remove dead/unreachable codetb2023-03-251-7/+1
| | | | | A copy-paste error would have resulted in a modified msg in case ctLen == 0 or msgLen == 0. So obviously this is unreachable code.
* Add OPENSSL_cleanup() calls to some regress.jsing2023-03-111-1/+3
| | | | This gets us some minimal test coverage.
* Process up to four test vector files concurrently.jsing2023-03-081-4/+30
| | | | | | | | | This avoids having a slow down when processing test vector files that only have a single group. Note that the processing of test vector files is in turn going to be rate limited by the number of concurrent test groups, which means we do not need variable limits for vectors. Reduces a Wycheproof regress run down to ~8 seconds on an Apple M1.
* Run test groups concurrently.jsing2023-03-081-144/+151
| | | | | | | Add a basic test coordinator, that allows for Wycheproof test groups to be run concurrently. This can be further improved (especially for vectors that have limited test groups), however it already reduces the regress duration by about half on an Apple M1.
* zap more audit remnantstb2023-03-081-6/+1
|
* Remove acceptable audit.jsing2023-03-081-94/+1
| | | | | | | This code would need changes to be safe to use concurrently - remove it since it is somewhat incomplete and needs reworking. Requested by tb@
* Comment out glob for JSON webcrypto tests for nowtb2023-03-011-2/+3
| | | | | Allows test to pass with the old version of the wycheproof-testvectors package.
* Explicitly skip the json_web* tests now.tb2023-02-281-1/+2
|
* Add a few missing NIDs for new Wycheproof tests.tb2023-02-281-1/+12
|
* Skip FRP256v1 curve in ECDH tests. We do not support it.tb2023-02-281-1/+6
|
* Refrain from printing SUCCESS in some of my teststb2022-12-011-3/+1
| | | | Silence is good. On failure, the regress framework will make it clear.
* zap a stray semicolontb2022-11-181-2/+2
|
* Add initial Wycheproof EdDSA test coveragetb2022-11-171-1/+111
|
* Remove an outdated TODOtb2022-11-161-4/+1
|
* Enable Wycheproof primality tests.tb2022-07-132-4/+4
|
* whitespacetb2022-07-081-3/+3
|
* Add to variables instead of overriding themtb2022-07-081-4/+4
|
* Add support for primality checkingtb2022-07-074-10/+218
| | | | | | | | | | | | | Project Wycheproof's primality_tests.json contain a set of 280 numbers that trigger edge cases in Miller-Rabin and related checks. libcrypto's Miller-Rabin test is known to be rather poor, hopefully we will soon see a diff on tech that improves on this. This extends the Go test in the usual way and also adds a perl script that allows testing on non-Go architectures. Deliberately not yet linked to regress since the tests are flaky with the current BN_is_prime_ex() implementatation.
* Switch wycheproof.go to using the EVP HKDF API.tb2022-05-051-6/+67
| | | | | | | Gotta love EVP... Instead of a single, obvious call to HKDF(), you now need to call eight EVP functions with plenty of allocations and pointless copying internally. If you want to suffer even more, you could consider using the gorgeous string interface instead.
* Convert wycheproof.go for opaque EVP_AEAD_CTXtb2022-01-141-11/+18
|
* wycheproof: modify RSA tests to work with opaque RSA structtb2021-11-211-11/+57
|
* wycheproof.go: modify some DSA and ECDSA code to work with opaque structstb2021-11-211-5/+23
|
* Simplify runAesCmacTest() by using EVP_DigestSign().tb2021-09-241-16/+3
|
* Run the CMAC tests through EVP_PKEY_new_CMAC_key().tb2021-04-031-10/+22
|
* go fmt whitespace nittb2020-05-141-3/+3
|
* reinstate an error check that was commented out while waiting for armtb2020-05-141-5/+4
| | | | packages to appear
* Fix two bugs in the AES-CBC-PKCS5 tests that didn't hide failing tests:tb2020-04-271-3/+3
| | | | | 1. Use the correct slice for comparing the cipher output 2. Fix logic error similar to the one in AES-GCM in the previous commit