Skip to content

Commit 875e52f

Browse files
authored
Merge pull request #324 from nspcc-dev/feature/n3-auth
2 parents 8838e6d + 702ff46 commit 875e52f

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

proto-docs/refs.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ Signature of something in NeoFS.
149149

150150
| Field | Type | Label | Description |
151151
| ----- | ---- | ----- | ----------- |
152-
| key | [bytes](#bytes) | | Public key used for signing |
153-
| sign | [bytes](#bytes) | | Signature |
152+
| key | [bytes](#bytes) | | Public key used for signing. For N3 `scheme`, the field represents a verification script. |
153+
| sign | [bytes](#bytes) | | Signature. For N3 `scheme`, the field represents an invocation script. |
154154
| scheme | [SignatureScheme](#neo.fs.v2.refs.SignatureScheme) | | Scheme contains digital signature scheme identifier |
155155

156156

@@ -162,8 +162,8 @@ RFC 6979 signature.
162162

163163
| Field | Type | Label | Description |
164164
| ----- | ---- | ----- | ----------- |
165-
| key | [bytes](#bytes) | | Public key used for signing |
166-
| sign | [bytes](#bytes) | | Deterministic ECDSA with SHA-256 hashing |
165+
| key | [bytes](#bytes) | | Public key used for signing. For N3 auth scheme, the field represents a verification script. |
166+
| sign | [bytes](#bytes) | | Deterministic ECDSA with SHA-256 hashing. For N3 auth scheme, the field represents an invocation script. |
167167

168168

169169
<a name="neo.fs.v2.refs.SubnetID"></a>
@@ -223,6 +223,7 @@ Signature scheme describes digital signing scheme used for (key, signature) pair
223223
| ECDSA_SHA512 | 0 | ECDSA with SHA-512 hashing (FIPS 186-3) |
224224
| ECDSA_RFC6979_SHA256 | 1 | Deterministic ECDSA with SHA-256 hashing (RFC 6979) |
225225
| ECDSA_RFC6979_SHA256_WALLET_CONNECT | 2 | Deterministic ECDSA with SHA-256 hashing using WalletConnect API. Here the algorithm is the same, but the message format differs. |
226+
| N3 | 3 | Neo N3 witness. |
226227

227228

228229
<!-- end enums -->

refs/types.proto

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ message Version {
105105

106106
// Signature of something in NeoFS.
107107
message Signature {
108-
// Public key used for signing
108+
// Public key used for signing. For N3 `scheme`, the field represents a
109+
// verification script.
109110
bytes key = 1 [json_name = "key"];
110-
// Signature
111+
// Signature. For N3 `scheme`, the field represents an invocation script.
111112
bytes sign = 2 [json_name = "signature"];
112113
// Scheme contains digital signature scheme identifier
113114
SignatureScheme scheme = 3 [json_name = "scheme"];
@@ -124,13 +125,18 @@ enum SignatureScheme {
124125
// Deterministic ECDSA with SHA-256 hashing using WalletConnect API.
125126
// Here the algorithm is the same, but the message format differs.
126127
ECDSA_RFC6979_SHA256_WALLET_CONNECT = 2;
128+
129+
// Neo N3 witness.
130+
N3 = 3;
127131
}
128132

129133
// RFC 6979 signature.
130134
message SignatureRFC6979 {
131-
// Public key used for signing
135+
// Public key used for signing. For N3 auth scheme, the field represents a
136+
// verification script.
132137
bytes key = 1 [json_name = "key"];
133-
// Deterministic ECDSA with SHA-256 hashing
138+
// Deterministic ECDSA with SHA-256 hashing. For N3 auth scheme, the field
139+
// represents an invocation script.
134140
bytes sign = 2 [json_name = "signature"];
135141
}
136142

0 commit comments

Comments
 (0)