V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
shyrock
V2EX  ›  问与答

关于网易密码的疑问

  •  
  •   shyrock · 2016-04-02 10:09:47 +08:00 · 2009 次点击
    这是一个创建于 2939 天前的主题,其中的信息可能已经有所发展或是发生改变。

    现在的邮箱还是直接存储明文密码进行登录校验的吗?为什么不是 hash 呢?

    5 条回复    2016-04-02 17:18:54 +08:00
    honeycomb
        1
    honeycomb  
       2016-04-02 12:11:18 +08:00   ❤️ 1
    f^n (密码加盐), f^n ( x )是 scrypt 等密钥生成函数多次(数千)迭代
    shyrock
        2
    shyrock  
    OP
       2016-04-02 12:59:06 +08:00
    @honeycomb 我的问题就是,这脱裤拿到数据是怎么拿到的?按理说加了密的密码是没法用来撞库的啊。
    fengxing
        3
    fengxing  
       2016-04-02 15:41:00 +08:00   ❤️ 1
    @shyrock 应该是很早就被脱下来的库,洗了 N 多轮才被放出来
    shyrock
        4
    shyrock  
    OP
       2016-04-02 17:14:35 +08:00
    @fengxing 问题是如果加密存储,就算拿到了库,密码是怎么被解出来的?
    honeycomb
        5
    honeycomb  
       2016-04-02 17:18:54 +08:00
    @shyrock 那些裤应该是没有按照标准要求加密密码

    这里有一个 Android 全盘加密的标准:

    https://source.android.com/security/encryption/

    “ Generate random 16-byte disk encryption key (DEK) and 16-byte salt.
    Apply scrypt to the user password and the salt to produce 32-byte intermediate key 1 (IK1).
    Pad IK1 with zero bytes to the size of the hardware-bound private key (HBK). Specifically, we pad as: 00 || IK1 || 00..00; one zero byte, 32 IK1 bytes, 223 zero bytes.
    Sign padded IK1 with HBK to produce 256-byte IK2.
    Apply scrypt to IK2 and salt (same salt as step 2) to produce 32-byte IK3.
    Use the first 16 bytes of IK3 as KEK and the last 16 bytes as IV.
    Encrypt DEK with AES_CBC, with key KEK, and initialization vector IV.”
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4968 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 05:39 · PVG 13:39 · LAX 22:39 · JFK 01:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.