History

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.

Dave Watson committed 7 years ago

Commit 130b3921 parent fedf2016 files · +154 −43Browse files

Showing the changes to include/uapi/linux (1 of 6 files). Show all

Unified · Split

include/uapi/linux/tls.h+4−0
@@ -51,6 +51,10 @@ · 50 unmodified lines
51#define TLS_1_2_VERSION_MINOR 0x351#define TLS_1_2_VERSION_MINOR 0x3
52#define TLS_1_2_VERSION TLS_VERSION_NUMBER(TLS_1_2)52#define TLS_1_2_VERSION TLS_VERSION_NUMBER(TLS_1_2)
53 53
54#define TLS_1_3_VERSION_MAJOR 0x3
55#define TLS_1_3_VERSION_MINOR 0x4
56#define TLS_1_3_VERSION TLS_VERSION_NUMBER(TLS_1_3)
57
54/* Supported ciphers */58/* Supported ciphers */
55#define TLS_CIPHER_AES_GCM_128 5159#define TLS_CIPHER_AES_GCM_128 51
56#define TLS_CIPHER_AES_GCM_128_IV_SIZE 860#define TLS_CIPHER_AES_GCM_128_IV_SIZE 8