pub struct MemberKeyRegistration {
pub purpose: Purpose,
pub community_id: CommunityId,
pub host_id: HostId,
pub host_challenge: Challenge,
pub member_public_key: PublicKey,
pub issued_at: u64,
}Expand description
Proves that the client holds the private key of the member key it registers. Signed by that key.
Fields§
§purpose: Purpose2: why the key is registered.
community_id: CommunityId3: the community.
host_id: HostId4: the host this registration is made to.
host_challenge: Challenge5: from this connection’s latest session.welcome.
member_public_key: PublicKey6: the key being registered; the signer.
issued_at: u647: ms since the epoch.
Implementations§
Source§impl MemberKeyRegistration
impl MemberKeyRegistration
Sourcepub fn verify_for_host(
signed: &SignedJson,
member_public_key: &PublicKey,
expected: &RegistrationExpectation,
min_suite: u8,
) -> Result<Signed<Self>, RegistrationError>
pub fn verify_for_host( signed: &SignedJson, member_public_key: &PublicKey, expected: &RegistrationExpectation, min_suite: u8, ) -> Result<Signed<Self>, RegistrationError>
The host’s check (§4.4): verifies under the command’s member_public_key (the signer,
supplied by the caller rather than read from the unverified bytes), then requires field
6 to be that key and fields 2–5 to match. Consuming the challenge is the caller’s job.
§Errors
RegistrationError for a bad signature, encoding or mismatch.
Trait Implementations§
Source§impl Clone for MemberKeyRegistration
impl Clone for MemberKeyRegistration
Source§fn clone(&self) -> MemberKeyRegistration
fn clone(&self) -> MemberKeyRegistration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MemberKeyRegistration
impl Debug for MemberKeyRegistration
Source§impl Decode for MemberKeyRegistration
impl Decode for MemberKeyRegistration
Source§impl Encode for MemberKeyRegistration
impl Encode for MemberKeyRegistration
impl Eq for MemberKeyRegistration
Source§impl PartialEq for MemberKeyRegistration
impl PartialEq for MemberKeyRegistration
Source§impl SignedObject for MemberKeyRegistration
impl SignedObject for MemberKeyRegistration
Source§const CONTEXT: Context = Context::MemberKey
const CONTEXT: Context = Context::MemberKey
The context the verifier supplies for this type (§3.5).
Source§fn decode_unverified(bytes: &[u8]) -> Result<Self, DecodeError>
fn decode_unverified(bytes: &[u8]) -> Result<Self, DecodeError>
Decodes canonical bytes without verifying them. Receivers use
Signed::verify_and_decode. Read moreSource§fn sign(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
fn sign(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
Encodes and signs (hedged). Read more
Source§fn sign_deterministic(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
fn sign_deterministic(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
Encodes and signs deterministically. Golden test vectors only. Read more
impl StructuralPartialEq for MemberKeyRegistration
Auto Trait Implementations§
impl Freeze for MemberKeyRegistration
impl RefUnwindSafe for MemberKeyRegistration
impl Send for MemberKeyRegistration
impl Sync for MemberKeyRegistration
impl Unpin for MemberKeyRegistration
impl UnsafeUnpin for MemberKeyRegistration
impl UnwindSafe for MemberKeyRegistration
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