Janek Bevendorff
21a6c0fd89
Fix linker definition clashes between libargon2 and libsodium on Windows
2018-01-14 11:21:17 -05:00
Janek Bevendorff
337a21f6d6
Save AES-KDF round parameter as quint64
2018-01-13 14:25:01 -05:00
Janek Bevendorff
b04c8c2b6e
Explicitly support AES-KDF in KDBX4 and don't convert KDBX4 files with AES-KDF back to KDBX3 when saving
2018-01-13 14:25:00 -05:00
Janek Bevendorff
d327c16904
Increase Argon2 warning threshold and set parallelism default value to number of available processors
2018-01-13 14:24:59 -05:00
Janek Bevendorff
ccfd7a065c
Fix coding style and GUI test
2018-01-13 14:24:57 -05:00
Janek Bevendorff
54fb0d9bd3
Show warning when using inappropriate transform round number
...
Increase default AES-KDF rounds to 100k
2018-01-13 14:24:57 -05:00
Janek Bevendorff
f7d3c90218
Fix compilation error
2018-01-13 14:24:56 -05:00
Jonathan White
bef7ba2cfe
Implements KDBX4 format with Argon2 KDF
...
* Adds KDBX4 reader/writer interfaces
* Adds KDBX4 XML reader/write interfaces
* Implements test cases for KDBX4
* Fully compatible with KeePass2
* Corrects minor issues with Argon2 KDF
2018-01-13 14:24:55 -05:00
Jonathan White
542ee42313
Add Argon2Kdf and enable parameters in db settings
...
Note: This implementation is not yet connected to the
database itself and will corrupt existing kdbx3 db's.
* Implemented memory and parallelism parameters for Argon2Kdf
* Using libargon2; libsodium does not support Argon2d algorithm
* Moved basic rounds parameter into Kdf class
* Reimplemented benchmark algorithm; previous was utterly broken
2018-01-13 14:23:30 -05:00
Jonathan White
61c4fe8992
Formatting and consistency fixes
2018-01-13 14:23:29 -05:00
Janek Bevendorff
4592de8fb6
Make benchmark() method non-virtual
2018-01-13 14:23:28 -05:00
Janek Bevendorff
15648991fc
Refactor Kdf class, remove fields concept
2018-01-13 14:23:28 -05:00
Janek Bevendorff
0d6ca0945b
Reformat code, fix minor style issues, make kdf() getter const
2018-01-13 14:23:27 -05:00
angelsl
e5ec585f98
Use GCRY_MD_FLAG_SECURE in CryptoHash
2018-01-13 14:23:26 -05:00
angelsl
6a0d05e1ef
Add support for various algorithms for kdbx4
...
* Add SHA512 support to CryptoHash
* Add ChaCha20 support
* Add HMAC support
* Add new HmacBlockStream, used in KDBX 4
* Add support for ChaCha20 protected stream
2018-01-13 14:23:26 -05:00
angelsl
33974d710a
Move constants in KeePass2.h to KeePass2.cpp and add a list of KDFs and ciphers
2018-01-13 14:23:25 -05:00
angelsl
663b8dcb08
Remove unused SymmetricCipherSalsa20
2018-01-13 14:23:24 -05:00
angelsl
2e19af5032
Pull out KDFs into their own class hierarchy
...
In preparation for multiple KDFs in KDBX 4
2018-01-13 14:23:20 -05:00
Jonathan White
28ad6ed552
Merge branch 'master' into develop
2017-12-11 21:10:25 -05:00
Michal Kaptur
0ff75e7a88
Fixed memory leaks in non-gui tests
...
Fixed 2 memory leaks in production code and a few in testcases. As a
result leak_check_at_exit ASAN option does not need to turned off for
non-gui tests.
Smart pointers should be used elsewhere for consistency, but the sooner
this fixes are delivered, the lesser memory leaks are introduced.
2017-11-27 23:36:09 +01:00
Toni Spets
248ae9d4ba
SymmetricCipher: Add keySize(), don't rely on state for sizes
...
This additionally makes keySize() and blockSize() work before
setting the key and IV. Required for SSH agent decryption.
2017-11-19 14:38:59 +02:00
Toni Spets
a81a5fa31b
SymmetricCipher: Support CTR mode
...
Includes AES-256-CTR non-stream tests
2017-11-19 14:38:59 +02:00
Peter Nirschl
a895729b9e
🐛 Fix result propagation in SymmetricCipherGcrypt::process
...
The boolean 'ok' has always been set to true, regardless of possible errors.
2017-10-21 20:00:28 +02:00
rockihack
e53754d202
Fix build on mac os with qt 5.9.1
2017-10-03 15:01:54 -04:00
Timothy Redaelli
a01607e869
Add support for Twofish in KeePass2 code
2017-01-28 17:53:11 +01:00
Josh Soref
ca8ddd5f39
spelling: decrypt
2017-01-14 17:31:38 +01:00
Felix Geyer
7c7014d951
Drop obsolete GCRYPT_HAS_SALSA20 ifdef.
2016-10-02 21:44:33 -04:00
Felix Geyer
dc7b6623a9
Merge branch '2.0'
2015-10-11 10:44:30 +02:00
Felix Geyer
316a7e6fb7
Expose version of used libraries in the About dialog.
2015-10-10 17:10:29 +02:00
Felix Geyer
7fa0eddc5f
Make C++11 mandatory.
2015-09-12 13:55:50 +02:00
Felix Geyer
60daa2b41b
Require libgcrypt >= 1.6.0.
...
Remove our own Salsa20 implementation as libgcrypt ships one
with that version.
2015-09-12 13:51:49 +02:00
Felix Geyer
7db9c78855
Ignore libgcrypt errors in CryptoHash::CryptoHash().
...
Postponed until after 2.0 when I'll use excpetions.
Should be safe as we check basic functioning in Crypto::testSha256().
2015-05-14 20:44:17 +02:00
Felix Geyer
ade684d501
Crypto::selfTest(): test AES in ECB mode.
2015-05-10 00:02:08 +02:00
Felix Geyer
e0d4b4b625
Adapt Salsa20 backend to the new interface.
2015-05-09 23:21:50 +02:00
Felix Geyer
f6243675c9
Warn if result of processInPlace() is unchecked.
...
Fix callers accordingly.
2015-05-09 23:21:50 +02:00
Felix Geyer
a762cef0a9
Catch and handle all errors from libgcrypt.
2015-05-09 23:21:44 +02:00
Felix Geyer
a7f4e2d0cd
Add Twofish tests to Crypto::selfTest().
2015-05-09 18:15:01 +02:00
Felix Geyer
e41bf008e9
Use Q_BYTE_ORDER for endianness detection.
...
A hardcoded list of architectures is always incomplete.
2015-05-03 20:00:23 +02:00
Felix Geyer
0d6117bf4c
Do some basic self-checks when initializing the crypto backend.
2014-06-15 11:17:40 +02:00
Felix Geyer
b9370c6e79
More careful null checking and member initalization.
2014-03-22 12:10:49 +01:00
Felix Geyer
2190260a68
Small optimization in SymmetricCipherGcrypt::processInPlace().
2014-01-18 20:47:45 +01:00
Felix Geyer
0b6b149351
Use the libgcrypt SALSA20 cipher if available.
2014-01-12 13:42:56 +01:00
Felix Geyer
8c7e655274
Add compatibility with libgcrypt 1.6.
...
Closes #129
2014-01-12 12:39:39 +01:00
Felix Geyer
5daf0853c9
Coding style fixes.
2013-10-13 18:08:50 +02:00
Felix Geyer
7dde8a771f
Use QUINT32_MAX in tests instead of hardcoding the number.
2013-10-12 19:11:57 +02:00
Felix Geyer
9c788a6e84
Support custom backends in Random.
...
Useful for tests.
2013-10-09 22:06:32 +02:00
Felix Geyer
e087baeb48
Avoid modulo bias in Random::randomUInt().
2013-10-09 21:59:24 +02:00
Felix Geyer
6504b6f2bd
Drop Qt module name from include statements.
...
This is a preparation to be able to build KeePassX against Qt 5.
2013-10-03 15:18:16 +02:00
Felix Geyer
e99e3ae6ca
Initalize SymmetricCipherGcrypt::m_blockSize.
2013-04-29 22:31:50 +02:00
Felix Geyer
ecea101962
Return Q_NULLPTR instead of 0 when the return type is a pointer.
2012-07-23 14:58:57 +02:00