mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
A hash function cascade was a common way to avoid length-extension attacks with traditional hash functions such as the SHA-2 family. Add `std.crypto.hash.composition` to do exactly that using arbitrary hash functions, and pre-define the common SHA2-based ones. With this, we can now sign and verify Bitcoin signatures in pure Zig.
80 lines
2.7 KiB
80 lines
2.7 KiB