
This change migrates the nigori implementation to the new //crypto/aes_cbc, //crypto/hmac, and //crypto/kdf interfaces, and drops its dependency on the old //crypto/encryptor and //crypto/symmetric_key interfaces. This removes a lot of error cases, forced heap allocations, and copies. In particular: * The user, encryption, and MAC keys are now stored directly in Nigori::Keys as std::arrays, rather than as std::strings wrapped in SymmetricKey objects; * Many cases where the return values of cryptographic primitives were DCHECKed (leading to silent crypto failures in release builds if those primitives failed) are now gone, because the new APIs cannot fail; * Code to deal with byte slices is now spanified throughout; * Code dealing in fixed-size things (such as HMAC outputs) is converted to use std::array instead of std::string, eliminating both a heap allocation and a copy; * A deficiency of the PBKDF2 key derivation method used by Nigori is documented Bug: 372283556 Change-Id: I5808dba55a40324cca616c4d4db51754c0367303 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5974176 Commit-Queue: Elly FJ <ellyjones@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com> Cr-Commit-Position: refs/heads/main@{#1375226}
Chromium
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead,
follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.