#sha-512 #hmac #hash #sha-2 #size-optimization #crypto

no-std hmac-sha512

A small, self-contained SHA512, HMAC-SHA512, SHA384 and HMAC-SHA384 implementation

16 releases (8 stable)

1.1.6 Dec 9, 2024
1.1.5 Jun 14, 2023
1.1.4 Nov 29, 2022
1.1.2 Jul 1, 2022
0.1.6 Jun 23, 2020

#187 in Cryptography

Download history 57485/week @ 2024-09-18 57089/week @ 2024-09-25 59891/week @ 2024-10-02 54362/week @ 2024-10-09 83345/week @ 2024-10-16 93423/week @ 2024-10-23 95002/week @ 2024-10-30 92798/week @ 2024-11-06 102468/week @ 2024-11-13 112582/week @ 2024-11-20 81753/week @ 2024-11-27 117500/week @ 2024-12-04 136516/week @ 2024-12-11 101712/week @ 2024-12-18 34884/week @ 2024-12-25 64714/week @ 2025-01-01

363,379 downloads per month
Used in 59 crates (17 directly)

ISC license

27KB
710 lines

rust-hmac-sha512

A small, self-contained SHA512 and HMAC-SHA512 implementation in Rust.

Also includes SHA384 and HMAC-SHA384, that are just truncated versions of SHA512 with a different IV.

Optional features:

  • traits: enable support for the Digest trait from the digest crate.
  • sha384: includes support for SHA384 and HMAC-SHA384.
  • opt_size: enable size optimizations. Based on benchmarks, the .text section size is reduced by 75%, at the cost of approximately 16% performance.

lib.rs:

A small, self-contained SHA512 and HMAC-SHA512 implementation (C) Frank Denis <fdenis [at] fastly [dot] com>, public domain

Dependencies

~105KB