Michael Brown 80e98dc0d1 [crypto] Verify that weierstrass_multiply() result is not point at infinity
The point at infinity cannot be represented in affine coordinates, and
so cannot be returned as a valid result from weierstrass_multiply().

The implementation uses projective coordinates internally, in which a
point at infinity is represented by a zero Z-coordinate.  Treat a zero
Z-coordinate as an invalid result.

The projective coordinates are calculated modulo 4N, and so a zero
value may be represented as 0, N, 2N, or 3N.  To minimise code size,
defer the test until after inverting the Z co-ordinate via Fermat's
little theorem via bigint_mod_exp_ladder() (which will calculate the
inverse of zero as zero, and will always produce a result strictly
modulo N).

Defer the test further until after converting the result back to
affine coordinates, to allow the debug message showing the
multiplication result to be printed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2025-12-05 15:10:22 +00:00
2025-08-06 13:31:00 +01:00
2015-02-26 17:59:53 +00:00
2010-05-28 00:03:47 +01:00

iPXE README File

Quick start guide:

   cd src
   make

For any more detailed instructions, see http://ipxe.org
Description
No description provided
Readme 116 MiB
Languages
C 97.3%
Assembly 1.5%
Perl 0.6%
Makefile 0.3%
Python 0.2%