summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/sql/schema.sql8
1 files changed, 7 insertions, 1 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql
index 09b334f9..32561dc9 100644
--- a/util/sql/schema.sql
+++ b/util/sql/schema.sql
@@ -368,9 +368,15 @@ CREATE TABLE users (
-- First 9 bytes: salt (ASCII)
-- Latter 20 bytes: sha1(hex(token) + salt)
-- 'token' is a sha1 digest obtained from random data.
- -- * 41 bytes: Hashed/salted password
+ -- * 41 bytes: sha256 password
-- First 9 bytes: salt (ASCII)
-- Latter 32 bytes: sha256(global_salt + password + salt)
+ -- * 46 bytes: scrypt password
+ -- 4 bytes: N (big endian)
+ -- 1 byte: r
+ -- 1 byte: p
+ -- 8 bytes: salt
+ -- 32 bytes: scrypt(passwd, global_salt + salt, N, r, p, 32)
-- * Anything else: Invalid, account disabled.
passwd bytea NOT NULL DEFAULT '',
registered timestamptz NOT NULL DEFAULT NOW(),