summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/wycheproof (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename RANK{768,1024} to MLKEM{768,1024}_RANKtb10 days1-3/+3
| | | | | | | | | RANK768 and RANK1024 are awfully short and generic names for public constants. Before we make it worse with similarly named constants for ML-DSA, let's fix this. This follows the naming convention used by the other macros in the mlkem code. ok kenjiro jsing
* preprended -> prependedtb2025-12-271-2/+2
|
* wycheproof: add minimal glue for the decaps validation teststb2025-12-201-1/+8
|
* wycheproof: provide PBKDF2 test harnesstb2025-09-161-2/+58
| | | | | Skip the tests for now since they increase the test's runtime by ~50%. A later commit will gate these tests behind REGRESS_SKIP_SLOW.
* wycheproof: run HMACSM3 tests against libcryptotb2025-09-151-4/+7
|
* wycheproof: run ML-KEM test vectors against libcryptotb2025-09-141-2/+139
|
* wycheproof: zap stray empty linetb2025-09-091-2/+1
|
* wycheproof: rework test selectiontb2025-09-081-69/+82
| | | | | | | | | | Since this has grown organically, the test selection has become a weird mix of globs, regexes and test variants and it is hard to reason about what is run and why. Instead, load all the json files from testvectors_v1/ and look at algorithm (almost always available) and test schema to figure out if we support it in libcrypto and the test harness. This separates the logic of the test runner better from the test selection. Also make it a fatal error if we don't explicitly skip an unknown algorithm.
* wycheproof: skip tests using curve448/edwards448tb2025-09-081-7/+12
|
* wycheproof: skip tests using SHAKE-128 and SHAKE-256tb2025-09-081-1/+17
|
* wycheproof: rename skipSmallCurve() into skipCurve()tb2025-09-081-4/+6
| | | | | This prepares an upcoming change by not only skipping small curves but also binary curves that have test vectors.
* wycheproof: determine the test variant from the JSON schematb2025-09-081-30/+41
|
* wycheproof: retire the ECDSA webcrypto teststb2025-09-071-71/+2
| | | | | | | The webcrypto test files for P-256, P-384, and P-521 are identical to the P1363 test files for these curves with the hashes SHA-256, SHA-384, and SHA-512, respectively. The only real differences in the test paths is the Go glue code to translate to libcrypto, so they're pointless.
* wycheproof: go fmttb2025-09-061-4/+4
|
* wycheproof: use a cleaner way of dealing with P1363 signature lengthtb2025-09-061-4/+12
|
* wycheproof: check for the v1 directory since v0 will go awaytb2025-09-051-2/+2
|
* wycheproof: port the MI primes check to v1tb2025-09-052-3/+24
|
* wycheproof: remove support for v0 test vectorstb2025-09-051-68/+38
|
* wycheproof: drop JOSE teststb2025-09-051-2/+1
| | | | These are no longer supported in v1 and we skipped them anyway.
* wycheproof: move AES key wrap tests to v1tb2025-09-051-4/+4
|
* wycheproof: add support for EcCurve teststb2025-09-051-1/+103
| | | | | | This checks for a collection of prime order groups (secp, Brainpool, FRP) the curve parameters are corrct. The collection is a superset of our built-in curves, so we get one more validation for exxentially free.
* wycheproof: add custom JSON unmarshaler big integerstb2025-09-051-9/+58
| | | | | | | | | | | Since the wycheproof tests were written in Java, they inherited some of that language's weirdnesses. For example, the hex representation may have odd length, is 2-complement and needs zero-padding if the top bit of a nibble is set, similar to ASN.1 integers. This is needed for correctly decoding the Primality test cases, which worked nicely in v0 but no longer for v1. Convert the Primality test to use this.
* wycheproof: make RSA tests worktb2025-09-051-43/+79
| | | | | | There's more work needed here since some of the tests are designed to test the signing side of things, where we only verify. To be dealt with later.
* wycheproof: move ECDSA tests to v1tb2025-09-051-14/+15
| | | | | | | | | | | | | This excludes the bitcoin tests since our ECDSA_verify() doesn't have the logic to enforce s < order / 2 to avoid the well-known malleability issue with secp256k1 that (r, s) is valid if and only if (r, order - s) is valid. Moreover, add a workaround for overly picky P1363 tests where only correctly padded P1363 signatures are accepted. As the test authors say "To our knowledge no standard (i.e., IEEE P1363 or RFC 7515) requires any explicit checks of the signature size during signature verification." In fact, the problem really is in the test code, not in libcrypto and is a bit annoying to fix in a non-silly way.
* wycheproof: move ECDH tests to v1 (skip PEM for now)tb2025-09-051-6/+5
|
* wycheproof: move AES to v1 and explicitly skip gmac testtb2025-09-051-3/+3
|
* wycheproof: go fmttb2025-09-041-6/+6
|
* wycheproof: move HKDF to v1tb2025-09-041-2/+2
|
* wycheproof: move EdDSA to v1tb2025-09-041-7/+7
| | | | | eddsa_test.json is now ed25519_test.json and again key* was renamed to PublicKey*.
* wycheproof: move DSA to v1tb2025-09-041-6/+6
| | | | key* are now called PublicKey*, so change teh json tags accordingly.
* wycheproof: move x25519 to v1tb2025-09-041-5/+5
|
* wycheproof: migrate {,X}ChaCha20-Poly1305 to v1tb2025-09-041-3/+3
|
* wycheproof: migrate HMAC to v1tb2025-09-041-3/+3
| | | | | This is straightforward since the schema did not change. This adds coverage for HMAC-SHA512/224 and HMAC-SHA512/256.
* wycheproof: add struct to support the testvector_v1 schematb2025-09-041-7/+26
|
* wycheproof: add version sum type and annotate all tests as v0tb2025-09-041-30/+41
| | | | | The version is passed to the test runner, so it can unmarshal the v0 and v1 JSON as appropriate later on.
* wycheproof: use local variables for testGroups and algorithmtb2025-09-041-7/+11
|
* wycheproof: start migrating to testvectors_v1tb2025-09-041-4/+5
| | | | | | | | | | | | In https://github.com/C2SP/wycheproof/pull/169, upstream removed the testvector/ path, thereby creating the need to migrate if we want to benefit from future changes and tests. While this has been around for a very long time and generally provided more and better coverage, there never was sufficient motivation to do so. As a first step, change use of the testVectorPath constant to use of a path variable so we can switch the tests one by one by appending _v1 when appropriate.
* libcrypto regress: move GOCACHE to obj/tb2025-07-091-2/+8
| | | | | | | | | | | | | While it may be acceptable for Go to fill regular users' homedirs with a compiler cache that is unable to deal with corruption and full disks, this is terrible for people running regress as root since the cache can quickly grow to hundreds of megs and can thus result in all sorts hilarity below /root. Move the GOCACHE under ${.OBJDIR} and use a cleanup target to get rid of it again. This makes these tests a bit slower for regular users as well, but so be it. Let's see how this goes before I switch libtls to the same model. discussed with claudio and jsing
* 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.