Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1459)

Unified Diff: components/sync/base/nigori.h

Issue 2809853003: Revert of [sync] Fix decryption failure caused by missing user_key (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/base/cryptographer.cc ('k') | components/sync/base/nigori.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/base/nigori.h
diff --git a/components/sync/base/nigori.h b/components/sync/base/nigori.h
index 92c77b4079e07b7867dc54a342656ef68c309ba0..d0088c38ec13852649fdbb2107f2e227d8aac111 100644
--- a/components/sync/base/nigori.h
+++ b/components/sync/base/nigori.h
@@ -41,8 +41,7 @@
// Initialize the client by importing the given keys instead of deriving new
// ones.
- bool InitByImport(const std::string& user_key,
- const std::string& encryption_key,
+ bool InitByImport(const std::string& encryption_key,
const std::string& mac_key);
// Derives a secure lookup name from |type| and |name|. If |hostname|,
@@ -60,9 +59,7 @@
bool Decrypt(const std::string& value, std::string* decrypted) const;
// Exports the raw derived keys.
- bool ExportKeys(std::string* user_key,
- std::string* encryption_key,
- std::string* mac_key) const;
+ bool ExportKeys(std::string* encryption_key, std::string* mac_key) const;
static const char kSaltSalt[]; // The salt used to derive the user salt.
static const size_t kSaltKeySizeInBits = 128;
@@ -71,16 +68,10 @@
static const size_t kHashSize = 32;
static const size_t kSaltIterations = 1001;
- static const size_t kUserIterations = 1002;
static const size_t kEncryptionIterations = 1003;
static const size_t kSigningIterations = 1004;
private:
- // user_key isn't used any more, but legacy clients will fail to import a
- // nigori node without one. We preserve it for the sake of those clients, but
- // it should be removed once enough clients have upgraded to code that doesn't
- // enforce its presence.
- std::unique_ptr<crypto::SymmetricKey> user_key_;
std::unique_ptr<crypto::SymmetricKey> encryption_key_;
std::unique_ptr<crypto::SymmetricKey> mac_key_;
};
« no previous file with comments | « components/sync/base/cryptographer.cc ('k') | components/sync/base/nigori.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698