pub struct GetShareRequestMessage {
pub secret_id: Vec<u8>,
pub share_version: i32,
pub timestamp: Option<Timestamp>,
}Expand description
GetShareRequestMessage requests a previously stored share from a Helper.
§Context
This message is used during the recovery flow, after pairing has been established (typically in recovery mode). Once a Helper has indicated which secret IDs and versions it holds, the Owner sends this request to retrieve specific shares.
§Semantics
The request identifies a share by:
secretId: the identifier of the protected secretshareVersion: the version of the share distribution
The Helper is expected to locate the corresponding share and return it in a GetShareResponseMessage.
§Authorization Rules
The Helper MUST only process this request if it is received through a valid communication channel that is authorized to access the requested share. Specifically:
- the request MUST originate from the same secretId channel, OR
- the request MUST originate from a channel established in recovery mode and associated with the same user
Otherwise, the Helper MUST reject the request.
§Idempotency
This request is idempotent. Repeated requests for the same (secretId, shareVersion) pair SHOULD return the same result.
Fields§
§secret_id: Vec<u8>Identifier of the secret for which the share is requested.
This is an opaque byte array (1 to 16 bytes) generated by the Owner when the secret is created. It uniquely identifies the secret within the context of the Owner and its Helpers.
Version of the share being requested.
Each time a secret is reshared (e.g., due to updates or changes in helper set), a new version is created. This field specifies which version of the share should be returned.
timestamp: Option<Timestamp>Timestamp indicating when this message was created.
This value is expressed in UTC and can be used for:
- observability and logging
- replay detection (in combination with sequence numbers)
- timeout handling
Trait Implementations§
Source§fn clone(&self) -> GetShareRequestMessage
fn clone(&self) -> GetShareRequestMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.