Re: [PATCH v2 1/2] ecc: fix incorrect derivation of compressed points
Denis Kenzior <[email protected]> Wed, 11 Oct 2023 09:55:56 -0500
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
Hi James, On 10/10/23 09:25, James Prestwood wrote: > 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. > --- > ell/ecc.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > Both applied, thanks. Regards, -Denis