summaryrefslogtreecommitdiffstats
path: root/third_party/rust/prio/src/vdaf/prio2/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/prio/src/vdaf/prio2/client.rs')
-rw-r--r--third_party/rust/prio/src/vdaf/prio2/client.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/third_party/rust/prio/src/vdaf/prio2/client.rs b/third_party/rust/prio/src/vdaf/prio2/client.rs
index dbce39ee3f..9515601d8a 100644
--- a/third_party/rust/prio/src/vdaf/prio2/client.rs
+++ b/third_party/rust/prio/src/vdaf/prio2/client.rs
@@ -4,10 +4,14 @@
//! Primitives for the Prio2 client.
use crate::{
- field::{FftFriendlyFieldElement, FieldError},
+ codec::CodecError,
+ field::FftFriendlyFieldElement,
polynomial::{poly_fft, PolyAuxMemory},
prng::{Prng, PrngError},
- vdaf::{xof::SeedStreamAes128, VdafError},
+ vdaf::{
+ xof::{Seed, SeedStreamAes128},
+ VdafError,
+ },
};
use std::convert::TryFrom;
@@ -32,9 +36,9 @@ pub enum SerializeError {
/// Emitted by `unpack_proof[_mut]` if the serialized share+proof has the wrong length
#[error("serialized input has wrong length")]
UnpackInputSizeMismatch,
- /// Finite field operation error.
- #[error("finite field operation error")]
- Field(#[from] FieldError),
+ /// Codec error.
+ #[error(transparent)]
+ Codec(#[from] CodecError),
}
#[derive(Debug)]
@@ -63,7 +67,7 @@ impl<F: FftFriendlyFieldElement> ClientMemory<F> {
}
Ok(Self {
- prng: Prng::new()?,
+ prng: Prng::from_prio2_seed(Seed::<32>::generate()?.as_ref()),
points_f: vec![F::zero(); n],
points_g: vec![F::zero(); n],
evals_f: vec![F::zero(); 2 * n],