use*_*009 4 hash salt firebase firebase-security firebasesimplelogin
Firebase提供"简单登录",其中使用电子邮件/密码进行身份验证.在存储密码之前,有没有人知道firebase盐和哈希密码?我认为firebase足够了解这一点,但我只是想确定一下,因为经过一个小时的搜索后我找不到任何东西.
预期的后续行动:如果firebase实际上没有加密+哈希密码,那么如果我使用用户密码,盐水+哈希值并将其传递到firebase进行存储/检查,那么简单登录是否有效?
提前致谢!
截至2016年
截至2016年,Firebase使用scrypt的修改版本来加密密码.执行加密库被发布在GitHub上这里.
它使用盐和哈希,如示例所示:
# Params from the project's password hash parameters
base64_signer_key="jxspr8Ki0RYycVU8zykbdLGjFQ3McFUH0uiiTvC8pVMXAn210wjLNmdZJzxUECKbm0QsEmYUSDzZvpjeJ9WmXA=="
base64_salt_separator="Bw=="
rounds=8
memcost=14
# Params from the exported account
base64_salt="42xEC+ixf3L2lw=="
# The users raw text password
password="user1password"
# Generate the hash
# Expected output:
# lSrfV15cpx95/sZS2W9c9Kp6i/LVgQNDNC/qzrCnh1SAyZvqmZqAjTdn3aoItz+VHjoZilo78198JAdRuid5lQ==
echo `./scrypt "$base64_signer_key" "$base64_salt" "$base64_salt_separator" "$rounds" "$memcost" -P <<< "$password"`
Run Code Online (Sandbox Code Playgroud)
预-2016
根据此页面(http://firebase.com/docs/web/guide/simple-login/password.html),Firebase使用bcrypt.
根据bcrypt(http://en.wikipedia.org/wiki/Bcrypt)上的wiki页面,它既有哈希值,也使用盐.