Skip to content

Commit 01870d6

Browse files
committed
Resolve comments from pull request #23.
- Fix typos. - Add TODO to update "current" to "legacy" whenever TUF/in-toto switch to this. - Add "Why not existing TUF/in-toto" to README. - Clean up references to the JSON envelope in protocol.md.
1 parent 0097059 commit 01870d6

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,16 @@ Out of scope (for now at least):
3030
* Why not [JOSE/JWS/JWT](https://jwt.io)? JSON-specific, too complicated, too
3131
easy to mess up.
3232
* Why not [PASETO](https://paseto.io)? JSON-specific, too opinionated.
33+
* Why not the legacy TUF/in-toto signature scheme? JSON-specific, relies on
34+
canonicalization.
3335

3436
See [Background](background.md) for further motivation.
3537

3638
## Who uses it?
3739

40+
<!-- Reminder: once in-toto and TUF switch to this new format, update the rest
41+
of the docs that currently reference the old format as "current", "existing",
42+
etc. -->
43+
3844
* [in-toto](https://in-toto.io) (pending [ITE-5](https://github.com/in-toto/ITE/pull/13))
3945
* [TUF](https://theupdateframework.io) (pending)

background.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ and [in-toto].
1111

1212
There is no other simple, foolproof signature scheme that we are aware of.
1313

14-
* Raw signatures are too fragle. Every public key must be used for exactly one
15-
purpose over exactly one message type, lest the system be vulnerable to
14+
* Raw signatures are too fragile. Every public key must be used for exactly
15+
one purpose over exactly one message type, lest the system be vulnerable to
1616
[confusion attacks](#motivation). In many cases, this results in a difficult
1717
key management problem.
1818

@@ -78,7 +78,7 @@ signed, which the verifier verifies before parsing. This is what is done in
7878

7979
Second, the scheme does not include an authenticated "context" indicator to
8080
ensure that the signer and verifier interpret the payload in the same exact way.
81-
For example, if in-toto were extended to support CBOR and Protobuf encoding, the
81+
For example, if in-toto were extended to support CBOR and protobuf encoding, the
8282
signer could get a CI/CD system to produce a CBOR message saying X and then a
8383
verifier to interpret it as a protobuf message saying Y. While we don't know of
8484
an exploitable attack on in-toto or TUF today, potential changes could introduce

envelope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The standard envelope is JSON message with an explicit `payloadType`.
5858
Optionally, applications may encode the signed message in other methods without
5959
invalidating the signature:
6060

61-
- An encoding other than JSON, such as CBOR or Protobuf.
61+
- An encoding other than JSON, such as CBOR or protobuf.
6262
- Use a default `payloadType` if omitted and/or code `payloadType` as a
6363
shorter string or enum.
6464

protocol.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,14 @@ To sign:
6666
SERIALIZED_BODY.
6767
- Sign PAE(UTF8(PAYLOAD_TYPE), SERIALIZED_BODY). Call the result SIGNATURE.
6868
- Optionally, compute a KEYID.
69-
- Encode and transmit SERIALIZED_BODY, PAYLOAD_TYPE, SIGNATURE, and KEYID.
70-
- In the recommended [JSON envelope](envelope.md), this is
71-
`{"payload": "Base64(SERIALIZED_BODY)", "payloadType": "PAYLOAD_TYPE",
72-
"signatures": [{"keyid": "KEYID", "sig": "Base64(SIGNATURE)"}]}`.
69+
- Encode and transmit SERIALIZED_BODY, PAYLOAD_TYPE, SIGNATURE, and KEYID,
70+
preferably using the recommended [JSON envelope](envelope.md).
7371
7472
To verify:
7573
76-
- Receive and decode SERIALIZED_BODY, PAYLOAD_TYPE, SIGNATURE, and KEYID.
77-
Reject if decoding fails.
74+
- Receive and decode SERIALIZED_BODY, PAYLOAD_TYPE, SIGNATURE, and KEYID, such
75+
as from the recommended [JSON envelope](envelope.md). Reject if decoding
76+
fails.
7877
- Optionally, filter acceptable public keys by KEYID.
7978
- Verify SIGNATURE against PAE(UTF8(PAYLOAD_TYPE), SERIALIZED_BODY). Reject if
8079
the verification fails.

0 commit comments

Comments
 (0)