Skip to content

Commit

Permalink
Merge pull request #302 from nspcc-dev/feat/add-replication-signing
Browse files Browse the repository at this point in the history
object/replicate: Add signature to the replication RPC
  • Loading branch information
roman-khimov authored Aug 19, 2024
2 parents 4bd8b4d + 0ae1cc7 commit 01229b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions object/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,21 @@ message ReplicateRequest {

// Signature of `object.object_id.value` field.
neo.fs.v2.refs.Signature signature = 2;

// 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.
bool sign_object = 3;
}

// Replicate RPC response
message ReplicateResponse {
// Operation execution status with one of the enumerated codes.
neo.fs.v2.status.Status status = 1;

// Deterministic ECDSA with SHA-256 hashing (RFC 6979) signature of
// replicated object. Must be attached if request was made with
// `sign_object` flag set.
bytes object_signature = 2;
}
2 changes: 2 additions & 0 deletions proto-docs/object.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ Replicate RPC request
| ----- | ---- | ----- | ----------- |
| object | [Object](#neo.fs.v2.object.Object) | | Object to be replicated. |
| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of `object.object_id.value` field. |
| 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. |


<a name="neo.fs.v2.object.ReplicateResponse"></a>
Expand All @@ -732,6 +733,7 @@ Replicate RPC response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| status | [neo.fs.v2.status.Status](#neo.fs.v2.status.Status) | | Operation execution status with one of the enumerated codes. |
| 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. |


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

0 comments on commit 01229b4

Please sign in to comment.