shyrock
V2EX  ›  问与答

关于网易密码的疑问

  •  
  •   shyrock · Apr 2, 2016 · 2540 views
    This topic created in 3869 days ago, the information mentioned may be changed or developed.

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

    5 replies  •  2016-04-02 17:18:54 +08:00
    honeycomb
    honeycomb
    Apr 2, 2016❤️1
    1
    f^n (密码加盐), f^n ( x )是 scrypt 等密钥生成函数多次(数千)迭代
    shyrock
    shyrock
    OP
    Apr 2, 2016
    2
    @honeycomb 我的问题就是,这脱裤拿到数据是怎么拿到的?按理说加了密的密码是没法用来撞库的啊。
    fengxing
    fengxing
    Apr 2, 2016❤️1
    3
    @shyrock 应该是很早就被脱下来的库,洗了 N 多轮才被放出来
    shyrock
    shyrock
    OP
    Apr 2, 2016
    4
    @fengxing 问题是如果加密存储,就算拿到了库,密码是怎么被解出来的?
    honeycomb
    honeycomb
    Apr 2, 2016
    5
    @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.”
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3654 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 05:22 · PVG 13:22 · LAX 21:22 · JFK 00:22
    ♥ Do have faith in what you're doing.