On Wed, Dec 2, 2015 at 1:07 AM, Bryan Ford <brynosau...@gmail.com> wrote:
> On 02 Dec 2015, at 06:02, Martin Thomson <martin.thom...@gmail.com> wrote: > > On 1 December 2015 at 08:22, Bryan A Ford <brynosau...@gmail.com> wrote: > >> The 2-byte length field in each record's header no longer indicates > >> the length of the *current* record but instead indicates the length of > >> the *next* record. > > > > Ensuring that you know the length of the *next* record is difficult > > and could dramatically degrade latency, or adding extra bogus padding > > or extra bogus records. For instance, I can always send in bursts of > > two packets, a one octet packet that promises the remainder of the > > burst and one that promises a single octet packet. At that point, I > > get to do what I've always done and you have gained little other than > > an increase in packet size of around 19 octets (best case). > > That type of inefficiency is extremely easy to avoid; please read the rest > of my proposal where I discussed exactly that at length. Yes, a > particularly stupid implementation could send everything in bursts of two > packets, but it’s ridiculously easy for a slightly smarter implementation > to avoid doing that. And what you’ve gained is complete encryption and > integrity-checking of the whole TLS record before any part is interpreted, > which seems like a nontrivial security improvement. It's not really clear to me what the anti-traffic-analysis benefit of your proposal is over and above just padding everything to a fixed size. That's certainly far easier for the implementation to do, especially in typical stacks where the application just calls SSL_Write (or whatever) and so there's no obvious API point to provide the "next length", so as a practical matter the stack will very often if not always be in "last block" mode. The primary security improvement of your proposal seems to be that an active attacker can't generate a packet header that will put the TLS implementation in a deadlock state where it's waiting for more data that will never come. This seems of modest value in TLS [0] given that the attacker can cause the connection to be torn down by modifying any packet. I agree, that this is not exactly the same as leaving the connection deadlocked but it still effectively breaks the connection. In addition, I'm not an expert on TCP internals, but can't you also cause a similar deadlock by removing a TCP segment sent to the receiver and then ACKing it to the sender so that there is a gap in the TCP stream? -Ekr [0] This issue doesn't apply to DTLS because the stack will just move onto the next UDP datagram.
_______________________________________________ TLS mailing list TLS@ietf.org https://www.ietf.org/mailman/listinfo/tls