pub enum TieProof {
Root {
signature: RootSignature,
root: Option<RootKey>,
genesis: Option<Box<IdentityGenesis>>,
},
Device {
credential: UserDeviceCredential,
signature: Signature,
},
}Expand description
Who signed a tie_message for a portable user: their root, on the
phone that holds it, or one of their device keys, with the credential
the root gave it (P7-04). Either way the root itself never travels.
Variants§
Root
A root’s signature: the phrase root the user’s id is, or (P7-08) the root it names, which the verifier checks is one of the user’s.
Fields
signature: RootSignaturegenesis: Option<Box<IdentityGenesis>>The identity’s genesis, for a verifier that has not seen it
(P7-08, as UserDeviceCredential::genesis).
Device
credential’s device key’s signature.
Implementations§
Source§impl TieProof
impl TieProof
Sourcepub fn verify(
&self,
user: &PortableUserId,
message: &[u8],
now: i64,
) -> Result<(), TieProofError>
pub fn verify( &self, user: &PortableUserId, message: &[u8], now: i64, ) -> Result<(), TieProofError>
Whether it proves user signed message (a tie_message) at
now (Unix seconds): the signature of the root it names, or a
device key’s with a credential for user that holds now. Whether
that root is one of the user’s (Self::root) and revocation are
the verifier’s to check, against every state it has seen.
Sourcepub fn root(&self, user: &PortableUserId) -> RootKey
pub fn root(&self, user: &PortableUserId) -> RootKey
The root whose word it is: the one that signed it, or the one that signed the device’s credential.
Sourcepub fn genesis(&self) -> Option<&IdentityGenesis>
pub fn genesis(&self) -> Option<&IdentityGenesis>
The identity’s genesis it carries, if any.