Closed btoms20 closed 1 year ago
@swift-server-bot test this please
@swift-server-bot test this please
Excellent, one quick fixup: can you run scripts/update_cmakelists.sh
and commit the changes?
@swift-server-bot test this please
Awesome! Thanks for guiding me through this PR, I really appreciate all the comments / help. Sorry for taking up so much of your time! 😅
Added a method to interact with BoringSSL's
CCryptoBoringSSL_CRYPTO_chacha_20()
Checklist
Motivation:
Having the ability to explicitly set the Counter in the ChaCha20 Cipher allows us to generate 'Header Protection Masks' as described in RFC 9001 - Using TLS to Secure QUIC and issue #168
Modifications:
Added a single encryption method under the
Insecure.ChaCha20CTR
enum that lets the user of this library perform single block encryptions with an explicitly defined Counter and Nonce / IV.The ChaCha20CTR enum described above is defined in the
_CryptoExtras
product.Result:
After including both
Crypto
and_CryptoExtras
in your project you'll have access to the ChaCha20CTR enum and the associated encryption method that enables one off encryption operations.See the included ChaCha20CTRTests.swift file for usage examples.