mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-05 21:47:38 +03:00
Add challenge response to key before transformation, resolves #1060
* Re-implement KDBX4 challenge-response key assembly with transform seed instead of master seed
This commit is contained in:
parent
a6ddc22fb8
commit
df728083cc
5 changed files with 67 additions and 18 deletions
|
@ -255,10 +255,19 @@ void Database::setCompressionAlgo(Database::CompressionAlgorithm algo)
|
|||
m_data.compressionAlgo = algo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set and transform a new encryption key.
|
||||
*
|
||||
* @param key key to set and transform
|
||||
* @param updateChangedTime true to update database change time
|
||||
* @param updateTransformSalt true to update the transform salt
|
||||
* @return true on success
|
||||
*/
|
||||
bool Database::setKey(const CompositeKey& key, bool updateChangedTime, bool updateTransformSalt)
|
||||
{
|
||||
if (updateTransformSalt) {
|
||||
m_data.kdf->randomizeSeed();
|
||||
Q_ASSERT(!m_data.kdf->seed().isEmpty());
|
||||
}
|
||||
|
||||
QByteArray oldTransformedMasterKey = m_data.transformedMasterKey;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue