fix: enabled fuzzing

This commit is contained in:
Ezhil Shanmugham
2023-11-26 17:59:31 +05:30
committed by Karolin Varner
parent ba224a2200
commit 284ebb261f
10 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
#![no_main]
extern crate arbitrary;
extern crate rosenpass;
use libfuzzer_sys::fuzz_target;
use rosenpass::pqkem::{EphemeralKEM, KEM};
#[derive(arbitrary::Arbitrary, Debug)]
pub struct Input {
pub pk: [u8; 800],
}
fuzz_target!(|input: Input| {
let mut ciphertext = [0u8; 768];
let mut shared_secret = [0u8; 32];
EphemeralKEM::encaps(&mut shared_secret, &mut ciphertext, &input.pk).unwrap();
});