Skip to content

Commit 00da7f7

Browse files
authored
Merge pull request #384 from nspcc-dev/signature-limits
2 parents 18ccb56 + 4eb36cd commit 00da7f7

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Support for initial placement policy of containers (#381)
77

88
### Changed
9+
- `key` and `sign` fields of `refs.Signature(RFC6979)` message now have a sane length limit (#384)
910

1011
### Removed
1112

proto-docs/refs.md

Lines changed: 4 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. For N3 `scheme`, the field represents a verification script. |
153-
| sign | [bytes](#bytes) | | Signature. For N3 `scheme`, the field represents an invocation script. |
152+
| key | [bytes](#bytes) | | Public key used for signing. For N3 `scheme`, the field represents a verification script. The maximum allowed length is 1024 bytes. |
153+
| sign | [bytes](#bytes) | | Signature. For N3 `scheme`, the field represents an invocation script. The maximum allowed length is 1024 bytes. |
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. 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. |
165+
| key | [bytes](#bytes) | | Public key used for signing. For N3 auth scheme, the field represents a verification script. The maximum allowed length is 1024 bytes. |
166+
| sign | [bytes](#bytes) | | Deterministic ECDSA with SHA-256 hashing. For N3 auth scheme, the field represents an invocation script. The maximum allowed length is 1024 bytes. |
167167

168168

169169
<a name="neo.fs.v2.refs.SubnetID"></a>

refs/types.proto

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@ message Version {
106106
// Signature of something in NeoFS.
107107
message Signature {
108108
// Public key used for signing. For N3 `scheme`, the field represents a
109-
// verification script.
109+
// verification script. The maximum allowed length is 1024 bytes.
110110
bytes key = 1 [json_name = "key"];
111-
// Signature. For N3 `scheme`, the field represents an invocation script.
111+
// Signature. For N3 `scheme`, the field represents an invocation script. The
112+
// maximum allowed length is 1024 bytes.
112113
bytes sign = 2 [json_name = "signature"];
113114
// Scheme contains digital signature scheme identifier
114115
SignatureScheme scheme = 3 [json_name = "scheme"];
@@ -133,10 +134,10 @@ enum SignatureScheme {
133134
// RFC 6979 signature.
134135
message SignatureRFC6979 {
135136
// Public key used for signing. For N3 auth scheme, the field represents a
136-
// verification script.
137+
// verification script. The maximum allowed length is 1024 bytes.
137138
bytes key = 1 [json_name = "key"];
138139
// Deterministic ECDSA with SHA-256 hashing. For N3 auth scheme, the field
139-
// represents an invocation script.
140+
// represents an invocation script. The maximum allowed length is 1024 bytes.
140141
bytes sign = 2 [json_name = "signature"];
141142
}
142143

0 commit comments

Comments
 (0)