-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why Idenity is not used during verifier calculation? #87
Comments
I think it is addressed in https://github.com/midonet/tssrp6a#recommendations
But, I think this might be wrong, exactly the opposite: if included, then the ID cannot be changed. The implementation would need to override The reason for why it's not done by default in the library? We matched the existing java "nimbus" implementation, so I guess there it is not included. Not closing the issue, because I think now we should decide if the library should include identifier in default settings. |
I understand, please keep an update here in case of any changes for this matter. Thank you. Edit: In |
Looking into that, meanwhile I can confirm that the reason we don't include identity is Nimbus: https://github.com/midonet/tssrp6a#notes |
I understand what about this?
Should I change only the |
so I just tested: both will work, independently or together, as long as both client and server match the routine(s). |
Perfect, can we safely say that will be more secure if we add it to both of them? |
class IdentityRoutines extends SRPRoutines { ‣ 1 reference
public async computeIdentityHash(I: string, P: string): Promise<ArrayBuffer> { ‣ 3 references
return await this.hash(stringToArrayBuffer(I), stringToArrayBuffer(P));
}
public async computeClientEvidence( ‣ 3 references
I: string,
s: bigint,
A: bigint,
B: bigint,
S: bigint,
): Promise<bigint> {
return arrayBufferToBigInt(
await this.hash(
stringToArrayBuffer(I),
bigIntToArrayBuffer(s),
bigIntToArrayBuffer(A),
bigIntToArrayBuffer(B),
bigIntToArrayBuffer(S),
),
);
}
} |
I will open a PR to discuss this further, I guess defaulting to including the identity is a major breaking change. |
I will wait for updates, you can close this issue if you see fit. |
I just found this https://github.com/midonet/tssrp6a/blob/master/test/srp6a.test.ts#L14 😅 |
But I'm left wondering about |
I agree, I believe we cannot change it the same way using |
Async is needed when using async crypto APIs, like browser's WebCrypto IIRC. I prefer to have one async implementation instead of one async and one sync. |
I just tested, nimbus fails if computeClientEvidence includes the identity and salt - but I'm not 100% if that is truly related to computeIdentityHash. |
* include identity in computation by default * nimbus test overrides routines to exclude identity * improved documentation in README.md fixes #87
I see, well I do not need browser implementation so I discarted WebCrypto from the code. Yes I just tested that as yell ( |
* include identity in computation by default * nimbus test overrides routines to exclude identity * improved documentation in README.md fixes #87
Why Identity is not used during verifier calculation? According to some posts like this one it is a big security flaw. Also RFC 5054 uses identity during hashing. Is there a reason why the user's identity (username/email) is skipped?
That was found here and here.
The text was updated successfully, but these errors were encountered: