1

I'm implementing a TLS-like prototype (for academical pruposes), and I've several problems in the handshake.

After the ClientHello, the server sends 3 frames in a row (ServerHello, ServerKeyExchangeand ServerHelloDone), and the client can't catch every one of them.

I also saw in the Wikipedia page of TLS that server handshake messages (these 3 frames) can be combined in a single "record".

The first question that comes to my mind is : Why combinig them ? To make bigger frames ?

Let's say in my case I automatically concatenate the 3 frames in 1, to ease the reception of all these messages. In my case, that would lead to a frame of ~700 bytes.

My second question is : Could this "combining" bring security breaches ? Could someone take advantage of having all the information in one frame ? We agree that the system is secure when the frames are separated, the question is just on the concatenation of the frames.

3

The first question that comes to my mind is : Why combinig them ? To make bigger frames ?

If you use a single frame containing 3 messages instead of 3 frames each containing a single message the overhead is smaller.

After the ClientHello, the server sends 3 frames in a row (ServerHello, ServerKeyExchangeand ServerHelloDone), and the client can't catch every one of them.

Since this is a TCP stream messages cannot be lost. It looks more like your client is doing the receiving of the messages in a wrong way. Often this means that the client is implemented to expect exactly a single message with a single read, but these can be even half messages etc because TCP is a stream and not a message protocol.

My second question is : Could this "combining" bring security breaches ?

The information exchanged are the same. It only matters how much frames you need to transfer the information if somebody is unable to get all the data. But again this would be usually only because of a buggy design of the client/attacker and not a problem of the protocol.

  • The system I'm implementing uses only the principles of TLS, but on lower layers... Ok I think I'm gonna merge all these 3 messages in 1 frame... Thanks ! :) – EisenHeim Oct 9 '15 at 8:11
  • 1
    @EisenHeim: TLS sits on top of TCP. Even lower would be only IP directly (use IPSec there). If you want to base something on UDP instead use DTLS. Don't invent your own security protocol because the chance is very high that it will be insecure. – Steffen Ullrich Oct 9 '15 at 8:13
  • I'm very aware of that and you will find it odd, but I'm working on Layer 2 only. It's for specific application. But it wasn't the point of my question ;) – EisenHeim Oct 9 '15 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.