Skip to content

Conversation

@dangrasso
Copy link

I added java support for the missing parts of the standard SRP-6 protocol
M1 = H(A,B,S)
M2 = H(A,M1,S)
Key = H(S)

@see also: http://www.bouncycastle.org/devmailarchive/msg13267.html

dangrasso added 5 commits September 12, 2013 20:34
add M1, M2, Key and related methods
add M1, M2, Key and related methods
adds calculateM1, calculateM2, calculateKey
javadoc comment fixed
@peterdettman
Copy link
Collaborator

Hi Dan, yes these were left out of the initial implementation as TLS doesn't need them, but we'd be happy to include them.

As to the patch itself, I am concerned about the way the BigInteger values are hashed in your new SRP6Util methods. If you look at some of the other existing methods in SRP6Util you will note that a BigInteger is first converted to an unsigned byte array and then zero-padded to the same size as N, before being sent to the digest. I would assume that similar treatment is required for these new calculations.

It'd be nice if a few test cases were included with the patch too (see core/src/test/java/org/bouncycastle/crypto/test/SRP6Test.java), ideally test data from a reference implementation, or official test vectors if they exist.

@dangrasso
Copy link
Author

you're right! i'll make it consistent with the rest.
Thanks for the good point

Daniele Grasso added 3 commits September 17, 2013 20:08
fixed missing padding of Biginteger during hashes
@cowwoc
Copy link

cowwoc commented May 25, 2014

@peterdettman Are you waiting for anything further?

@peterdettman
Copy link
Collaborator

Finally merged this, with a couple of minor fixes. Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants