add rand_core trait to functions that require fill_bytes()

This commit is contained in:
bunnie 2023-02-26 01:01:30 +08:00
parent 62c9f0d0ce
commit fa20b90973
5 changed files with 6 additions and 0 deletions

View file

@ -29,6 +29,7 @@ aes-gcm-siv = {version = "0.11.1", default-features = false, features = ["alloc"
llio = {path="../llio"}
subtle = {version = "2.4.1", default-features = false}
tts-frontend = {path="../tts"}
rand_core = "0.5.1"
# passwords
sha2 = {path = "../engine-sha512"}

View file

@ -2,6 +2,7 @@ use core::mem::size_of;
use aes_gcm_siv::Nonce;
use std::convert::TryInto;
use core::cell::RefCell;
use rand_core::RngCore;
/// Crate-shared resource for TRNGs.
pub(crate) struct TrngPool {

View file

@ -25,6 +25,7 @@ num-derive = {version = "0.3.3", default-features = false}
num-traits = {version = "0.2.14", default-features = false}
rkyv = {version = "0.4.3", default-features = false, features = ["const_generics"]}
zeroize = "1.3.0"
rand_core = "0.5.1"
aes-kw = {version = "0.2.1", features = ["alloc"]}
@ -63,6 +64,7 @@ engine-25519 = {path="../engine-25519"}
byteorder = "1.4.3" # used by keywrap
# hardware acceleration adaptations are inserted into a fork of the main branch.
hex = {version = "0.4.3", default-features = false, features = []}
[dependencies.curve25519-dalek]
version = "3.1.0" # note this is patched to our fork in ./Cargo.toml
default-features = false

View file

@ -7,6 +7,7 @@ use aes_gcm_siv::{
};
use subtle::ConstantTimeEq;
use crate::{BackupHeader, BackupOp};
use rand_core::RngCore;
const BACKUP_AAD: &'static str = "PDDB backup v0.1.0";

View file

@ -30,6 +30,7 @@ use core::cell::RefCell;
use aes::Aes256;
use aes::cipher::{KeyInit, BlockDecrypt, BlockEncrypt};
use cipher::generic_array::GenericArray;
use rand_core::RngCore;
use crate::{SignatureResult, GatewareRegion, MetadataInFlash, UpdateType};