15 releases
new 0.4.0 | Feb 22, 2025 |
---|---|
0.3.1 | Aug 27, 2024 |
0.3.0 | Jun 17, 2023 |
0.2.5 | Mar 12, 2023 |
0.1.0 | May 22, 2015 |
#25 in Cryptography
4,674,269 downloads per month
Used in 6,009 crates
(68 directly)
45KB
777 lines
Compares two equal-sized byte strings in constant time.
Inspired by the Linux kernel's crypto_memneq.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT No Attribution License (LICENSE-MIT0)
- CC0 1.0 Universal (LICENSE-CC0)
at your option.
lib.rs
:
Compares two equal-sized byte strings in constant time.
The time of the comparison does not depend on:
- The contents of the inputs;
- The position of the difference(s) between the inputs.
The time of the comparison can depend on:
- The memory addresses of the inputs;
- The length of the inputs.