pub enum LocalIdentity<I: NodeIdentity> {
LongTerm(I),
Ephemeral(SoftwareIdentity),
}Expand description
A local node identity that the Mac coordinator owns and acts on behalf of.
UMSH nodes are identified by Ed25519 public keys. An identity provides the public key and the ability to derive pairwise keys via ECDH with the corresponding private key. Two variants are supported:
-
LongTerm(I)— wraps the platform-suppliedI: NodeIdentity, which is typically backed by secure-element storage, an HSM, or a platform keystore. Long-term identities persist across reboots; their frame counters are saved to theumsh_hal::CounterStoreso that replay protection remains valid after a power cycle. -
Ephemeral— wraps an in-memorySoftwareIdentitygenerated fresh at runtime for Perfect Forward Secrecy sessions. Because the key material itself vanishes on power loss, ephemeral identities do not persist their frame counters; replay protection is meaningful only within a single session. Requires thesoftware-cryptocrate feature.
Use LocalIdentity::public_key or LocalIdentity::hint to inspect the address
presented to the network without matching on the variant.
Variants§
LongTerm(I)
Long-term platform identity.
Ephemeral(SoftwareIdentity)
Software ephemeral identity used for PFS sessions.
Implementations§
Source§impl<I: NodeIdentity> LocalIdentity<I>
impl<I: NodeIdentity> LocalIdentity<I>
Sourcepub fn public_key(&self) -> &PublicKey
pub fn public_key(&self) -> &PublicKey
Return the public key for this identity.
Sourcepub fn is_ephemeral(&self) -> bool
pub fn is_ephemeral(&self) -> bool
Return whether this identity is ephemeral.