pub struct IdentityAttestation {
pub node_id: NodeId,
pub public_key: [u8; 32],
pub timestamp_ms: u64,
pub signature: [u8; 64],
}Expand description
An identity attestation proving ownership of a node_id
Used during mesh joining and periodic re-attestation.
Fields§
§node_id: NodeIdThe claimed node_id
public_key: [u8; 32]Public key (node_id is derived from this)
timestamp_ms: u64Timestamp when attestation was created (milliseconds since epoch)
signature: [u8; 64]Signature over (node_id || public_key || timestamp)
Implementations§
Source§impl IdentityAttestation
impl IdentityAttestation
Sourcepub fn verify(&self) -> bool
pub fn verify(&self) -> bool
Verify this attestation is valid
Checks:
- Signature is valid for the public key
- node_id correctly derives from public key
Does NOT check timestamp freshness (caller should do that).
Trait Implementations§
Source§impl Clone for IdentityAttestation
impl Clone for IdentityAttestation
Source§fn clone(&self) -> IdentityAttestation
fn clone(&self) -> IdentityAttestation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdentityAttestation
impl Debug for IdentityAttestation
Source§impl PartialEq for IdentityAttestation
impl PartialEq for IdentityAttestation
impl Eq for IdentityAttestation
impl StructuralPartialEq for IdentityAttestation
Auto Trait Implementations§
impl Freeze for IdentityAttestation
impl RefUnwindSafe for IdentityAttestation
impl Send for IdentityAttestation
impl Sync for IdentityAttestation
impl Unpin for IdentityAttestation
impl UnsafeUnpin for IdentityAttestation
impl UnwindSafe for IdentityAttestation
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.