From a07a518a1e8e802fe2c90814068ec932bead30dc Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Thu, 3 Sep 2020 15:55:39 +0300 Subject: [PATCH] [#66] object: Add object_id signature to Head response Object ID signature is needed to check Header authenticity. Signed-off-by: Stanislav Bogatyrev --- object/service.proto | 6 ++++++ proto-docs/object.md | 1 + 2 files changed, 7 insertions(+) diff --git a/object/service.proto b/object/service.proto index e14b0c8..f6a47a6 100644 --- a/object/service.proto +++ b/object/service.proto @@ -250,6 +250,12 @@ message HeadResponse { // Short object header ShortHeader short_header = 2; + + // Signed object_id to verify full header's authenticity through following steps: + // 1. Calculate SHA-256 of marshalled Headers structure. + // 2. Check if the resulting hash matched ObjectID + // 3. Check if ObjectID's signature in signature field is correct. + neo.fs.v2.refs.Signature signature = 3; } } // Body of head object response message. diff --git a/proto-docs/object.md b/proto-docs/object.md index ce47f3e..5ac2bbb 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -408,6 +408,7 @@ Response body | ----- | ---- | ----- | ----------- | | header | [Header](#neo.fs.v2.object.Header) | | Full object header | | short_header | [ShortHeader](#neo.fs.v2.object.ShortHeader) | | Short object header | +| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signed object_id to verify full header's authenticity through following steps: 1. Calculate SHA-256 of marshalled Headers structure. 2. Check if the resulting hash matched ObjectID 3. Check if ObjectID's signature in signature field is correct. |