Skip to main content

Crate derec_proto

Crate derec_proto 

Source
Expand description

§Protobuf Bindings

This module exposes the Rust types generated from the DeRec protocol protobuf definitions.

The types are generated at build time using prost from the protocol .proto files and correspond directly to the message definitions used by the DeRec protocol.

These structures are used internally by the library to:

  • serialize protocol messages before transmission
  • deserialize received messages
  • provide a strongly-typed representation of protocol data

The generated code mirrors the protobuf schema and therefore follows the naming and structure defined in the protocol specification rather than typical Rust conventions.

§Important

The contents of this module are generated code and should not be edited manually. Any changes must be performed in the protobuf definitions and the bindings regenerated.

Most users of the library should interact with the higher-level APIs provided by the protocol flow modules (pairing, sharing, verification, and recovery) rather than manipulating protobuf messages directly.

Modules§

committed_de_rec_share
Nested message and enum types in CommittedDeRecShare.
communication_info_key_value
Nested message and enum types in CommunicationInfoKeyValue.
de_rec_message
Nested message and enum types in DeRecMessage.
get_secret_ids_versions_response_message
Nested message and enum types in GetSecretIdsVersionsResponseMessage.

Structs§

CommittedDeRecShare
CommittedDeRecShare represents a DeRec share that has been committed and is ready to be given to a helper for storage.
CommunicationInfo
CommunicationInfo contains application-level identifying information about a participant (Owner or Helper).
CommunicationInfoKeyValue
CommunicationInfoKeyValue represents a single application-defined key-value pair used to convey user-facing identification data.
ContactMessage
ContactMessage is the only DeRec protocol message that is not wrapped inside a DeRecMessage.
DeRecMessage
DeRecMessage is the top-level protocol envelope for all DeRec messages, except ContactMessage which is exchanged out-of-band during pairing.
DeRecResult
Result represents the outcome of processing a DeRec protocol request.
DeRecSecret
DeRecSecret represents the canonical structure of the secret material that is encrypted and distributed across Helpers.
DeRecShare
DeRecShare contains the information that a sharer provides to a helper.
ErrorResponseMessage
ErrorResponseMessage is a generic error response sent when a protocol message cannot be processed successfully.
GetSecretIdsVersionsRequestMessage
GetSecretIdsVersionsRequestMessage requests the list of all secrets and corresponding share versions that a Helper stores for a given Owner.
GetSecretIdsVersionsResponseMessage
GetSecretIdsVersionsResponseMessage returns the list of all secrets and their corresponding share versions stored by the Helper for the Owner.
GetShareRequestMessage
GetShareRequestMessage requests a previously stored share from a Helper.
GetShareResponseMessage
GetShareResponseMessage returns a share previously stored by the Helper.
HelperSpecificInfo
HelperSpecificInfo captures per-helper metadata associated with a secret.
PairRequestMessage
PairRequestMessage is the first message in the pairing protocol, sent from the initiator to the responder after receiving a ContactMessage.
PairResponseMessage
PairResponseMessage is the response to a PairRequestMessage.
ParameterRange
StoreShareRequestMessage
StoreShareRequestMessage instructs a Helper to store a share for a given secret and manage the set of retained share versions.
StoreShareResponseMessage
StoreShareResponseMessage is the response to a StoreShareRequestMessage.
TransportProtocol
/ TransportProtocol defines how a DeRec participant (Owner or Helper) / can be reached over the network. / / This message encapsulates the transport-layer endpoint and the protocol / required to deliver DeRec messages to that endpoint. It is typically / exchanged during pairing (via ContactMessage) so that both parties know / how to establish communication channels. / / A TransportProtocol does not itself provide security guarantees. / All DeRec protocol messages MUST still be signed and encrypted at the / application layer, regardless of the underlying transport. / / # Semantics / / - The uri identifies the remote endpoint (e.g., HTTPS URL, message queue). / - The protocol specifies how the URI should be interpreted and how / messages must be transmitted. / - The combination of (protocol, uri) MUST be sufficient for the sender / to deliver a DeRec message to the receiver. / / # Usage / / - Included in ContactMessage during pairing to advertise reachable endpoints. / - May be stored by peers as part of the communication channel state. / - Used by the sender to select the correct transport mechanism when / delivering protocol messages. / / # Extensibility / / The Protocol enum is expected to grow as new transport mechanisms are / supported (e.g., message queues, peer-to-peer transports). Implementations / MUST ignore unknown enum values unless explicitly required otherwise. / / # Reliability / / Transport protocols may be: / - request/response (e.g., HTTPS) / - store-and-forward (e.g., message queues) / / Implementations MUST handle retries and idempotency at the protocol layer, / independent of transport guarantees.
UnpairRequestMessage
UnpairRequestMessage requests termination of the DeRec relationship between two parties (Owner and Helper).
UnpairResponseMessage
UnpairResponseMessage is the response to an UnpairRequestMessage.
VerifyShareRequestMessage
VerifyShareRequestMessage initiates a verification challenge from the Owner to a Helper to confirm that the Helper still retains a specific share.
VerifyShareResponseMessage
VerifyShareResponseMessage contains the result of a verification challenge and, on success, provides a proof of share possession.

Enums§

Protocol
/ Enumeration of supported transport protocols. / / Additional values MAY be introduced in future versions of the protocol.
SenderKind
SenderKind identifies the logical role of the sender in the pairing flow.
StatusEnum
StatusEnum defines the set of possible outcomes for processing DeRec protocol requests.