aboutsummaryrefslogtreecommitdiff
path: root/tests/core/crypto
Commit message (Collapse)AuthorAgeFilesLines
* tests/core/crypto: Use the `tests/common` boilerplateYawning Angel2024-03-046-105/+85
|
* core/crypto/kmac: Initial importYawning Angel2024-03-041-0/+98
|
* core/crypto/tuplehash: Initial importYawning Angel2024-03-042-131/+342
|
* core/crypto/shake: Support cSHAKEYawning Angel2024-03-041-6/+60
|
* core/crypto/hkdf: Initial importYawning Angel2024-03-041-0/+67
|
* core/crypto/pbkdf2: Initial importYawning Angel2024-03-042-0/+120
|
* core/crypto: Stop using context.temp_allocatorYawning Angel2024-02-071-0/+25
| | | | | | | | | | | The max digest size for the foreseeable future will be 512 bits, and the max block size is currently 1152 bits (SHA3-224). If people add more exotic hash algorithms without bumping the constants when required, tests will fail. The stream buffer will currently be 576 bytes, which is "fine" to just stick on the stack, and is a sensible multiple of the more common block size of 64 bytes.
* core/crypto/hmac: Initial importYawning Angel2024-02-072-130/+243
|
* core/crypto/hash: Make the low level interface allocator-lessYawning Angel2024-02-071-4/+10
| | | | Just (ab)using reflect to victory is probably fine.
* tests/core/crypto: ReorganizeYawning Angel2024-02-073-665/+671
| | | | | | | All of our crypto is modern now unless exiled to the legacy sub-package, so move the test cases for the currently un-unified algorithms into the main test driver file, and rename the benchmark driver to reflect reality.
* core/crypto/shake: SHAKE is an XOF, not a hashYawning Angel2024-02-072-31/+79
|
* tests/core/crypto: Cleanup/modernize a bitYawning Angel2024-02-073-249/+366
|
* core:crypto/hash: Add a generic higher level hash interfaceYawning Angel2024-02-072-388/+615
| | | | | | There is a lot of code duplicated in convenience methods in each hash implementation, and having a generic hash type makes implementing higher-level constructs such as HMAC significantly easier down the road.
* core/crypto: Exile keccak, md5 and sha1 to legacyYawning Angel2023-11-171-3/+3
| | | | | | In an perfect world these would just be removed, but the world is imperfect, and people are forced to interact/interface with things that are broken.
* core/crypto/whirlpool: Remove, historical/exoticYawning Angel2023-11-171-28/+0
|
* core/crypto/tiger: Remove, historical/exoticYawning Angel2023-11-171-110/+0
|
* core/crypto/streebog: Remove, exoticYawning Angel2023-11-171-31/+0
|
* core/crypto/ripemd: Remove, historical/exoticYawning Angel2023-11-171-85/+0
|
* core/crypto/md4: Remove, badly brokenYawning Angel2023-11-171-21/+0
|
* core/crypto/md2: Remove, badly brokenYawning Angel2023-11-171-21/+0
|
* core/crypto/jh: Remove, use SHA-3Yawning Angel2023-11-171-61/+0
|
* core/crypto/haval: Remove, badly brokenYawning Angel2023-11-171-171/+0
|
* core/crypto/groestl: Remove, use SHA-3Yawning Angel2023-11-171-61/+0
|
* core/crypto/gost: Remove, exoticYawning Angel2023-11-171-22/+0
|
* core/crypto/blake: Remove, use BLAKE2b/BLAKE2sYawning Angel2023-11-171-61/+0
|
* core/crypto/sha2: Add SHA-512/256Yawning Angel2023-11-171-0/+16
|
* Add missing commagingerBill2023-05-291-1/+1
|
* core/crypto: Add private attributes for internalsYawning Angel2023-04-081-1/+7
| | | | | These constants and internal routines are not intended for use outside the actual implementations themselves.
* Fix issue 1761. Added the test vector to the core and vendor testszhibog2022-05-041-0/+4
|
* [varint] Add LEB128 decoding + testsJeroen van Rijn2022-03-081-891/+889
| | | | Also make tests in general less spammy: Don't print [PASS] for each successful test, only report failures and progress.
* [tests] Make test runners exit with errorlevel 1 if a test fails.Jeroen van Rijn2022-03-031-0/+4
|
* Added SipHash + tests and fixed remaining semicolons in vendor/botanzhibog2022-02-221-0/+43
|
* Update testsgingerBill2022-01-201-1/+1
|
* crypto: Add rand_bytesYawning Angel2021-11-172-0/+41
| | | | | | | This adds `rand_bytes(dst: []byte)` which fills the destination buffer with entropy from the cryptographic random number generator. This takes the "simple is best" approach and just directly returns the OS CSPRNG output instead of doing anything fancy (a la OpenBSD's arc4random).
* core/crypto: Add chacha20poly1305Yawning Angel2021-11-172-2/+130
| | | | | This package implements the chacha20poly1305 AEAD construct as specified in RFC 8439.
* core/crypto: Add chacha20Yawning Angel2021-11-172-4/+147
| | | | | | | | | | | | This package implements the ChaCha20 stream cipher as specified in RFC 8439, and the somewhat non-standard XChaCha20 variant that supports a 192-bit nonce. While an IETF draft for XChaCha20 standardization exists, implementations that pre-date the draft use a 64-bit counter, instead of the IETF-style 32-bit one. This implementation opts for the latter as compatibility with libsodium is more important than compatibility with an expired IETF draft.
* core/crypto: Add poly1305Yawning Angel2021-11-172-0/+132
| | | | | This package implements the Poly1305 MAC algorithm as specified in RFC 8439, using routines taked from fiat-crypto and poly1305-donna.
* core/crypto: Add x25519Yawning Angel2021-11-172-0/+100
| | | | | This package implements the X25519 key agreement scheme as specified in RFC 7748, using routines taken from fiat-crypto and Monocypher.
* Removed context switching system from the crypto library to simplify the codezhibog2021-11-091-183/+0
|
* Move botan.dll to correct directoryzhibog2021-10-141-0/+0
|
* Added botan.dll for testszhibog2021-10-141-0/+0
|
* Add crypto library. Additional information is included in the README.mdzhibog2021-10-141-0/+1279