Add NewGCMTLS13 for Go TLS 1.3 support #132
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.
Implements
NewGCMTLS13
by extendingNewGCMTLS
and incorporating the logic described in the boringssl implementation at https://github.com/google/boringssl/blob/d1831d78c867ba51b3992ccc213fd201d2f4b0f1/crypto/fipsmodule/cipher/e_aes.c#L1397-L1403.golang/go@4106de9 is in
master
and thego1.22rc1
tag, and it depends on a newNewGCMTLS13
function in the boring backend. I found out about this when it broke our upstream sync CI. It adds crypto/internal/boringNewGCMTLS13
, calling_goboringcrypto_EVP_aead_aes_128_gcm_tls13
. It didn't look all that complicated once I got to the boringssl implementation, so I thought I would try writing this PR.The code comment I added is a little long-winded. It took me a bit to understand how the RFC applied. Maybe it's easier to see for people who are already more familiar with how these funcs are used, and the comment can be cut down.