Skip to main content

InMemoryAttestor

Struct InMemoryAttestor 

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

In-memory Ed25519 attestor. Used in tests, fixtures, and the bootstrap path before the OS keychain is wired up.

Not suitable for production: the signing key is held in plain process memory. Production paths use one of the OS-keychain backends scaffolded below.

Implementations§

Source§

impl InMemoryAttestor

Source

pub fn from_signing_key( signing_key: SigningKey, key_id: impl Into<String>, ) -> Self

Wrap a pre-existing signing key with an explicit key_id.

Source

pub fn from_seed(seed: &[u8; 32]) -> Self

Build from a 32-byte secret seed. Useful for fixtures and tests where the keypair must be reproducible. key_id is derived as the lowercase hex of the public key (32 bytes → 64 hex chars).

Trait Implementations§

Source§

impl Attestor for InMemoryAttestor

Source§

fn sign(&self, signing_input: &[u8]) -> Signature

Sign the canonical signing input bytes. Read more
Source§

fn key_id(&self) -> &str

Stable fingerprint of the public verifying key. Embedded into every attestation preimage and matched on verify (see VerifyError::KeyIdMismatch).
Source§

fn verifying_key(&self) -> VerifyingKey

The verifying key for this attestor — exposed so test harnesses and cortex audit verify can reconstruct the public side without going through OS-specific lookup. OS-keychain backends MUST publish the public key alongside the private key (see ADR 0010 §3).
Source§

impl Debug for InMemoryAttestor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl IdentityRotation for InMemoryAttestor

Source§

fn sign_rotation( &self, new_pubkey: &VerifyingKey, signed_at: DateTime<Utc>, ) -> RotationEnvelope
where Self: Sized,

Sign a rotation envelope (old → new) using the old key material. See sign_rotation for the free-function form.

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 = 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V