aboutsummaryrefslogtreecommitdiff
path: root/core/crypto
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3229 from Yawning/feature/moar-cryptogingerBill2024-03-0614-86/+730
|\ | | | | core/crypto: More improvements/additions
| * core/crypto: Misc cleanups and documentation improvementsYawning Angel2024-03-045-39/+108
| |
| * core/crypto/kmac: Initial importYawning Angel2024-03-042-11/+128
| |
| * core/crypto/tuplehash: Initial importYawning Angel2024-03-042-0/+80
| |
| * core/crypto/shake: Support cSHAKEYawning Angel2024-03-043-13/+144
| |
| * core/crypto/_sha3: Cleanups, prepare for cSHAKEYawning Angel2024-03-044-38/+48
| |
| * core/crypto/hkdf: Initial importYawning Angel2024-03-041-0/+103
| |
| * core/crypto/pbkdf2: Initial importYawning Angel2024-03-041-0/+122
| |
| * core/crypto/hmac: Add a clone methodYawning Angel2024-03-041-0/+12
| |
* | fix build tagsLaytan Laats2024-02-131-1/+6
| |
* | implement part of core foundation framework bindings for err messageLaytan Laats2024-02-131-1/+2
| |
* | remove darwin from bsd filenameLaytan Laats2024-02-131-0/+0
| |
* | use `Security.framework` with `SecRandomCopyBytes` for rand_bytes on darwinLaytan Laats2024-02-132-1/+12
| |
* | add crypto.rand_bytes for Darwin and FreeBSDLaytan Laats2024-02-133-16/+15
|/
* core/crypto: Stop using context.temp_allocatorYawning Angel2024-02-073-15/+17
| | | | | | | | | | | 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/poly1305: Relax the tag length check on the verify helperYawning Angel2024-02-071-4/+0
|
* core/crypto/hmac: Initial importYawning Angel2024-02-071-0/+163
|
* core/crypto/hash: Make the low level interface allocator-lessYawning Angel2024-02-072-177/+140
| | | | Just (ab)using reflect to victory is probably fine.
* core/crypto: Expose the block sizes for every hash algorithmYawning Angel2024-02-0711-42/+100
| | | | | While I just went and made this private, this information is required for keying HMAC.
* core/crypto/shake: SHAKE is an XOF, not a hashYawning Angel2024-02-072-59/+27
|
* core/crypto: Documentation cleanupsYawning Angel2024-02-079-72/+239
|
* core:crypto/hash: Add a generic higher level hash interfaceYawning Angel2024-02-0715-1852/+899
| | | | | | 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: Update the documentation (NFC)Yawning Angel2023-11-171-35/+38
|
* core/crypto: Exile keccak, md5 and sha1 to legacyYawning Angel2023-11-175-4/+14
| | | | | | 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/sm3: API cleanupYawning Angel2023-11-171-8/+10
| | | | - sm3.Sm3_Context -> sm3.Context
* core/crypto/shake: API cleanupYawning Angel2023-11-171-34/+32
| | | | - shake.Shake_Context -> shake.Context
* core/crypto/sha3: API cleanupYawning Angel2023-11-171-52/+60
| | | | - sha3.Sha3_Context -> sha3.Context
* core/crypto/sha2: API cleanupYawning Angel2023-11-171-35/+45
| | | | | - sha2.Sha256_Context -> sha2.Context_256 - sha2.Sha512_Context -> sha2.Context_512
* core/crypto/sha1: API cleanupYawning Angel2023-11-171-8/+10
| | | | -sha1.Sha1_Context -> Context
* core/crypto/md5: API cleanupYawning Angel2023-11-171-8/+10
| | | | - md5.Md5_Context -> md5.Context
* core/crypto/keccak: API cleanupYawning Angel2023-11-171-53/+60
| | | | - keccak.Keccak_Context -> keccak.Context
* core/crypto/blake2: API cleanup and bug fixesYawning Angel2023-11-173-42/+52
| | | | | | | - blake2s.Blake2s_Context -> blake2s.Context - blake2b.Blake2b_Context -> blake2b.Context - Fix the BLAKE2s low level API (context type was incorrect) - Support the configurable output size
* core/crypto/sha2: Refactor update/finalYawning Angel2023-11-171-76/+78
| | | | | | | | | This is largely modeled off the SM3 versions of these routines, since the relevant parts of the code are the same between SHA-256 and SM3, and the alterations required to support SHA-512 are relatively simple. The prior versions of update and the transform would leak memory, and doing things this way also reduces the context buffer sizes by 1 block.
* core/crypto/util: Remove, no longer neededYawning Angel2023-11-171-146/+0
|
* core/crypto/whirlpool: Remove, historical/exoticYawning Angel2023-11-172-807/+0
|
* core/crypto/tiger: Remove, historical/exoticYawning Angel2023-11-174-972/+0
|
* core/crypto/streebog: Remove, exoticYawning Angel2023-11-172-518/+0
|
* core/crypto/ripemd: Remove, historical/exoticYawning Angel2023-11-172-920/+0
|
* core/crypto/md4: Remove, badly brokenYawning Angel2023-11-172-264/+0
|
* core/crypto/md2: Remove, badly brokenYawning Angel2023-11-172-183/+0
|
* core/crypto/jh: Remove, use SHA-3Yawning Angel2023-11-172-585/+0
|
* core/crypto/haval: Remove, badly brokenYawning Angel2023-11-172-1815/+0
|
* core/crypto/groestl: Remove, use SHA-3Yawning Angel2023-11-172-654/+0
|
* core/crypto/gost: Remove, exoticYawning Angel2023-11-172-383/+0
|
* core/crypto/blake: Remove, use BLAKE2b/BLAKE2sYawning Angel2023-11-172-727/+0
|
* core/crypto/sha2: Add SHA-512/256Yawning Angel2023-11-171-5/+102
|
* core/crypto: Add more assertions to the low level APIYawning Angel2023-11-1711-11/+86
| | | | | Assertions here are "fine" and it matches what the code that has the checks in init/update/final already does.
* core/crypto/sha2: Fix overflow for large amounts of hashed dataYawning Angel2023-11-171-5/+6
|
* core/crypto/shake: Add a TODO comment (NFC)Yawning Angel2023-11-171-0/+3
|
* core/crypto: Change hash asserts to panicsYawning Angel2023-11-1712-85/+44
| | | | | | | | | | Assertions can be disabled, but at the point where cryptographic anything is involved, a single branch has an infinitesimally small performance impact. The correct thing to do is to punch the caller in the face if they do something that is blatantly incorrect, especially in a security critical setting.