pub enum MurkIdentity {
Age(Identity),
Ssh {
identity: Identity,
pem: Zeroizing<String>,
},
Plugin {
identity: Identity,
pubkey: String,
},
}Expand description
An identity that can decrypt age-encrypted data.
Plugin identities (AGE-PLUGIN-<NAME>-1...) carry the recipient pubkey
alongside the pointer so pubkey_string does not require spawning the
plugin binary. Decryption spawns age-plugin-<name> via
IdentityPluginV1 to access the hardware-backed key.
Variants§
Implementations§
Source§impl MurkIdentity
impl MurkIdentity
Sourcepub fn pubkey_string(&self) -> Result<String, CryptoError>
pub fn pubkey_string(&self) -> Result<String, CryptoError>
Return the public key string for this identity.
For age keys: age1.... For SSH keys: ssh-ed25519 AAAA... or
ssh-rsa AAAA.... For plugin keys: the age1<plugin>1... recipient
that was parsed from the identity file’s recipient header
(# Recipient: or # public key:).
Sourcepub fn plugin_name(&self) -> Option<&str>
pub fn plugin_name(&self) -> Option<&str>
Plugin name (e.g. "yubikey", "se") if this is a plugin identity.
Sourcepub fn is_signing_capable(&self) -> bool
pub fn is_signing_capable(&self) -> bool
Whether this identity can produce vault signatures: native age keys, and
ssh-ed25519 keys (which sign natively). ssh-rsa and hardware/plugin
identities cannot. Cheap check for deciding whether to nudge on an unsigned
vault; the actual key comes from Self::signing_key.
Sourcepub fn registers_verifying_key(&self) -> bool
pub fn registers_verifying_key(&self) -> bool
Whether this identity’s verifying key must be recorded in the signer
registry (Meta::signers) for its signature to be verifiable.
Only age keys: their Ed25519 verifying key is derived from the secret and
cannot be recovered from the public age recipient, so it must be published.
ssh-ed25519 verifying keys are embedded in the recipient string itself,
so they are self-authenticating and are NOT registered.
Sourcepub fn signing_key(&self) -> Option<SigningKey>
pub fn signing_key(&self) -> Option<SigningKey>
This identity’s Ed25519 signing key, if it can sign.
- Age keys: derived from the raw x25519 key bytes via a domain-separated
KDF (see
crate::signing), so it recovers from the BIP39 phrase. ssh-ed25519keys: the SSH key is an Ed25519 signing key; we parse it from the retained OpenSSH PEM (age does not expose the scalar). The resulting verifying key matches thessh-ed25519 …recipient string.ssh-rsaand plugin/hardware identities returnNone(unsigned).
Trait Implementations§
Source§impl Clone for MurkIdentity
impl Clone for MurkIdentity
Source§fn clone(&self) -> MurkIdentity
fn clone(&self) -> MurkIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MurkIdentity
impl RefUnwindSafe for MurkIdentity
impl Send for MurkIdentity
impl Sync for MurkIdentity
impl Unpin for MurkIdentity
impl UnsafeUnpin for MurkIdentity
impl UnwindSafe for MurkIdentity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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