#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

#175 in Cryptography

Download history 91156/week @ 2024-10-26 103323/week @ 2024-11-02 91425/week @ 2024-11-09 107533/week @ 2024-11-16 87034/week @ 2024-11-23 107570/week @ 2024-11-30 126748/week @ 2024-12-07 147856/week @ 2024-12-14 31228/week @ 2024-12-21 57360/week @ 2024-12-28 142633/week @ 2025-01-04 193535/week @ 2025-01-11 184288/week @ 2025-01-18 231966/week @ 2025-01-25 243013/week @ 2025-02-01 272767/week @ 2025-02-08

968,974 downloads per month
Used in 76 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