#constant-time

no-std constant_time_eq

Compares two equal-sized byte strings in constant time

10 releases

Uses new Rust 2021

0.2.4 Jul 25, 2022
0.2.2 Apr 24, 2022
0.2.1 Mar 25, 2022
0.1.5 Jan 11, 2020
0.1.0 May 22, 2015

#28 in Cryptography

Download history 228654/week @ 2022-08-15 207885/week @ 2022-08-22 231637/week @ 2022-08-29 226820/week @ 2022-09-05 203368/week @ 2022-09-12 210230/week @ 2022-09-19 235101/week @ 2022-09-26 226550/week @ 2022-10-03 249436/week @ 2022-10-10 261559/week @ 2022-10-17 223743/week @ 2022-10-24 223663/week @ 2022-10-31 229331/week @ 2022-11-07 258041/week @ 2022-11-14 204820/week @ 2022-11-21 243659/week @ 2022-11-28

949,466 downloads per month
Used in 2,201 crates (31 directly)

CC0-1.0 OR MIT-0 OR Apache-2.0

10KB
74 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.

No runtime deps