You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having a compatibility issue with another library, similar to Issue #198 . The shared key obtained isn't the expected one.
So, in order to determine which one is correct, I have tested against the Test vector provided by the RFC: https://www.rfc-editor.org/rfc/rfc7748#section-6.1
It seems your library doesn't provide the expected value.
I attach the code I used for testing in case my test is wrongly implemented:
I have tried to debug the issue and it seems that the public keys are not validated (while they are the ones provided by the test vector in the spec), in
If we avoid the validation (commenting it) the test obviously doesn't pass: you get a derived secret which is not the same in both cases and not equal to expected value.
The text was updated successfully, but these errors were encountered:
Hi,
I am having a compatibility issue with another library, similar to Issue #198 . The shared key obtained isn't the expected one.
So, in order to determine which one is correct, I have tested against the Test vector provided by the RFC:
https://www.rfc-editor.org/rfc/rfc7748#section-6.1
It seems your library doesn't provide the expected value.
I attach the code I used for testing in case my test is wrongly implemented:
I have tried to debug the issue and it seems that the public keys are not validated (while they are the ones provided by the test vector in the spec), in
elliptic/lib/elliptic/ec/key.js
Line 103 in 43ac7f2
The validation fails on the validation of the montgomery curve:
elliptic/lib/elliptic/curve/mont.js
Line 25 in 43ac7f2
If we avoid the validation (commenting it) the test obviously doesn't pass: you get a derived secret which is not the same in both cases and not equal to expected value.
The text was updated successfully, but these errors were encountered: