pub struct GoldKey256 { /* private fields */ }Expand description
Secret key k for the Gold PRF (pilot: U256 field).
Invariant: k is a reduced field element in [1, p) for the modulus p in
GoldPrfParams256. Keys are only constructible via GoldKey256::from_uint or
GoldKey256::derive_from_seed; use GoldKey256::as_uint for read-only access.
Evaluation assumes this invariant and does not re-validate on each call.
Implementations§
Source§impl GoldKey256
impl GoldKey256
pub fn from_uint(k: U256, params: &GoldPrfParams256) -> Result<Self, PrfError>
pub fn derive_from_seed( seed: &[u8], params: &GoldPrfParams256, ) -> Result<Self, PrfError>
Trait Implementations§
Source§impl Clone for GoldKey256
impl Clone for GoldKey256
Source§fn clone(&self) -> GoldKey256
fn clone(&self) -> GoldKey256
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Drop for GoldKey256
impl Drop for GoldKey256
Auto Trait Implementations§
impl Freeze for GoldKey256
impl RefUnwindSafe for GoldKey256
impl Send for GoldKey256
impl Sync for GoldKey256
impl Unpin for GoldKey256
impl UnsafeUnpin for GoldKey256
impl UnwindSafe for GoldKey256
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more