]> git.baikalelectronics.ru Git - kernel.git/commit
net: tls: Add tls 1.3 support
authorDave Watson <davejwatson@fb.com>
Wed, 30 Jan 2019 21:58:31 +0000 (21:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2019 23:00:55 +0000 (15:00 -0800)
commita1e61f9d1514f0563b80f2cb1d37bfea049e3f31
tree99a8b337cdf5fcb3f23374b3100ed8e3ea295e19
parente703a66e4215c7e399f97cd084925c71ac70c356
net: tls: Add tls 1.3 support

TLS 1.3 has minor changes from TLS 1.2 at the record layer.

* Header now hardcodes the same version and application content type in
  the header.
* The real content type is appended after the data, before encryption (or
  after decryption).
* The IV is xored with the sequence number, instead of concatinating four
  bytes of IV with the explicit IV.
* Zero-padding:  No exlicit length is given, we search backwards from the
  end of the decrypted data for the first non-zero byte, which is the
  content type.  Currently recv supports reading zero-padding, but there
  is no way for send to add zero padding.

Signed-off-by: Dave Watson <davejwatson@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tls.h
include/uapi/linux/tls.h
net/tls/tls_device.c
net/tls/tls_device_fallback.c
net/tls/tls_main.c
net/tls/tls_sw.c