Skip to main content

NodeIdentity

Struct NodeIdentity 

Source
pub struct NodeIdentity { /* private fields */ }
Expand description

A node’s signing identity. Encryption keys will belong to the selected session protocol. Deliberately has no Debug or Serialize implementation.

Implementations§

Source§

impl NodeIdentity

Source

pub fn sign_helper_channel(&self, transcript: &Digest) -> Result<[u8; 64]>

Authenticate a challenge on one native QUIC connection.

Source§

impl NodeIdentity

Source

pub fn observe_recovery( &self, state: &VerifiedState, challenge: &RecoveryChallenge, now: u64, ) -> Result<SignedRecoveryObservation>

May report an expired configuration, but never grants new authority.

Source§

impl NodeIdentity

Source

pub fn prepare_owner_candidate( &self, state: &VerifiedState, key: &OwnerKey, request: &str, now: u64, ) -> Result<SignedOwnerCandidate>

Source§

impl NodeIdentity

Source

pub fn sign_owner_readiness( &self, state: &VerifiedState, key: &OwnerKey, candidate: &SignedOwnerCandidate, connections: &[(SignedConfigurationGrant, Receipt)], now: u64, ) -> Result<SignedReadiness>

The trusted runtime must check durable local links and keys before signing.

Source§

impl NodeIdentity

Source

pub fn sign_stream_receipt( &self, group: &[u8], sequence: u64, digest: Digest, ) -> Result<Receipt>

Source

pub fn sign_stream_packet( &self, group: &[u8], sequence: u64, previous: Digest, ciphertext: &[u8], ) -> Result<Packet>

Authenticate an opaque packet and its position in a directional stream.

Source

pub fn generate() -> Result<Self>

Source

pub fn from_secret_bytes(node_id: &str, bytes: &[u8; 32]) -> Result<Self>

Source

pub fn replacement(&self) -> Result<Self>

Generate replacement signing material while retaining the stable node ID.

Source

pub fn expose_secret(&self) -> Zeroizing<[u8; 32]>

For protected endpoint storage only. Never pass the result to a chat or relay.

Source

pub fn id(&self) -> &str

Source

pub fn public_key(&self) -> PublicKey

Source

pub fn request_enrollment( &self, anchor: &TrustAnchor, base: &Checkpoint, name: &str, now: u64, ) -> Result<SignedEnrollment>

The anchor and checkpoint must be obtained through the trusted pairing flow.

Source

pub fn request_replacement( &self, anchor: &TrustAnchor, base: &Checkpoint, name: &str, replaces: ReplacedNode, now: u64, ) -> Result<SignedEnrollment>

Auto Trait Implementations§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.