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

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

#118 in Cryptography

Download history 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 92174/week @ 2025-01-01 177581/week @ 2025-01-08 177887/week @ 2025-01-15 213351/week @ 2025-01-22 245956/week @ 2025-01-29 244741/week @ 2025-02-05 234822/week @ 2025-02-12 173871/week @ 2025-02-19 150322/week @ 2025-02-26 493181/week @ 2025-03-05

1,109,928 downloads per month
Used in 77 crates (19 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

~145KB