iroh_quinn_proto::crypto

Trait ServerConfig

Source
pub trait ServerConfig: Send + Sync {
    // Required methods
    fn initial_keys(
        &self,
        version: u32,
        dst_cid: &ConnectionId,
    ) -> Result<Keys, UnsupportedVersion>;
    fn retry_tag(
        &self,
        version: u32,
        orig_dst_cid: &ConnectionId,
        packet: &[u8],
    ) -> [u8; 16];
    fn start_session(
        self: Arc<Self>,
        version: u32,
        params: &TransportParameters,
    ) -> Box<dyn Session>;
}
Expand description

Server-side configuration for the crypto protocol

Required Methods§

Source

fn initial_keys( &self, version: u32, dst_cid: &ConnectionId, ) -> Result<Keys, UnsupportedVersion>

Create the initial set of keys given the client’s initial destination ConnectionId

Source

fn retry_tag( &self, version: u32, orig_dst_cid: &ConnectionId, packet: &[u8], ) -> [u8; 16]

Generate the integrity tag for a retry packet

Never called if initial_keys rejected version.

Source

fn start_session( self: Arc<Self>, version: u32, params: &TransportParameters, ) -> Box<dyn Session>

Start a server session with this configuration

Never called if initial_keys rejected version.

Implementors§