Commit graph

22 commits

Author SHA1 Message Date
Andrej Kacian
8fc7e7cd73 Remove an obsolete comment in password.c. 2016-07-31 14:02:15 +02:00
Andrej Kacian
8959d16e49 Remove the (now unused) master_passphrase_change plugin function. 2016-07-28 13:12:03 +02:00
Andrej Kacian
54ce0e858a Use PBKDF2 to derive encryption key for passwords.
...instead of my previous hash-then-xor nonsense.
2016-05-24 18:30:44 +02:00
Andrej Kacian
f7b5405def Moved getting random bytes into a separate get_random_bytes() function. 2016-05-20 12:30:57 +02:00
Andrej Kacian
e630ef9df0 Show duration of PBKDF2 computation in debug output. 2016-04-11 18:30:18 +02:00
Andrej Kacian
5b146e9eaa Close PRNG source after reading our PBKDF2 salt from it. 2016-04-08 14:50:45 +02:00
Andrej Kacian
ffd418aaa7 Use PBKDF2 with HMAC-SHA1 for master passphrase in clawsrc.
The 64 bytes long key derivation is stored in 'master_passphrase'
pref, together with number of rounds used in its computation.

Introducing also two new common prefs:
master_passphrase_salt - holds a randomly generated 64 bytes
  for use as salt with PBKDF2. Base64-encoded.
master_passphrase_pbkdf2_rounds - number of rounds (or
  iterations) for next passphrase key derivation

The latter can be tweaked by user in case they want to use more
or less rounds, e.g. if they're running on weaker hardware and
KD with default number of rounds takes too long.
2016-04-08 10:05:37 +02:00
Ricardo Mones
189829e2c2 Remove dead code when the #ifndef is true 2016-03-25 01:23:18 +01:00
Andrej Kacian
0970a98384 Fix crash in rare corner case in password en/decryption. 2016-03-24 08:43:58 +01:00
Andrej Kacian
d643604a31 Use a hardcoded IV length in password encryption.
...since we can't count on having GnuTLS new enough to have
gnutls_cipher_get_iv_size().
2016-03-23 17:13:43 +01:00
Andrej Kacian
b65e731a4f Use SHA-256 for master_passphrase_hash, since SHA-512 is too new. 2016-03-23 15:17:04 +01:00
Andrej Kacian
a7a70c6aa5 Removed a forgotten debug line. 2016-03-19 20:14:40 +01:00
Andrej Kacian
499c9fec4d "Master password" is now called "master passphrase".
This is to help diferentiate between passwords coming from
accounts, plugins, etc., and the master passphrase used in
an AES encryption key for encrypting these passwords.
2016-03-03 19:10:47 +01:00
Andrej Kacian
caa44e52c9 Make accounts use new password store for their passwords. 2016-03-01 20:51:54 +01:00
Andrej Kacian
1b12986566 Upon master password change, ask for old password immediately. 2016-03-01 19:44:25 +01:00
Andrej Kacian
5bef3aeced Made the gnutls password encryption work on Win32. 2016-02-20 00:28:40 +01:00
Andrej Kacian
77971f2acb Revert "Made the gnutls password encryption work on Win32."
This reverts commit 18ccbd586f.
I committed more than I expected, files in po/ snuck in, sorry!
2016-02-20 00:28:07 +01:00
Andrej Kacian
18ccbd586f Made the gnutls password encryption work on Win32. 2016-02-20 00:21:40 +01:00
Colin Leroy
07c4154426 Add a plugin method to allow updating stored passwords on master password change.
GData is still untested.
2016-02-11 14:32:44 +01:00
Andrej Kacian
f181179416 Added "Forget master password" mainwindow menu entry. 2016-02-07 20:07:03 +01:00
Andrej Kacian
fb564a461e Forget entered master password before trying to change it.
This makes sure the user always has to input current master
password before he is allowed to change it.
2016-02-07 19:51:20 +01:00
Andrej Kacian
54adfb433b Rewritten account passwords handling.
Passwords are only decrypted before their actual use, not
while loading from accountrc.
Passwords are stored as "{algorithm}base64encodedciphertext",
encrypted using AES-CBC cipher, with PASSCRYPT_KEY used as
and encryption key.
Optionally, the encryption key, also known as "master password"
can be changed by user.
2016-02-04 22:04:48 +01:00