-
Notifications
You must be signed in to change notification settings - Fork 0
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
[PW_SID:791822] ecc: fix incorrect derivation of compressed points #21
base: workflow
Are you sure you want to change the base?
Conversation
The logic was inversed here and was performing a subtraction if: - Y was even and type == BIT0 - Y was odd and type == BIT1 This is not correct according to the ANSI spec. IWD relied on this API but had matching incorrect logic so things "worked" up until a compressed point needed to be parsed from an source that explicitly specified the type (e.g. an ASN1 DER in DPP). All other uses (PWD/SAE) the point type was only used to force a subtraction so since both locations used the incorrect logic the points would compute correctly.
Fetch PR GitLint Output:
Make Distcheck Build - Configure Make Check Make Check w/Valgrind Incremental Build with patches Output:
Autotest Runner Output:
Clang Build |
c28464c
to
fd645d0
Compare
78034a9
to
08f869b
Compare
c9a5099
to
b0dd515
Compare
10b6ee7
to
e812438
Compare
e812438
to
6387437
Compare
9eaed6a
to
10b055b
Compare
df18c83
to
3d6b335
Compare
3d6b335
to
bdee3ce
Compare
8745764
to
c91f7e5
Compare
c91f7e5
to
e1f93ab
Compare
5cfea4b
to
2517286
Compare
8be0bc3
to
62cb485
Compare
62cb485
to
57c8d67
Compare
57c8d67
to
d078c9c
Compare
d078c9c
to
a96766e
Compare
70750ab
to
108b545
Compare
The logic was inversed here and was performing a subtraction if:
This is not correct according to the ANSI spec. IWD relied on this
API but had matching incorrect logic so things "worked" up until
a compressed point needed to be parsed from an source that
explicitly specified the type (e.g. an ASN1 DER in DPP). All other
uses (PWD/SAE) the point type was only used to force a subtraction
so since both locations used the incorrect logic the points would
compute correctly.
ell/ecc.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)