Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out which transcript is authenticated #57

Closed
bemasc opened this issue Apr 1, 2022 · 6 comments · Fixed by #60
Closed

Figure out which transcript is authenticated #57

bemasc opened this issue Apr 1, 2022 · 6 comments · Fixed by #60

Comments

@bemasc
Copy link
Collaborator

bemasc commented Apr 1, 2022

There was some discussion in the TLS session at IETF 113 about whether the Finished message should authenticate the reconstructed TLS transcript (as currently) or the cTLS transcript. We should try to reach a conclusion about this.

Note that, if it is allowed to receive compression templates over an untrusted channel (#56), authenticating the cTLS transcript would presumably require including the compression template in the transcript, to avoid cross-template attacks (e.g. injecting the attacker's key_share without altering the transcript). To avoid hashing JSON (which might be reformatted by intermediary systems), this would probably require defining a compact binary encoding of the JSON template (which I would like to have!).

@richsalz
Copy link

richsalz commented Apr 1, 2022

"compact binary encoding" brings to mind CBOR. I think having a canonical/compat JSON format is beyond the scope of this doc.

@bemasc
Copy link
Collaborator Author

bemasc commented Apr 1, 2022

CBOR is a possibility, but defining a compact, canonical CBOR representation might also be nontrivial. Personally, I would reuse the TLS extensions field format, with numeric key IDs and binary formats defined for each cTLS template element.

@richsalz
Copy link

richsalz commented Apr 1, 2022 via email

@bemasc
Copy link
Collaborator Author

bemasc commented Apr 1, 2022

My main concern about a generic JSON->CBOR conversion is that it is still an inefficient encoding, and I would like to be able to distribute cTLS profiles efficiently. A generic CBOR encoding would still have keys represented as strings, binary values represented in hexadecimal, etc.

Even apart from efficiency, I still have concerns regarding canonicalization. For example, some JSON-handling intermediaries are likely to alter the order of keys in maps, convert integer-valued floats to integers, etc.

@richsalz
Copy link

richsalz commented Apr 1, 2022

I was suggesting cbor as the inter-machine transport. As for keys-as-string, well, you are using json and therefore don't have alternatives.

Maybe use the TLS presentation language. It's already part of TLS stacks, is pretty compact, and canonical.

bemasc pushed a commit that referenced this issue Jun 28, 2022
This is a radical change that attempts to implement the (possible)
consensus to move from a "reconstruction-based" transcript to a
"non-reconstruction" transcript.  Verifying the transcript without
reconstruction requires the transcript to include the template,
which requires a byte-identical representation of the template.
This change makes this possible by introducing a stable binary
representation of the template, with JSON as a human-readable
alternative.

This change also attempts to:
* Clarify the use of cTLS in datagram contexts
 - Including how retransmission works without sequence numbers
* Formalize the notion of when vector lengths can be omitted
* Rearrange the extension templating in a more convenient fashion

Fixes #57
@bemasc
Copy link
Collaborator Author

bemasc commented Jun 28, 2022

I have the impression that the preference is to move to a non-reconstruction handshake. I've written up a (draft) PR that implements that: #60. Unsurprisingly, this is a massive change to the document.

#60 includes the changes from the other two outstanding PRs, so they should be merged first.

bemasc pushed a commit that referenced this issue Jul 1, 2022
This is an intermediate step toward being able to include the
template in the transcript (#60).  It also enables more efficient
distribution of cTLS templates.

See also #57
@bemasc bemasc closed this as completed in #60 Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants