pub struct DhContext {
pub private_key: [u8; 256],
pub public_value: Vec<u8>,
pub g: u32,
pub p: Vec<u8>,
}Expand description
Active DH state for one side of a key exchange. Holds the private exponent and the computed public value (g^private mod p).
Fields§
§private_key: [u8; 256]Private exponent, 256 bytes.
public_value: Vec<u8>g^private mod p, exactly 256 bytes (left-padded with zeros if needed).
g: u32Generator.
p: Vec<u8>Safe prime, big-endian.
Implementations§
Auto Trait Implementations§
impl Forget for DhContext
impl Freeze for DhContext
impl RefUnwindSafe for DhContext
impl Send for DhContext
impl Sync for DhContext
impl Unpin for DhContext
impl UnsafeUnpin for DhContext
impl UnwindSafe for DhContext
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