mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-01-15 06:23:26 -08:00
* deps,fuzz: update to liboqs 0.9.1 The release updates the Classic McEliece to NIST PQC Round 4 version Updates breaking fuzz tests as well Signed-off-by: Paul Spooren <mail@aparcar.org> Prabhpreet Dua <615318+prabhpreet@users.noreply.github.com> * Update secret key length for McEliece KEM update * Update to specifying key lengths of Kyber and McEliece through constants --------- Co-authored-by: Paul Spooren <mail@aparcar.org>
21 lines
574 B
Rust
21 lines
574 B
Rust
#![no_main]
|
|
extern crate rosenpass;
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
|
|
use rosenpass::protocol::CryptoServer;
|
|
use rosenpass_cipher_traits::Kem;
|
|
use rosenpass_ciphers::kem::StaticKem;
|
|
use rosenpass_secret_memory::Secret;
|
|
|
|
fuzz_target!(|rx_buf: &[u8]| {
|
|
let sk = Secret::from_slice(&[0; StaticKem::SK_LEN]);
|
|
let pk = Secret::from_slice(&[0; StaticKem::PK_LEN]);
|
|
|
|
let mut cs = CryptoServer::new(sk, pk);
|
|
let mut tx_buf = [0; 10240];
|
|
|
|
// We expect errors while fuzzing therefore we do not check the result.
|
|
let _ = cs.handle_msg(rx_buf, &mut tx_buf);
|
|
});
|