mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-25 15:55:38 -04:00
Replace "Master Key" with "Database Credentials"
Definitions: * Database Key - Cryptographic hash used to perform encrypt/decrypt of the database. * Database Credentials - User facing term to refer to the collection of Password, Key File, and/or Hardware Key used to derive the Database Key. Changes: * Remove the term "master" and "key" from the user's lexicon and clarify the code base based on the definitions above. * Clean up wording in the UI to be clearer to the end user.
This commit is contained in:
parent
60bb593228
commit
3b459813ed
45 changed files with 162 additions and 162 deletions
|
@ -50,13 +50,13 @@ bool Kdbx4Reader::readDatabaseImpl(QIODevice* device,
|
|||
|
||||
bool ok = AsyncTask::runAndWaitForFuture([&] { return db->setKey(key, false, false); });
|
||||
if (!ok) {
|
||||
raiseError(tr("Unable to calculate master key: %1").arg(db->keyError()));
|
||||
raiseError(tr("Unable to calculate database key: %1").arg(db->keyError()));
|
||||
return false;
|
||||
}
|
||||
|
||||
CryptoHash hash(CryptoHash::Sha256);
|
||||
hash.addData(m_masterSeed);
|
||||
hash.addData(db->transformedMasterKey());
|
||||
hash.addData(db->transformedDatabaseKey());
|
||||
QByteArray finalKey = hash.result();
|
||||
|
||||
QByteArray headerSha256 = device->read(32);
|
||||
|
@ -71,7 +71,7 @@ bool Kdbx4Reader::readDatabaseImpl(QIODevice* device,
|
|||
}
|
||||
|
||||
// clang-format off
|
||||
QByteArray hmacKey = KeePass2::hmacKey(m_masterSeed, db->transformedMasterKey());
|
||||
QByteArray hmacKey = KeePass2::hmacKey(m_masterSeed, db->transformedDatabaseKey());
|
||||
if (headerHmac != CryptoHash::hmac(headerData, HmacBlockStream::getHmacKey(UINT64_MAX, hmacKey), CryptoHash::Sha256)) {
|
||||
raiseError(tr("Invalid credentials were provided, please try again.\n"
|
||||
"If this reoccurs, then your database file may be corrupt.") + " " + tr("(HMAC mismatch)"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue