@derec-alliance/react-native 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -7
- package/android/src/main/jniLibs/arm64-v8a/libderec_library.a +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libderec_library.a +0 -0
- package/android/src/main/jniLibs/x86_64/libderec_library.a +0 -0
- package/cpp/Primitives.cpp +13 -7
- package/cpp/ProtocolHost.cpp +4 -5
- package/cpp/StoreCallbacks.cpp +31 -43
- package/cpp/derec_ffi.h +44 -33
- package/ios/DeRecFFI.xcframework/Info.plist +5 -5
- package/ios/DeRecFFI.xcframework/ios-arm64/Headers/derec_ffi.h +44 -33
- package/ios/DeRecFFI.xcframework/ios-arm64/libderec_library.a +0 -0
- package/ios/DeRecFFI.xcframework/ios-arm64_x86_64-simulator/Headers/derec_ffi.h +44 -33
- package/ios/DeRecFFI.xcframework/ios-arm64_x86_64-simulator/libderec_library.a +2 -2
- package/lib/errors.d.ts +1 -1
- package/lib/errors.js +3 -0
- package/lib/messages.js +5 -3
- package/lib/primitives.d.ts +1 -1
- package/lib/primitives.js +4 -2
- package/lib/protocol.d.ts +9 -5
- package/lib/protocol.js +9 -5
- package/lib/types.d.ts +48 -20
- package/lib/types.js +4 -1
- package/package.json +4 -17
- package/schema/derec_descriptor.bin +0 -0
- package/schema/proto/committedderecshare.proto +93 -0
- package/schema/proto/communicationinfo.proto +104 -0
- package/schema/proto/contact.proto +258 -0
- package/schema/proto/derecmessage.proto +232 -0
- package/schema/proto/derecsecret.proto +163 -0
- package/schema/proto/derectransport.proto +38 -0
- package/schema/proto/error.proto +68 -0
- package/schema/proto/getshare.proto +184 -0
- package/schema/proto/pair.proto +284 -0
- package/schema/proto/parameterrange.proto +36 -0
- package/schema/proto/prepair.proto +163 -0
- package/schema/proto/result.proto +194 -0
- package/schema/proto/secretidsversions.proto +199 -0
- package/schema/proto/storeshare.proto +242 -0
- package/schema/proto/transportprotocol.proto +112 -0
- package/schema/proto/unpair.proto +132 -0
- package/schema/proto/updatechannelinfo.proto +100 -0
- package/schema/proto/verify.proto +160 -0
- package/src/errors.ts +3 -0
- package/src/messages.ts +5 -3
- package/src/primitives.ts +6 -2
- package/src/protocol.ts +10 -6
- package/src/types.ts +49 -23
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) DeRec Alliance and its Contributors.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
syntax = "proto3";
|
|
7
|
+
|
|
8
|
+
import "result.proto";
|
|
9
|
+
import "parameterrange.proto";
|
|
10
|
+
import "google/protobuf/timestamp.proto";
|
|
11
|
+
|
|
12
|
+
package org.derecalliance.derec.protobuf;
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// HelperSpecificInfo captures per-helper metadata associated with a secret.
|
|
16
|
+
//
|
|
17
|
+
// # Purpose
|
|
18
|
+
//
|
|
19
|
+
// This message binds a specific Helper to:
|
|
20
|
+
//
|
|
21
|
+
// - its identity (via a hash of its public encryption key)
|
|
22
|
+
// - the parameters agreed during pairing with the Owner
|
|
23
|
+
//
|
|
24
|
+
// This information allows the Owner to:
|
|
25
|
+
//
|
|
26
|
+
// - track which Helpers are associated with a given secret
|
|
27
|
+
// - reconstruct the correct configuration during recovery
|
|
28
|
+
// - verify that Helpers are operating under the expected parameters
|
|
29
|
+
//
|
|
30
|
+
// # Semantics
|
|
31
|
+
//
|
|
32
|
+
// Each entry represents one Helper participating in the secret sharing
|
|
33
|
+
// scheme. The collection of these entries defines the Helper set for
|
|
34
|
+
// a given version of the secret.
|
|
35
|
+
//
|
|
36
|
+
// # Identity Binding
|
|
37
|
+
//
|
|
38
|
+
// The `helper` field is a SHA-384 hash of the Helper's public encryption
|
|
39
|
+
// key. This provides a stable identifier without exposing the key itself.
|
|
40
|
+
//
|
|
41
|
+
// Implementations MUST ensure that:
|
|
42
|
+
//
|
|
43
|
+
// - the hash corresponds to the exact public key used during pairing
|
|
44
|
+
// - the mapping between Helper identity and key is preserved
|
|
45
|
+
//
|
|
46
|
+
// # Parameter Agreement
|
|
47
|
+
//
|
|
48
|
+
// The `helperParams` field records the parameter range agreed between
|
|
49
|
+
// the Owner and the Helper during pairing. This ensures that:
|
|
50
|
+
//
|
|
51
|
+
// - the share distribution is consistent with negotiated constraints
|
|
52
|
+
// - recovery can validate expected parameters
|
|
53
|
+
message HelperSpecificInfo {
|
|
54
|
+
|
|
55
|
+
// SHA-384 hash of the Helper's public encryption key.
|
|
56
|
+
//
|
|
57
|
+
// This uniquely identifies the Helper within the context of the secret
|
|
58
|
+
// without exposing the raw key material.
|
|
59
|
+
bytes helper = 1;
|
|
60
|
+
|
|
61
|
+
// Parameters agreed upon between the Helper and the Owner.
|
|
62
|
+
//
|
|
63
|
+
// These parameters originate from the intersection of both parties'
|
|
64
|
+
// supported ranges during pairing.
|
|
65
|
+
ParameterRange helperParams = 2;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
// DeRecSecret represents the canonical structure of the secret material
|
|
70
|
+
// that is encrypted and distributed across Helpers.
|
|
71
|
+
//
|
|
72
|
+
// # Context
|
|
73
|
+
//
|
|
74
|
+
// Before distribution:
|
|
75
|
+
//
|
|
76
|
+
// - the Owner constructs a DeRecSecret
|
|
77
|
+
// - the `secretData` is encrypted (e.g., via AES-GCM)
|
|
78
|
+
// - the encryption key is split using a secret sharing scheme (e.g., Shamir)
|
|
79
|
+
//
|
|
80
|
+
// The resulting shares are then distributed to Helpers.
|
|
81
|
+
//
|
|
82
|
+
// This message defines the structure used by "share algorithm 0".
|
|
83
|
+
//
|
|
84
|
+
// # Semantics
|
|
85
|
+
//
|
|
86
|
+
// A DeRecSecret contains:
|
|
87
|
+
//
|
|
88
|
+
// - the raw secret payload
|
|
89
|
+
// - metadata describing the sharing configuration
|
|
90
|
+
// - the set of Helpers and their associated parameters
|
|
91
|
+
//
|
|
92
|
+
// This metadata is critical for:
|
|
93
|
+
//
|
|
94
|
+
// - reconstructing the secret during recovery
|
|
95
|
+
// - validating the integrity and configuration of shares
|
|
96
|
+
//
|
|
97
|
+
// # Thresholds
|
|
98
|
+
//
|
|
99
|
+
// Two thresholds are defined:
|
|
100
|
+
//
|
|
101
|
+
// 1. Recovery threshold:
|
|
102
|
+
// - Minimum number of Helpers required to reconstruct the secret
|
|
103
|
+
//
|
|
104
|
+
// 2. Confirmation threshold:
|
|
105
|
+
// - Minimum number of Helpers that must acknowledge receipt of a new
|
|
106
|
+
// share version before older versions can be safely deleted
|
|
107
|
+
//
|
|
108
|
+
// # Security Considerations
|
|
109
|
+
//
|
|
110
|
+
// - The entire DeRecSecret MUST be encrypted before distribution
|
|
111
|
+
// - Helpers MUST NOT have access to the plaintext secretData
|
|
112
|
+
// - Metadata should not leak sensitive information beyond what is required
|
|
113
|
+
//
|
|
114
|
+
// # Versioning
|
|
115
|
+
//
|
|
116
|
+
// Each share distribution version implicitly corresponds to a snapshot
|
|
117
|
+
// of this structure. Changes to:
|
|
118
|
+
//
|
|
119
|
+
// - secretData
|
|
120
|
+
// - helper set
|
|
121
|
+
// - thresholds
|
|
122
|
+
//
|
|
123
|
+
// result in a new version being generated and distributed.
|
|
124
|
+
message DeRecSecret {
|
|
125
|
+
|
|
126
|
+
// Arbitrary secret payload.
|
|
127
|
+
//
|
|
128
|
+
// This may include cryptographic keys, credentials, documents, or any
|
|
129
|
+
// serialized data the Owner wishes to protect. When produced by the DeRec
|
|
130
|
+
// library, these bytes are the recoverable secret: a 1-byte version prefix
|
|
131
|
+
// followed by a versioned payload (v1 = gzip-compressed (RFC 1952) JSON,
|
|
132
|
+
// base64 (RFC 4648 §4) byte fields, u64 as decimal strings). Other payloads
|
|
133
|
+
// MAY use a different encoding; secretData is opaque to the protocol.
|
|
134
|
+
bytes secretData = 1;
|
|
135
|
+
|
|
136
|
+
// Timestamp indicating when this secret (or this version of it) was created.
|
|
137
|
+
//
|
|
138
|
+
// Used for auditing, version tracking, and observability.
|
|
139
|
+
google.protobuf.Timestamp creationTime = 2;
|
|
140
|
+
|
|
141
|
+
// Minimum number of Helpers required to reconstruct the secret.
|
|
142
|
+
//
|
|
143
|
+
// This corresponds to the threshold parameter of the underlying
|
|
144
|
+
// secret sharing scheme.
|
|
145
|
+
int64 helperThresholdForRecovery = 3;
|
|
146
|
+
|
|
147
|
+
// Minimum number of Helpers that must confirm receipt of a share
|
|
148
|
+
// before older versions can be deleted.
|
|
149
|
+
//
|
|
150
|
+
// This ensures that sufficient redundancy exists before removing
|
|
151
|
+
// previous share versions.
|
|
152
|
+
int64 helperThresholdForConfirmingShareReceipt = 4;
|
|
153
|
+
|
|
154
|
+
// List of Helpers participating in this secret.
|
|
155
|
+
//
|
|
156
|
+
// Each entry defines:
|
|
157
|
+
//
|
|
158
|
+
// - the identity of the Helper
|
|
159
|
+
// - the parameters agreed with that Helper
|
|
160
|
+
//
|
|
161
|
+
// The size of this list defines the total number of shares generated.
|
|
162
|
+
repeated HelperSpecificInfo helpers = 5;
|
|
163
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) DeRec Alliance and its Contributors.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
syntax = "proto3";
|
|
7
|
+
|
|
8
|
+
package org.derecalliance.derec.protobuf;
|
|
9
|
+
|
|
10
|
+
import "derecmessage.proto";
|
|
11
|
+
import "google/protobuf/empty.proto";
|
|
12
|
+
|
|
13
|
+
/// Delivery service for DeRec messages over gRPC.
|
|
14
|
+
///
|
|
15
|
+
/// Mirrors the request/response-free delivery model the protocol already
|
|
16
|
+
/// uses: a sender hands one envelope to one endpoint and learns only whether
|
|
17
|
+
/// delivery succeeded.
|
|
18
|
+
///
|
|
19
|
+
/// # Push-only
|
|
20
|
+
///
|
|
21
|
+
/// `Send` returns `google.protobuf.Empty`. There is no inline reply. A
|
|
22
|
+
/// responder answers by opening a new `Send` to the requester's own
|
|
23
|
+
/// endpoint, which means **both parties must run a reachable server**.
|
|
24
|
+
/// Responses are correlated by the envelope's `traceId`, not by the call.
|
|
25
|
+
///
|
|
26
|
+
/// # Security
|
|
27
|
+
///
|
|
28
|
+
/// This service provides no security guarantees of its own. Every
|
|
29
|
+
/// `DeRecMessage` carries its payload signed and encrypted at the
|
|
30
|
+
/// application layer, and remains valid regardless of transport.
|
|
31
|
+
service DeRecTransport {
|
|
32
|
+
/// Deliver one DeRec envelope to this endpoint.
|
|
33
|
+
///
|
|
34
|
+
/// Returns once the receiver has accepted the envelope for processing.
|
|
35
|
+
/// Acceptance is not a protocol-level acknowledgement: a protocol
|
|
36
|
+
/// response, if any, arrives as a separate `Send` call.
|
|
37
|
+
rpc Send(DeRecMessage) returns (google.protobuf.Empty);
|
|
38
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) DeRec Alliance and its Contributors.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
syntax = "proto3";
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/timestamp.proto";
|
|
9
|
+
import "result.proto";
|
|
10
|
+
|
|
11
|
+
package org.derecalliance.derec.protobuf;
|
|
12
|
+
|
|
13
|
+
// ErrorResponseMessage is a generic error response sent when a protocol
|
|
14
|
+
// message cannot be processed successfully.
|
|
15
|
+
//
|
|
16
|
+
// # Context
|
|
17
|
+
//
|
|
18
|
+
// This message may be returned in response to any DeRecMessage when the
|
|
19
|
+
// receiver encounters an error during processing.
|
|
20
|
+
//
|
|
21
|
+
// Typical scenarios include:
|
|
22
|
+
//
|
|
23
|
+
// - malformed or invalid message payloads
|
|
24
|
+
// - unsupported or unknown message types
|
|
25
|
+
// - protocol violations (e.g., invalid sequence, nonce mismatch)
|
|
26
|
+
// - authorization or validation failures
|
|
27
|
+
//
|
|
28
|
+
// # Semantics
|
|
29
|
+
//
|
|
30
|
+
// This message indicates that:
|
|
31
|
+
//
|
|
32
|
+
// - the original request was not successfully processed
|
|
33
|
+
// - no state change should be assumed by the sender
|
|
34
|
+
//
|
|
35
|
+
// The sender SHOULD:
|
|
36
|
+
//
|
|
37
|
+
// - inspect the `result` field to determine the cause of the failure
|
|
38
|
+
// - decide whether to retry, abort, or escalate based on the error
|
|
39
|
+
//
|
|
40
|
+
// # Usage Guidelines
|
|
41
|
+
//
|
|
42
|
+
// - This message is intended as a fallback when no more specific response
|
|
43
|
+
// type is applicable
|
|
44
|
+
// - Protocol-specific errors SHOULD use their corresponding response
|
|
45
|
+
// messages when available
|
|
46
|
+
//
|
|
47
|
+
// # Security Considerations
|
|
48
|
+
//
|
|
49
|
+
// - Error responses SHOULD avoid leaking sensitive internal details
|
|
50
|
+
// - Only high-level error information should be exposed via `result`
|
|
51
|
+
//
|
|
52
|
+
// # Idempotency
|
|
53
|
+
//
|
|
54
|
+
// Error responses are idempotent and may be returned multiple times
|
|
55
|
+
// for repeated invalid requests.
|
|
56
|
+
message ErrorResponseMessage {
|
|
57
|
+
// Result describing the error encountered while processing the request.
|
|
58
|
+
//
|
|
59
|
+
// This field encodes the error type and any associated status information.
|
|
60
|
+
DeRecResult result = 1;
|
|
61
|
+
|
|
62
|
+
// Timestamp indicating when this message was created.
|
|
63
|
+
//
|
|
64
|
+
// This value is expressed in UTC and can be used for observability,
|
|
65
|
+
// replay detection, and timeout handling. The envelope carries the same
|
|
66
|
+
// value, and a receiver rejects a message whose two copies differ.
|
|
67
|
+
google.protobuf.Timestamp timestamp = 2;
|
|
68
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) DeRec Alliance and its Contributors.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
syntax = "proto3";
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/timestamp.proto";
|
|
9
|
+
import "result.proto";
|
|
10
|
+
import "transportprotocol.proto";
|
|
11
|
+
|
|
12
|
+
package org.derecalliance.derec.protobuf;
|
|
13
|
+
|
|
14
|
+
// GetShareRequestMessage requests a previously stored share from a Helper.
|
|
15
|
+
//
|
|
16
|
+
// # Context
|
|
17
|
+
//
|
|
18
|
+
// This message is used during the recovery flow, after pairing has been
|
|
19
|
+
// established (typically in recovery mode). Once a Helper has indicated
|
|
20
|
+
// which secret IDs and versions it holds, the Owner sends this request
|
|
21
|
+
// to retrieve specific shares.
|
|
22
|
+
//
|
|
23
|
+
// # Semantics
|
|
24
|
+
//
|
|
25
|
+
// The request identifies a share by:
|
|
26
|
+
//
|
|
27
|
+
// - `secretId`: the identifier of the protected secret
|
|
28
|
+
// - `version`: the version of the share distribution
|
|
29
|
+
//
|
|
30
|
+
// The Helper is expected to locate the corresponding share and return it
|
|
31
|
+
// in a GetShareResponseMessage.
|
|
32
|
+
//
|
|
33
|
+
// # Authorization Rules
|
|
34
|
+
//
|
|
35
|
+
// The Helper MUST only process this request if it is received through a
|
|
36
|
+
// valid communication channel that is authorized to access the requested
|
|
37
|
+
// share. Specifically:
|
|
38
|
+
//
|
|
39
|
+
// - the request MUST originate from the same secretId channel, OR
|
|
40
|
+
// - the request MUST originate from a channel established in recovery mode
|
|
41
|
+
// and associated with the same user
|
|
42
|
+
//
|
|
43
|
+
// Otherwise, the Helper MUST reject the request.
|
|
44
|
+
//
|
|
45
|
+
// # Idempotency
|
|
46
|
+
//
|
|
47
|
+
// This request is idempotent. Repeated requests for the same (secretId,
|
|
48
|
+
// version) pair SHOULD return the same result.
|
|
49
|
+
message GetShareRequestMessage {
|
|
50
|
+
|
|
51
|
+
// Numeric identifier of the secret for which the share is requested.
|
|
52
|
+
//
|
|
53
|
+
// Generated by the Owner when the secret is created. It uniquely
|
|
54
|
+
// identifies the secret within the context of the Owner and its Helpers.
|
|
55
|
+
uint64 secretId = 1;
|
|
56
|
+
|
|
57
|
+
// Version of the share being requested.
|
|
58
|
+
//
|
|
59
|
+
// Each time a secret is reshared (e.g., due to updates or changes in
|
|
60
|
+
// helper set), a new version is created. This field specifies which
|
|
61
|
+
// version of the share should be returned.
|
|
62
|
+
uint32 version = 2;
|
|
63
|
+
|
|
64
|
+
// Timestamp indicating when this message was created.
|
|
65
|
+
//
|
|
66
|
+
// This value is expressed in UTC and can be used for:
|
|
67
|
+
//
|
|
68
|
+
// - observability and logging
|
|
69
|
+
// - replay detection (in combination with sequence numbers)
|
|
70
|
+
// - timeout handling
|
|
71
|
+
google.protobuf.Timestamp timestamp = 3;
|
|
72
|
+
|
|
73
|
+
// Formerly the singular `replyTo`, superseded by `replyToTransports`.
|
|
74
|
+
reserved 4;
|
|
75
|
+
reserved "replyTo";
|
|
76
|
+
|
|
77
|
+
// Every ephemeral endpoint the requester wants this exchange's response
|
|
78
|
+
// delivered to, in its own preference order.
|
|
79
|
+
//
|
|
80
|
+
// See `StoreShareRequestMessage.replyToTransports` for full semantics.
|
|
81
|
+
repeated TransportProtocol replyToTransports = 6;
|
|
82
|
+
|
|
83
|
+
// Identity of the replica-group member this message concerns.
|
|
84
|
+
//
|
|
85
|
+
// Present **only** on the replica path, where a member drives catch-up
|
|
86
|
+
// against another member. Absent on the owner ↔ helper path, which is
|
|
87
|
+
// unchanged.
|
|
88
|
+
//
|
|
89
|
+
// Every member of a group is addressed on one shared `channel_id`, so the
|
|
90
|
+
// channel cannot name the peer — this field does. Its presence is also what
|
|
91
|
+
// tells the receiver which path a message belongs to.
|
|
92
|
+
optional uint64 replicaId = 5;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// GetShareResponseMessage returns a share previously stored by the Helper.
|
|
96
|
+
//
|
|
97
|
+
// # Semantics
|
|
98
|
+
//
|
|
99
|
+
// This message is sent in response to a GetShareRequestMessage. It either:
|
|
100
|
+
//
|
|
101
|
+
// - returns the requested share (on success), or
|
|
102
|
+
// - indicates failure via the `result` field
|
|
103
|
+
//
|
|
104
|
+
// # Authorization Enforcement
|
|
105
|
+
//
|
|
106
|
+
// The Helper MUST ensure that the request satisfies the authorization rules
|
|
107
|
+
// described in GetShareRequestMessage before returning any share data.
|
|
108
|
+
//
|
|
109
|
+
// # Share Contents
|
|
110
|
+
//
|
|
111
|
+
// The returned share is an opaque byte sequence that typically includes:
|
|
112
|
+
//
|
|
113
|
+
// - the Shamir share (x, y)
|
|
114
|
+
// - the encrypted secret payload (or a reference to it)
|
|
115
|
+
// - the commitment (e.g., Merkle root)
|
|
116
|
+
// - the opening proof for verification
|
|
117
|
+
//
|
|
118
|
+
// The exact structure is defined by the share algorithm indicated in
|
|
119
|
+
// `shareAlgorithm`.
|
|
120
|
+
//
|
|
121
|
+
// # Security Considerations
|
|
122
|
+
//
|
|
123
|
+
// - The share MUST only be returned over an authenticated and encrypted
|
|
124
|
+
// DeRec channel
|
|
125
|
+
// - Incorrect or malicious shares may be detected by the Owner during
|
|
126
|
+
// recovery using commitment verification
|
|
127
|
+
//
|
|
128
|
+
// # Idempotency
|
|
129
|
+
//
|
|
130
|
+
// For a given (secretId, version), repeated responses SHOULD return
|
|
131
|
+
// the same share data.
|
|
132
|
+
message GetShareResponseMessage {
|
|
133
|
+
|
|
134
|
+
// Result of processing the request.
|
|
135
|
+
//
|
|
136
|
+
// Indicates whether the share was successfully retrieved or if an error
|
|
137
|
+
// occurred (e.g., unauthorized request, unknown secretId, or missing version).
|
|
138
|
+
DeRecResult result = 1;
|
|
139
|
+
|
|
140
|
+
// The committed DeRec share.
|
|
141
|
+
//
|
|
142
|
+
// This is an opaque byte array containing the share data as produced by
|
|
143
|
+
// the share distribution algorithm. Its internal structure depends on
|
|
144
|
+
// `shareAlgorithm`.
|
|
145
|
+
bytes committedDeRecShare = 2;
|
|
146
|
+
|
|
147
|
+
// Identifier of the share algorithm used to produce the share.
|
|
148
|
+
//
|
|
149
|
+
// This allows the recipient to interpret and process the share correctly
|
|
150
|
+
// during verification and reconstruction.
|
|
151
|
+
int32 shareAlgorithm = 3;
|
|
152
|
+
|
|
153
|
+
// Timestamp indicating when this message was created.
|
|
154
|
+
//
|
|
155
|
+
// This value is expressed in UTC and can be used for observability,
|
|
156
|
+
// replay detection, and timeout handling.
|
|
157
|
+
google.protobuf.Timestamp timestamp = 4;
|
|
158
|
+
|
|
159
|
+
// Identifier of the secret to which this response refers.
|
|
160
|
+
//
|
|
161
|
+
// Echoed from the corresponding GetShareRequestMessage so the Owner can
|
|
162
|
+
// correlate responses with the correct pending recovery without inspecting
|
|
163
|
+
// the share bytes. Required when the Owner has multiple recoveries in
|
|
164
|
+
// progress concurrently, or to defend against stale responses from a
|
|
165
|
+
// previously-abandoned recovery attempt.
|
|
166
|
+
uint64 secretId = 5;
|
|
167
|
+
|
|
168
|
+
// Version of the share being returned.
|
|
169
|
+
//
|
|
170
|
+
// Echoed from the corresponding GetShareRequestMessage for the same
|
|
171
|
+
// correlation reasons as `secretId`.
|
|
172
|
+
uint32 version = 6;
|
|
173
|
+
|
|
174
|
+
// Identity of the replica-group member this message concerns.
|
|
175
|
+
//
|
|
176
|
+
// Present **only** on the replica path, where a member drives catch-up
|
|
177
|
+
// against another member. Absent on the owner ↔ helper path, which is
|
|
178
|
+
// unchanged.
|
|
179
|
+
//
|
|
180
|
+
// Every member of a group is addressed on one shared `channel_id`, so the
|
|
181
|
+
// channel cannot name the peer — this field does. Its presence is also what
|
|
182
|
+
// tells the receiver which path a message belongs to.
|
|
183
|
+
optional uint64 replicaId = 7;
|
|
184
|
+
}
|