Is K computed properly?
Issue #26
resolved
The code for computing K is:
public BigInteger computeK(final MessageDigest digest,
final BigInteger N,
final BigInteger g) {
return hashPaddedPair(digest, N, N, g);
}
hashPaddedPair pads both the 3rd (N) and 4th (g) argument.
However, RFC5054 says the following:
k = SHA1(N | PAD(g))
In the RFC, only g is padded however in the library both N and g are padded.
Is this incorrect or am I missing something?
Comments (2)
-
reporter -
reporter - changed status to resolved
N == PAD(N)
- Log in to comment
Related issue: https://github.com/midonet/tssrp6a/issues/55