commit | 0eda639cb78a5cf0b479910d8c9a039e47ad36fe | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Tue Sep 24 10:59:03 2024 -0400 |
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Oct 01 22:24:03 2024 +0000 |
tree | 13ad5b54b4bf4b11c41d5be7c55e2ba265536b63 | |
parent | 81345b84505e9c23c156b2c7a1e655a204bd3e9a [diff] |
Fix the endianness of DTLS 1.3 ChaCha20 record number encryption The spec is a little bit unclear, but it passes the counter portion as bytes: > Mask = ChaCha20(sn_key, Ciphertext[0..3], Ciphertext[4..15]) And then RFC 8439 says: > A 32-bit block count parameter, treated as a 32-bit little-endian > integer. So I believe this means that, formally, the block count parameter is a [4]uint8, not a uint32, and then ChaCha20 internally reads it as little-endian. Our API takes a uint32, so it is the caller's responsibility to pick little-endian. This also matches the QUIC construction. While I'm here, avoid an unnecessary two-byte allocation on every DTLS 1.3 record decryption. Functions like these generally can generally work in-place. Bug: 42290594 Change-Id: I879944ca533d37a1599d2170a00193caecd01f42 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/71547 Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: Bob Beck <bbe@google.com> Auto-Submit: David Benjamin <davidben@google.com>
BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.
BoringSSL arose because Google used OpenSSL for many years in various ways and, over time, built up a large number of patches that were maintained while tracking upstream OpenSSL. As Google's product portfolio became more complex, more copies of OpenSSL sprung up and the effort involved in maintaining all these patches in multiple places was growing steadily.
Currently BoringSSL is the SSL library in Chrome/Chromium, Android (but it's not part of the NDK) and a number of other apps/programs.
Project links:
To file a security issue, use the Chromium process and mention in the report this is for BoringSSL. You can ignore the parts of the process that are specific to Chromium/Chrome.
There are other files in this directory which might be helpful: