pub struct Ssid { /* private fields */ }Expand description
(sid, server_id, client_id, kind, tail), canonically encoded by Ssid::encode.
Implementations§
Source§impl Ssid
impl Ssid
Sourcepub fn keygen(
sid: [u8; 32],
server_id: &[u8],
client_id: &[u8],
kg_nonce: &[u8; 32],
) -> Result<Self>
pub fn keygen( sid: [u8; 32], server_id: &[u8], client_id: &[u8], kg_nonce: &[u8; 32], ) -> Result<Self>
Keygen: kg_nonce is the 32 random bytes the server puts into KgMsg1.
Sourcepub fn sign(
sid: [u8; 32],
server_id: &[u8],
client_id: &[u8],
key_id: &[u8; 32],
digest: &[u8; 32],
r2: &[u8; 33],
signing_key: &[u8; 33],
) -> Result<Self>
pub fn sign( sid: [u8; 32], server_id: &[u8], client_id: &[u8], key_id: &[u8; 32], digest: &[u8; 32], r2: &[u8; 33], signing_key: &[u8; 33], ) -> Result<Self>
Sign: key_id = SHA-256(X ‖ E), digest = m, the fresh R₂ as the session id and the key
the signature is made under (X, or the HD-derived X + δ·G).
pub fn kind(&self) -> SessionKind
pub fn server_id(&self) -> &[u8] ⓘ
pub fn client_id(&self) -> &[u8] ⓘ
Trait Implementations§
impl Eq for Ssid
impl StructuralPartialEq for Ssid
Auto Trait Implementations§
impl Freeze for Ssid
impl RefUnwindSafe for Ssid
impl Send for Ssid
impl Sync for Ssid
impl Unpin for Ssid
impl UnsafeUnpin for Ssid
impl UnwindSafe for Ssid
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