aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/sha2
Commit message (Collapse)AuthorAgeFilesLines
* core/crypto/sha2: API cleanupYawning Angel2023-11-171-35/+45
| | | | | - sha2.Sha256_Context -> sha2.Context_256 - sha2.Sha512_Context -> sha2.Context_512
* 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/sha2: Add SHA-512/256Yawning Angel2023-11-171-5/+102
|
* core/crypto: Add more assertions to the low level APIYawning Angel2023-11-171-0/+12
| | | | | 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: Change hash asserts to panicsYawning Angel2023-11-171-16/+4
| | | | | | | | | | 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/sha2: CleanupsYawning Angel2023-11-171-33/+35
| | | | | | - Use `encoding/endian` - Use `math/bits` - Add `@(private)` annotations to internals
* core/crypto/sha2: odinfmt (NFC)Yawning Angel2023-11-171-358/+373
|
* Just make the `io.Reader` etc aliasesgingerBill2023-06-081-4/+4
|
* Update to new io interfacegingerBill2023-06-081-4/+4
|
* Fix issue 1761. Added the test vector to the core and vendor testszhibog2022-05-041-2/+4
|
* Strip unneeded semicolonsgingerBill2022-01-251-4/+4
|
* Extended crypto API by variants that write the result into a destination ↵zhibog2021-12-311-28/+117
| | | | buffer, instead of returning it
* Removed context switching system from the crypto library to simplify the codezhibog2021-11-091-407/+215
|
* Remove the read_entire_file from the crypto utils and now use the one within ↵zhibog2021-10-161-4/+4
| | | | core:os
* Improved API. hash_file procs now just take a file handle instead of a pathzhibog2021-10-151-52/+40
|
* Add crypto library. Additional information is included in the README.mdzhibog2021-10-141-0/+797