aboutsummaryrefslogtreecommitdiff
path: root/core/crypto
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* core/crypto/sha2: Fix `hash_stream_224` and `hash_stream_256`Yawning Angel2023-11-171-27/+22
|
* core/crypto/siphash: Fix the low-level APIYawning Angel2023-11-171-27/+51
| | | | | | The `update` and `final` routines were written with the assumption that update will only be called once, and that the underlying data does not change between the calls.
* core/crypto/sm3: CleanupsYawning Angel2023-11-171-36/+42
| | | | | | - Use `encoding/endian` - Use `math/bits` - Add `@(private)` annotations to internals
* core/crypto/siphash: CleanupsYawning Angel2023-11-171-16/+15
| | | | | | | - Use `encoding/endian` - Use `math/bits` - Add `@(private)` annotations to internals - Minor optimization
* core/crypto/_sha3: CleanupsYawning Angel2023-11-171-25/+7
| | | | - Use `math/bits`
* core/crypto/sha2: CleanupsYawning Angel2023-11-171-33/+35
| | | | | | - Use `encoding/endian` - Use `math/bits` - Add `@(private)` annotations to internals
* core/crypto/sha1: CleanupsYawning Angel2023-11-171-30/+21
| | | | | | - Use `encoding/endian` - Use `math/bits` - Add `@(private)` annotations to internals
* core/crypto/md5: CleanupsYawning Angel2023-11-171-29/+23
| | | | | | - Use `encoding/endian` - Use `math/bits` - Add `@(private)` annotations to internals
* core/crypto/poly1305: CleanupsYawning Angel2023-11-172-37/+24
| | | | - Use `encoding/endian`
* core/crypto/chacha20poly1305: CleanupsYawning Angel2023-11-171-5/+5
| | | | - Use `encoding/endian`
* core/crypto/chacha20: CleanupsYawning Angel2023-11-171-180/+135
| | | | | - Use `encoding/endian` - Use `math/bits`
* core/crypto/_blake2: CleanupsYawning Angel2023-11-171-38/+71
| | | | | | - Use `encoding/endian` - Add `@(private)` annotations to internals - Add some descriptive comments in the unrolled compression functions
* core/crypto/sm3: odinfmt (NFC)Yawning Angel2023-11-171-168/+176
|
* core/crypto/siphash: odinfmt (NFC)Yawning Angel2023-11-171-175/+188
|
* core/crypto/sha3: odinfmt (NFC)Yawning Angel2023-11-174-604/+639
|
* core/crypto/sha2: odinfmt (NFC)Yawning Angel2023-11-171-358/+373
|
* core/crypto/sha1: odinfmt (NFC)Yawning Angel2023-11-171-77/+77
|
* core/crypto/md5: odinfmt (NFC)Yawning Angel2023-11-171-188/+189
|
* core/crypto/blake2: odinfmt (NFC)Yawning Angel2023-11-173-139/+152
|
* Merge branch 'master' into new-sys-unixgingerBill2023-10-312-2/+22
|\
| * Replace Math.random with crypto.getRandomValues for _system_numberDamian Tarnawski2023-10-271-1/+1
| |
| * Add system_random and random_bytes for js targetDamian Tarnawski2023-10-272-2/+22
| |