TLS: added Encrypt-Then-MAC extension #2811
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist:
toxor,cd test && ./run_tests_py2, cd test && ./run_tests_py3)Description
Added support Encrypt-then-MAC extension for TLS protocol (RFC 7366).
Required and contains #2797 because openssl don't have command line options to disable
Extended-Master-Secred, so test suite contains example with both extensions setted.Implementation only for block ciphers
Encrypt-Then-Macnot supported by AEAD ciphers (according to RFC).For
TLS_PSK_WITH_CHACHA20_POLY1305_SHA256(0xccab) andTLS_RSA_WITH_RC4_128_SHA(0x0005) openssl 1.1.1g does not supportEncrypt-Then-Mac(presents inClientHello, but missed inServerHelloresponse).Same behaviour for GnuTLS 3.6.13 with
TLS_RSA_WITH_RC4_128_SHA(0x0005) andTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256(0xcca8).So it is looks like currently
Encrypt-Then-Macimplemented only for block ciphers.