Skip to content

Conversation

@LinusU
Copy link

@LinusU LinusU commented May 23, 2018

per discussion in LinusU/secure-remote-password#12

This change together with LinusU/secure-remote-password#13 would make these two libraries compatible with each other 🙌

@masihyeganeh
Copy link
Contributor

@LinusU It is padded in Apple's implementation of SRP in CoreCrypto

@LinusU
Copy link
Author

LinusU commented Jun 11, 2018

Are you sure about that? This only touches the padding when calculating M = H(H(N) xor H(g), H(I), s, A, B, K), the padding for k and u are left intact.

It seems like SRP.swift doesn't pad M, and it claims to be compatible with Apple's implementation: LinusU/secure-remote-password#12 (comment)

@masihyeganeh
Copy link
Contributor

In Apple's implementation, these two g and N variables are both bytes, not number and they are the same size. So it is padded by default.

@Lejo1
Copy link

Lejo1 commented Jul 15, 2020

So is this implementation after this change fully RFC 5054 compatible?
Does it pass the test-vectors?

@cocagne
Copy link
Owner

cocagne commented Jul 15, 2020 via email

@Lejo1
Copy link

Lejo1 commented Jul 15, 2020

I tried both branches and the srp.enable_rfc5054() method but it ditn't worked...
I'm trying to get it compatible with https://github.com/est31/csrp-gmp which were able to "do" the test vectors.
So it seems to be a problem here but I'm honestly not sure!

That's also the reason why I'm asking for the test vectors.

About this PR: It generates for me bytes_M with length 20 instead of 16 is this wanted or a side effect?

@cocagne
Copy link
Owner

cocagne commented Jul 17, 2020 via email

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.

4 participants