I was going through the TLS support over SCTP rfc, where i could see the spec quoting that the TLS handshake has to be done over every bidirectional streams before initiating message transfer over the transport.
5. Connections and Bi‐directional Streams
TLS makes use of a bi‐directional stream by establishing a connection over it. This means that the number of connections for an association is limited by the number of bi‐directional streams. The TLS handshake protocol is used on each bi‐directional stream separately.
So if i have 5 SCTP bidirectional streams opened, does it mean i have to do the key exchange, certificate validation etc. seperately on each of the 5 bidirectional streams ?
I am asking this because i find it so odd that the protocol design wants the developer to repeat TLS handshake on each stream, even though the socket opened is just one, and its the same handshake being done over each of the streams opened.
I also tried writing a sample TLS over SCTP code, where TLS handshake was done over stream 0, and i was able to do the data transfer over all the 5 streams.
So is it some spec mandatory stuff to be done? what happens if i do the handshake over just one stream and data transfer over all the associated streams ? is there any security vulnerability associated ?
Someone please enlighten me on this.