-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/2.5' into main
- Loading branch information
Showing
12 changed files
with
206 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ name = "subtle" | |
# - update html_root_url | ||
# - update README if necessary by semver | ||
# - if any updates were made to the README, also update the module documentation in src/lib.rs | ||
version = "2.4.1" | ||
version = "2.5.0" | ||
edition = "2018" | ||
authors = ["Isis Lovecruft <[email protected]>", | ||
"Henry de Valence <[email protected]>"] | ||
readme = "README.md" | ||
|
@@ -25,9 +26,10 @@ exclude = [ | |
travis-ci = { repository = "dalek-cryptography/subtle", branch = "master"} | ||
|
||
[dev-dependencies] | ||
rand = { version = "0.7" } | ||
rand = { version = "0.8" } | ||
|
||
[features] | ||
const-generics = [] | ||
core_hint_black_box = [] | ||
default = ["std", "i128"] | ||
std = [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#![no_main] | ||
|
||
#[macro_use] | ||
extern crate libfuzzer_sys; | ||
extern crate subtle; | ||
extern crate core; | ||
|
||
use core::convert::TryFrom; | ||
|
||
use subtle::ConditionallySelectable; | ||
|
||
fuzz_target!(|data: &[u8]| { | ||
let chunk_size: usize = 16; | ||
|
||
if data.len() % chunk_size != 0 { | ||
return; | ||
} | ||
|
||
for bytes in data.chunks(chunk_size) { | ||
let mut x = [0u8; 16]; | ||
let y = <[u8; 16]>::try_from(bytes).unwrap(); | ||
|
||
x.conditional_assign(&y, 0.into()); | ||
assert_eq!(x, [0u8; 16]); | ||
|
||
x.conditional_assign(&y, 1.into()); | ||
assert_eq!(x, y); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.