Skip to content

Commit 3f05225

Browse files
committed
Explain multiple signatures.
Also remove the ellipsis (…) from the JSON so that it renders correctly on GitHub.
1 parent 68ec423 commit 3f05225

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

specification.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ The signature format is a JSON message of the following form:
3434
"signatures": [{
3535
"keyid": "<KEYID>",
3636
"sig": "<Base64(Sign(PAE([UTF8(PAYLOAD_TYPE), SERIALIZED_BODY])))>"
37-
}, ]
37+
}]
3838
}
3939
```
4040

41-
Empty fields may be omitted. Multiple signatures are allowed.
41+
Empty fields may be omitted. [Multiple signatures](#multiple-signatures) are
42+
allowed.
4243

4344
Definitions:
4445

@@ -150,6 +151,25 @@ This scheme is safe from rollback attacks because the first byte of
150151
SERIALIZED_BODY must be 0x7b (`{`) in backwards compatibility mode and 0x02 in
151152
regular mode.
152153

154+
### Multiple signatures
155+
156+
A file may have more than one signature, which is equivalent to separate files
157+
with individual signatures.
158+
159+
```json
160+
{
161+
"payload": "<Base64(SERIALIZED_BODY)>",
162+
"payloadType": "<PAYLOAD_TYPE>",
163+
"signatures": [{
164+
"keyid": "<KEYID_1>",
165+
"sig": "<SIG_1>"
166+
}, {
167+
"keyid": "<KEYID_2>",
168+
"sig": "<SIG_2>"
169+
}]
170+
}
171+
```
172+
153173
### Optional changes to wrapper
154174

155175
The standard wrapper is JSON with an explicit `payloadType`. Optionally,
@@ -286,7 +306,7 @@ used by TUF and in-toto has a BODY that is a regular JSON object and a signature
286306
"signatures": [{
287307
"keyid": "<KEYID>",
288308
"sig": "<Hex(Sign(CanonicalJson(BODY)))>"
289-
}, ]
309+
}]
290310
}
291311
```
292312

0 commit comments

Comments
 (0)