pub struct VerifyShareResponseMessage {
pub result: Option<DeRecResult>,
pub version: i32,
pub nonce: u64,
pub hash: Vec<u8>,
pub timestamp: Option<Timestamp>,
}Expand description
VerifyShareResponseMessage contains the result of a verification challenge and, on success, provides a proof of share possession.
§Semantics
In response to a VerifyShareRequestMessage, the Helper:
- retrieves the requested share version
- computes the hash over (committedDeRecShare || nonce)
- returns the result along with the echoed version and nonce
The Owner verifies the response by recomputing the expected hash and comparing it with the received value.
§Failure Handling
If the verification fails (e.g., incorrect hash or error result), the Owner:
- MAY retry the verification
- MAY resend the correct share to the Helper
- MAY mark the Helper as unreliable after repeated failures
§Security Considerations
- The hash MUST be computed using SHA-384 as defined by the protocol
- The nonce MUST match the request to ensure the response is not replayed
- The response MUST be sent over an authenticated and encrypted channel
§Idempotency
Responses are tied to a specific (version, nonce) pair. Replaying a response with a stale nonce SHOULD be rejected by the Owner.
Fields§
§result: Option<DeRecResult>Result of processing the verification request.
Indicates whether the Helper successfully computed the proof or encountered an error (e.g., share not found).
version: i32Share version this response refers to.
MUST match the version provided in the request.
nonce: u64Challenge nonce echoed from the request.
MUST exactly match the nonce provided in the request.
hash: Vec<u8>Verification proof.
This is the SHA-384 hash of:
committedDeRecShare || nonce
where committedDeRecShare is the exact byte sequence originally
stored by the Helper.
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) -> VerifyShareResponseMessage
fn clone(&self) -> VerifyShareResponseMessage
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.