Commit Graph

15 Commits

Author SHA1 Message Date
=Corey Hulen
9261b1ec62 fixing timming test 2015-07-05 09:33:08 -08:00
Corey Hulen
5e204030ff Merge pull request #62 from jedisct1/authenticated-encryption
SQL store: use authenticated encryption
2015-06-30 20:17:32 -08:00
nickago
bcc31b714b Added the ability to have hashtags with dashes in them 2015-06-30 11:57:57 -07:00
JoramWilander
366557b101 rebase touch-ups 2015-06-29 08:10:59 -04:00
JoramWilander
5ebeaffe64 fix more indenting 2015-06-29 07:45:12 -04:00
JoramWilander
b3168a6db8 fix indenting 2015-06-29 07:45:12 -04:00
JoramWilander
2b4888d062 fixes mm-1316 improves channel notifications UI and updates channellist etag 2015-06-29 07:45:12 -04:00
Frank Denis
34d688ca72 SQL store: use authenticated encryption
Data were encrypted using AES-CFB, with a properly randomized IV,
but without any authenticators. This allows the data to be tampered
with, without being noticed by the application.

This diff slightly changes the encryption/decryption functions in
sql_store.go to add a HMAC-SHA256 authenticator to encrypted messages.

Two keys are derived from AtRestEncryptKey: the first half of
SHA512(AtRestEncryptKey) for the block cipher and the second half for
the MAC. This can be changed to a KDF if needed.

The decryption function also checks that base64 decoding actually
worked, and that the ciphertext is long enough to include the IV and
the MAC.

Unfortunately, it breaks backward compatibility. But if such a change
has to be made, it has to be made early.
2015-06-24 16:56:57 +02:00
JoramWilander
799215ee22 move valet feature switch to DB from config 2015-06-17 12:07:35 -04:00
=Corey Hulen
fdb3f15274 fixing unit test 2015-06-16 10:16:26 -08:00
=Corey Hulen
dae0340d7d fixing unit test 2015-06-16 10:16:26 -08:00
=Corey Hulen
e521bfc076 changing unit test 2015-06-16 10:15:00 -08:00
=Corey Hulen
aa9992671e changing unit test 2015-06-16 10:15:00 -08:00
=Corey Hulen
56e74239d6 first commit 2015-06-14 23:53:32 -08:00
=Corey Hulen
cf7a05f80f first commit 2015-06-14 23:53:32 -08:00