This is very nice. I think the green on green and blue on blue highlight are a little hard to see.
Every Byte of a TLS Connection Explained and Reproduced
21–30 of 104 posts
Re: Every Byte of a TLS Connection Explained and Reproduced
#22I may make a version where the bytes used for lengths are highlighted, since it feels like so many bytes are lengths; look at the SNI extension, which has three 16-bit lengths, I know why they're there, but SNI probably shouldn't be a list, and even if it was a list, an extension that consists solely of a list has a list of the length of the extension, you shouldn't need two bytes for that, and if we recast sni into just a type and a string, the string is clearly going to take the rest of the extension length, so it doesn't need a two byte length either.
Re: Every Byte of a TLS Connection Explained and Reproduced
#23So does this happen for every single request? or is this based on a single session.
And much of the rest of the records might go away completely if the session were resumed from the client's memory (this wasn't demonstrated here).
Re: Every Byte of a TLS Connection Explained and Reproduced
#24There's a lot of practicality I learned from reading the Go source and implementing my own (e.g. always an array of a single value of 0 for compression method). Now do a version with DTLS (one more message type, couple more fields on existing types, and logic concerning retries). Also, now do a TLS 1.3 one.
Yep, reading the Go source is what inspired me to do this, it's still very compact and readable. I originally used an AEAD cipher but found it was impossible to demonstrate on the command line (openssl enc refuses to do AEAD because it can't confirm the authentication in a streaming context). A friend asked me to demonstrate ALPN in this but as I looked into it I found it was distracting, as there's already so much g…
Since you read the Go source, you might like [0]. I will say I personally think Go could have done better. I think it's too compact, too hidden, too disorganized, too underdocumented, and too inflexible/non-extensible. I began to pick some of it apart for a DTLS impl I started at [1], but have put on temporary hold yesterday due to other work obligations.
0 - https://github.com/cloudflare/tls-tris 1 - https://github.com/cretz/go-dtls
Re: Every Byte of a TLS Connection Explained and Reproduced
#25Beautiful. I recently had to implement two way auth over 1.2 and this would have saved much hair pulling. (and who does TWO way auth over an MPLS connection. Turns out, us).
And don't get me started about the hassles of obtaining signed certificates that are actually usable for client auth...
Re: Every Byte of a TLS Connection Explained and Reproduced
#26Earlier quoted context omitted.
Yep, reading the Go source is what inspired me to do this, it's still very compact and readable. I originally used an AEAD cipher but found it was impossible to demonstrate on the command line (openssl enc refuses to do AEAD because it can't confirm the authentication in a streaming context). A friend asked me to demonstrate ALPN in this but as I looked into it I found it was distracting, as there's already so much g…
> As for 1.3 my next project was going to be implementing it rather than documenting it. Just a throwaway implementation, nothing you'd want to use. Since you read the Go source, you might like [0]. I will say I personally think Go could have done better. I think it's too compact, too hidden, too disorganized, too underdocumented, and too inflexible/non-extensible. I began to pick some of it apart for a DTLS impl I s…
Re: Every Byte of a TLS Connection Explained and Reproduced
#27Re: Every Byte of a TLS Connection Explained and Reproduced
#28Re: Every Byte of a TLS Connection Explained and Reproduced
#29Re: Every Byte of a TLS Connection Explained and Reproduced
#30So does this happen for every single request? or is this based on a single session.
This is what happens under the hood of every ping request.
*Edited an incorrect UDP reference out based on the below comment.