Skip to content

Commit 5525225

Browse files
committed
Merge branch 'master' into sig-type
2 parents f0518cf + 5950b31 commit 5525225

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

specification.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ Parameters:
6262
(*) Exception: PAYLOAD_TYPE is unauthenticated if `signature.sigType ==
6363
"raw-json-no-payload-type"`.
6464

65-
* KEYID is an optional, unauthenticated hint indicating what key was used to
66-
sign the message. It **must not** be used for security decisions.
65+
* KEYID is an optional, unauthenticated hint indicating what key and algorithm
66+
was used to sign the message. As with Sign(), details are agreed upon
67+
out-of-band by the signer and verifier. It **MUST NOT** be used for security
68+
decisions; it may only be used to narrow the selection of possible keys to
69+
try.
6770

6871
Functions:
6972

@@ -76,7 +79,7 @@ Functions:
7679
le64(n) := 64-bit little-endian encoding of `n`, where 0 <= n < 2^63
7780
```
7881
79-
* Sign() is an arbitrary digital signature format. Details must be agreed upon
82+
* Sign() is an arbitrary digital signature format. Details are agreed upon
8083
out-of-band by the signer and verifier. This specification places no
8184
restriction on the signature algorithm or format.
8285
@@ -118,13 +121,13 @@ To verify:
118121
fails.
119122
120123
Either standard or URL-safe base64 encodings are allowed. Signers may use
121-
either, and verifiers must accept either.
124+
either, and verifiers **MUST** accept either.
122125
123126
### Backwards compatible signatures
124127
125128
To convert existing signatures from the current format to the new format,
126-
`"backwards-compatible-json"` must be added to the payload type URI to indicate
127-
that the signature is over the raw payload. This allows the signatures to remain
129+
`"backwards-compatible-json"` is added to the payload type URI to indicate that
130+
the signature is over the raw payload. This allows the signatures to remain
128131
valid while avoiding the verifier from having to use [Canonical JSON].
129132
130133
```json
@@ -143,7 +146,7 @@ by default.
143146

144147
To sign:
145148

146-
- The message **must** be an object type (`{...}`).
149+
- The message **MUST** be an object type (`{...}`).
147150
- Serialize the message as [Canonical JSON]; call this SERIALIZED_BODY.
148151
- Sign SERIALIZED_BODY, base64-encode the result, and store it in `sig`.
149152
- Store `"raw-json-no-payload-type"` in `sigType`.
@@ -160,15 +163,15 @@ To verify:
160163
decoding or the signature verification fails.
161164
- Parse SERIALIZED_BODY as a JSON object. Reject if the parsing fails or if
162165
the result is not a JSON object. In particular, the first byte of
163-
SERIALIZED_BODY must be `{`. Verifiers **must not** require SERIALIZED_BODY
166+
SERIALIZED_BODY **MUST** be `{`. Verifiers **MUST NOT** require SERIALIZED_BODY
164167
to be Canonical JSON.
165168
- Discard `payloadType` if present.
166169

167170
Backwards compatible signatures are not recommended because they lack the
168171
authenticated payloadType indicator.
169172

170173
This scheme is safe from rollback attacks because the first byte of
171-
SERIALIZED_BODY must be 0x7b (`{`) in backwards compatibility mode and 0x02 in
174+
SERIALIZED_BODY is 0x7b (`{`) in backwards compatibility mode and 0x02 in
172175
regular mode.
173176

174177
### Multiple signatures

0 commit comments

Comments
 (0)