Skip to content

Commit 01229b4

Browse files
authored
Merge pull request #302 from nspcc-dev/feat/add-replication-signing
object/replicate: Add signature to the replication RPC
2 parents 4bd8b4d + 0ae1cc7 commit 01229b4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

object/service.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,21 @@ message ReplicateRequest {
721721

722722
// Signature of `object.object_id.value` field.
723723
neo.fs.v2.refs.Signature signature = 2;
724+
725+
// Optional flag that requires server side to attach signature of just
726+
// replicated object to ensure it has been received correctly. Signature
727+
// must be calculated with a key that corresponds to an exposed to the
728+
// network map public key of the object receiver.
729+
bool sign_object = 3;
724730
}
725731

726732
// Replicate RPC response
727733
message ReplicateResponse {
728734
// Operation execution status with one of the enumerated codes.
729735
neo.fs.v2.status.Status status = 1;
736+
737+
// Deterministic ECDSA with SHA-256 hashing (RFC 6979) signature of
738+
// replicated object. Must be attached if request was made with
739+
// `sign_object` flag set.
740+
bytes object_signature = 2;
730741
}

proto-docs/object.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ Replicate RPC request
721721
| ----- | ---- | ----- | ----------- |
722722
| object | [Object](#neo.fs.v2.object.Object) | | Object to be replicated. |
723723
| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of `object.object_id.value` field. |
724+
| sign_object | [bool](#bool) | | Optional flag that requires server side to attach signature of just replicated object to ensure it has been received correctly. Signature must be calculated with a key that corresponds to an exposed to the network map public key of the object receiver. |
724725

725726

726727
<a name="neo.fs.v2.object.ReplicateResponse"></a>
@@ -732,6 +733,7 @@ Replicate RPC response
732733
| Field | Type | Label | Description |
733734
| ----- | ---- | ----- | ----------- |
734735
| status | [neo.fs.v2.status.Status](#neo.fs.v2.status.Status) | | Operation execution status with one of the enumerated codes. |
736+
| object_signature | [bytes](#bytes) | | Deterministic ECDSA with SHA-256 hashing (RFC 6979) signature of replicated object. Must be attached if request was made with `sign_object` flag set. |
735737

736738

737739
<a name="neo.fs.v2.object.SearchRequest"></a>

0 commit comments

Comments
 (0)