关于SRP协议: http://en.wikipedia.org/wiki/Secure_remote_password_protocol 我可以看到会话密钥(K)的生成是完全安全的,但在最后一步中,用户发送K(M)证明.如果网络不安全且midlle中的攻击者捕获了M,他
http://en.wikipedia.org/wiki/Secure_remote_password_protocol
我可以看到会话密钥(K)的生成是完全安全的,但在最后一步中,用户发送K(M)证明.如果网络不安全且midlle中的攻击者捕获了M,他就可以在没有K的情况下进行身份验证.
一点背景众所周知的价值观(事先确定):
n A large prime number. All computations are performed modulo n. g A primitive root modulo n (often called a generator).
用户密码建立为:
x = H(s, P) v = g^x H() One-way hash function s A random string used as the user's salt P The user's password x A private key derived from the password and salt v The host's password verifier
身份验证:
+---+------------------------+--------------+----------------------+ | | Alice | Public Wire | Bob | +---+------------------------+--------------+----------------------+ | 1 | | C --> | (lookup s, v) | | 2 | x = H(s, P) | <-- s | | | 3 | A = g^a | A --> | | | 4 | | <-- B, u | B = v + g^b | | 5 | S = (B - g^x)^(a + ux) | | S = (A · v^u)^b | | 6 | K = H(S) | | K = H(S) | | 7 | M[1] = H(A, B, K) | M[1] --> | (verify M[1]) | | 8 | (verify M[2]) | <-- M[2] | M[2] = H(A, M[1], K) | +---+------------------------+--------------+----------------------+ u Random scrambling parameter, publicly revealed a,b Ephemeral private keys, generated randomly and not publicly revealed A,B Corresponding public keys m,n The two quantities (strings) m and n concatenated S Calculated exponential value K Session key
你的问题的答案:
如您所见,双方根据每个人可用的值分别计算K(=会话密钥).
如果在步骤2中输入的Alice的密码P与她最初用于生成v的密码匹配,那么S的两个值将匹配.
然而,实际的会话密钥K从不通过网络发送,只是证明双方已成功计算出相同的会话密钥.因此,中间人可以重新发送证据,但由于他没有实际的会话密钥,他将无法对截获的数据做任何事情.