Skip to main content

NtorV3ServerKeys

Trait NtorV3ServerKeys 

Source
pub(crate) trait NtorV3ServerKeys {
    // Required methods
    fn ident(&self) -> &Ed25519Identity;
    fn public_key(&self) -> &PublicKey;
    fn secret_key(&self) -> &StaticSecret;

    // Provided method
    fn matches(&self, id: Ed25519Identity, pk: PublicKey) -> Choice { ... }
}
Expand description

An object holding the keys necessary for a server-side ntor v3 handshake.

Required Methods§

Source

fn ident(&self) -> &Ed25519Identity

The server’s identity.

Source

fn public_key(&self) -> &PublicKey

The server’s public key.

Source

fn secret_key(&self) -> &StaticSecret

The server’s secret key.

Provided Methods§

Source

fn matches(&self, id: Ed25519Identity, pk: PublicKey) -> Choice

Return true if id and pk match this set of keys.

Used to perform a constant-time secret key lookup.

This should not be implemented manually.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§