AuCPaceClientCPaceSubstep

Struct AuCPaceClientCPaceSubstep 

Source
pub struct AuCPaceClientCPaceSubstep<D, const K1: usize>
where D: Digest<OutputSize = U64> + Default,
{ /* private fields */ }
Expand description

Client in the CPace substep

Implementations§

Source§

impl<D, const K1: usize> AuCPaceClientCPaceSubstep<D, K1>
where D: Digest<OutputSize = U64> + Default,

Source

pub fn generate_public_key<CI, CSPRNG>( self, channel_identifier: CI, rng: &mut CSPRNG, ) -> (AuCPaceClientRecvServerKey<D, K1>, ClientMessage<'static, K1>)
where CI: AsRef<[u8]>, CSPRNG: CryptoRngCore,

Generate a public key moving the protocol onto the second half of the CPace substep - Receive Server Pubkey

§Arguments:
  • channel_identifier - CI from the protocol definition, in the context of TCP/IP this is usually some combination of the server and client’s IP address and TCP port numbers. It’s purpose is to prevent relay attacks.
  • rng - the CSPRNG used when generating the public/private keypair
§Return:

(next_step, message)

  • next_step: the client waiting for the server’s public key
  • message: the message to send to the server

Auto Trait Implementations§

§

impl<D, const K1: usize> Freeze for AuCPaceClientCPaceSubstep<D, K1>

§

impl<D, const K1: usize> RefUnwindSafe for AuCPaceClientCPaceSubstep<D, K1>

§

impl<D, const K1: usize> Send for AuCPaceClientCPaceSubstep<D, K1>

§

impl<D, const K1: usize> Sync for AuCPaceClientCPaceSubstep<D, K1>

§

impl<D, const K1: usize> Unpin for AuCPaceClientCPaceSubstep<D, K1>

§

impl<D, const K1: usize> UnwindSafe for AuCPaceClientCPaceSubstep<D, K1>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.