14 Commits

Author SHA1 Message Date
Yawning Angel
7640fb0483 core/crypto/shake: API cleanup
- shake.Shake_Context -> shake.Context
2023-11-17 19:31:51 +09:00
Yawning Angel
70ba4b5321 core/crypto: Add more assertions to the low level API
Assertions here are "fine" and it matches what the code that has the
checks in init/update/final already does.
2023-11-17 19:31:51 +09:00
Yawning Angel
582bd760b7 core/crypto/shake: Add a TODO comment (NFC) 2023-11-17 19:31:51 +09:00
Yawning Angel
e86bb3a795 core/crypto: Change hash asserts to panics
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.
2023-11-17 19:31:51 +09:00
Yawning Angel
d50380709d core/crypto/sha3: odinfmt (NFC) 2023-11-17 16:53:29 +09:00
gingerBill
9ee4b76cd9 Just make the io.Reader etc aliases 2023-06-08 16:38:57 +01:00
gingerBill
3f6775e29b Update to new io interface 2023-06-08 16:35:24 +01:00
gingerBill
1bf8328606 Strip unneeded semicolons 2022-01-25 16:40:25 +00:00
zhibog
42033ea808 Extended crypto API by variants that write the result into a destination buffer, instead of returning it 2021-12-31 13:16:11 +01:00
zhibog
c24454ae70 Removed context switching system from the crypto library to simplify the code 2021-11-09 16:50:13 +01:00
zhibog
dd7449b8b5 Fixed some typos in proc names 2021-10-16 19:20:43 +02:00
zhibog
b7a0627d09 Remove the read_entire_file from the crypto utils and now use the one within core:os 2021-10-16 18:46:18 +02:00
zhibog
f48ee00c2f Improved API. hash_file procs now just take a file handle instead of a path 2021-10-15 20:29:25 +02:00
zhibog
77be7144c3 Add crypto library. Additional information is included in the README.md 2021-10-14 22:20:55 +02:00