aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/sha2/sha2.odin
Commit message (Collapse)AuthorAgeFilesLines
* Remove `core:mem` import from `core:crypto`.Jeroen van Rijn3 days1-2/+2
|
* Change Odin's LICENSE to zlib from BSD 3-clausegingerBill2025-10-281-1/+1
| | | | This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
* Further overhaul of package line comments.Jeroen van Rijn2025-10-091-1/+1
|
* core/crypto: Switch to using `ensure`Yawning Angel2025-03-231-7/+4
|
* core/crypto/sha2: Clean up the portable code slightlyYawning Angel2025-03-231-14/+21
|
* core/crypto/sha2: Use hardware SHA224/256 when available (AMD64)Yawning Angel2025-03-231-2/+7
|
* core/crypto: Add `rodata` annotations (NFC)Yawning Angel2025-03-231-2/+2
|
* core: improve package doc comments for the documentation generatorLaytan Laats2024-09-031-2/+2
|
* core/crypto: Expose the block sizes for every hash algorithmYawning Angel2024-02-071-20/+20
| | | | | While I just went and made this private, this information is required for keying HMAC.
* core/crypto: Documentation cleanupsYawning Angel2024-02-071-23/+51
|
* core:crypto/hash: Add a generic higher level hash interfaceYawning Angel2024-02-071-398/+33
| | | | | | 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/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