pub struct AuditKeypair {
pub public: [u8; 32],
/* private fields */
}Expand description
An audit keypair. The public key is exposed to any session (including the decoy) so it can append sealed records; the secret lives only in the real lane (wrapped under the real key) and is the sole means of reading them.
Fields§
§public: [u8; 32]Implementations§
Source§impl AuditKeypair
impl AuditKeypair
pub fn generate() -> Result<Self, SanctuaryAuditError>
Sourcepub fn from_secret(secret: [u8; 32]) -> Self
pub fn from_secret(secret: [u8; 32]) -> Self
Construct a keypair from a caller-supplied 32-byte secret (e.g. a KDF-derived key). Lets an envelope
keypair be re-derived from a root secret rather than stored at rest. StaticSecret::from clamps
the scalar deterministically, so any 32 bytes are a valid secret and seal_to(public) /
open_sealed(secret) stay consistent.
Sourcepub fn secret_bytes(&self) -> &[u8; 32]
pub fn secret_bytes(&self) -> &[u8; 32]
The secret half — hold this only inside the real lane.
Trait Implementations§
Source§impl Drop for AuditKeypair
impl Drop for AuditKeypair
Auto Trait Implementations§
impl Freeze for AuditKeypair
impl RefUnwindSafe for AuditKeypair
impl Send for AuditKeypair
impl Sync for AuditKeypair
impl Unpin for AuditKeypair
impl UnsafeUnpin for AuditKeypair
impl UnwindSafe for AuditKeypair
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more