Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
=Corey Hulen
e0bc27a3b4 Adding ability to upgrade postgres schema 2015-08-27 16:01:17 -07:00
JoramWilander
c45cf5514f update our postgresql index check to work with 9.2+ versions of postgresql 2015-07-28 12:42:17 -04:00
=Corey Hulen
5b0d2dd8f9 Fixing merges for latest postgres 2015-07-23 10:15:53 -08:00
=Corey Hulen
848eeeeef4 fixing merge conflicts 2015-07-21 12:26:27 -08:00
hmhealey
c09f1b9e4e Renamed FullName column in database to Nickname. Renamed all serverside references from FullName to Nickname. 2015-07-17 15:13:24 -04:00
=Corey Hulen
34d56294a2 Patching remainder of the sql stmts to work with postgres 2015-07-12 19:28:58 -08:00
=Corey Hulen
ff21a5c75f Fixes mm-1420 adding postgres support 2015-07-12 19:24:48 -08:00
nickago
c84baf230c Updated database schema for full utf8 compatibility 2015-07-09 08:34:36 -07:00
=Corey Hulen
34fb817a4a Fixing unit tests 2015-07-06 00:50:42 -08: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
=Corey Hulen
56e74239d6 first commit 2015-06-14 23:53:32 -08:00