#sha-2 #assembly #crypto

no-std sha2-asm

Assembly implementation of SHA-2 compression functions

16 releases

0.6.4 May 7, 2024
0.6.3 Aug 7, 2023
0.6.2 Jul 16, 2021
0.6.0 Feb 9, 2021
0.3.0 Jun 12, 2017

#2655 in Cryptography

Download history 85961/week @ 2024-08-13 84410/week @ 2024-08-20 75583/week @ 2024-08-27 85825/week @ 2024-09-03 72997/week @ 2024-09-10 77129/week @ 2024-09-17 74751/week @ 2024-09-24 80501/week @ 2024-10-01 61919/week @ 2024-10-08 64009/week @ 2024-10-15 48035/week @ 2024-10-22 43288/week @ 2024-10-29 41843/week @ 2024-11-05 42308/week @ 2024-11-12 49713/week @ 2024-11-19 46060/week @ 2024-11-26

188,601 downloads per month
Used in 107 crates (9 directly)

MIT license

63KB
1K SLoC

GNU Style Assembly 1K SLoC // 0.2% comments Rust 53 SLoC

RustCrypto: ASM hashes Rust Version Project Chat dependency status

Assembly implementations of hash functions core functionality based on code from Project Nayuki.

Crates in this repository provide only core compression functions, for full hash functionality please refer to the crates from RustCrypto/hashes repository. With enabled asm feature md5, sha-1, sha2 and whirlpool crates will use code from this repository.

NOTE: this repo is in maintenance mode only

Now that inline assembly is stable (as of Rust 1.59), assembly should be added directly to the relevant crates at https://github.com/RustCrypto/hashes.

For more information, see #45.

Supported Platforms

All crates are tested on the following platforms:

  • Linux (32-bit and 64-bit x86)
  • Windows (64-bit x86, GNU only)
  • ARM64 (except md5, which is x86 only)

Windows MSVC builds are known to be broken. See #17.

Minimum Supported Rust Version

All crates in this repository support Rust 1.43 or higher.

In the future when the minimum supported Rust version is changed, it will be accompanied by a minor version bump.

License

All crates licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Assembly implementation of the SHA-2 compression functions.

This crate is not intended for direct use, most users should prefer the sha2 crate with enabled asm feature instead.

Only x86, x86-64, and (partially) AArch64 architectures are currently supported.

No runtime deps

~0–300KB