#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

#200 in Cryptography

Download history 94730/week @ 2024-10-21 91879/week @ 2024-10-28 103515/week @ 2024-11-04 93045/week @ 2024-11-11 108029/week @ 2024-11-18 83832/week @ 2024-11-25 112077/week @ 2024-12-02 130459/week @ 2024-12-09 142135/week @ 2024-12-16 33049/week @ 2024-12-23 58886/week @ 2024-12-30 154922/week @ 2025-01-06 195763/week @ 2025-01-13 187952/week @ 2025-01-20 231873/week @ 2025-01-27 230166/week @ 2025-02-03

857,019 downloads per month
Used in 69 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

~110KB