H(H(prime) ^ H(g), H(I), s, A, B, K)
| 179 | |
| 180 | // H(H(prime) ^ H(g), H(I), s, A, B, K) |
| 181 | BigInteger RemotePassword::clientProof(const char* account, const char* salt, const UCharBuffer& sessionKey) |
| 182 | { |
| 183 | hash.reset(); |
| 184 | hash.processInt(group->prime); |
| 185 | BigInteger n1; |
| 186 | hash.getInt(n1); |
| 187 | |
| 188 | hash.reset(); |
| 189 | hash.processInt(group->generator); |
| 190 | BigInteger n2; |
| 191 | hash.getInt(n2); |
| 192 | n1 = n1.modPow(n2, group->prime); |
| 193 | |
| 194 | hash.reset(); |
| 195 | hash.process(account); |
| 196 | hash.getInt(n2); |
| 197 | |
| 198 | return makeProof(n1, n2, salt, sessionKey); |
| 199 | } |
| 200 | |
| 201 | RemotePassword::~RemotePassword() |
| 202 | { } |