@@ -62,8 +62,11 @@ Parameters:
62
62
(* ) Exception: PAYLOAD_TYPE is unauthenticated if `signature.sigType ==
63
63
"raw-json-no-payload-type"`.
64
64
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.
67
70
68
71
Functions:
69
72
@@ -76,7 +79,7 @@ Functions:
76
79
le64(n) := 64-bit little-endian encoding of `n`, where 0 <= n < 2^63
77
80
```
78
81
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
80
83
out-of-band by the signer and verifier. This specification places no
81
84
restriction on the signature algorithm or format.
82
85
@@ -118,13 +121,13 @@ To verify:
118
121
fails.
119
122
120
123
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.
122
125
123
126
### Backwards compatible signatures
124
127
125
128
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
128
131
valid while avoiding the verifier from having to use [Canonical JSON].
129
132
130
133
```json
@@ -143,7 +146,7 @@ by default.
143
146
144
147
To sign:
145
148
146
- - The message ** must ** be an object type (` {...} ` ).
149
+ - The message ** MUST ** be an object type (` {...} ` ).
147
150
- Serialize the message as [ Canonical JSON] ; call this SERIALIZED_BODY.
148
151
- Sign SERIALIZED_BODY, base64-encode the result, and store it in ` sig ` .
149
152
- Store ` "raw-json-no-payload-type" ` in ` sigType ` .
@@ -160,15 +163,15 @@ To verify:
160
163
decoding or the signature verification fails.
161
164
- Parse SERIALIZED_BODY as a JSON object. Reject if the parsing fails or if
162
165
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
164
167
to be Canonical JSON.
165
168
- Discard ` payloadType ` if present.
166
169
167
170
Backwards compatible signatures are not recommended because they lack the
168
171
authenticated payloadType indicator.
169
172
170
173
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
172
175
regular mode.
173
176
174
177
### Multiple signatures
0 commit comments