Fix accumulated index comments in felem_inv for p521
authorRohan McLure <rmclure@linux.ibm.com>
Fri, 25 Nov 2022 03:42:12 +0000 (14:42 +1100)
committerHugo Landau <hlandau@openssl.org>
Mon, 28 Nov 2022 09:53:00 +0000 (09:53 +0000)
commit055d029610712a281aed0c23ddd3c8f4dbf40f80
treee209067bb929f577f697342b6e2499a87a35a717
parentd5e1fe9c04c7eb28e21070e3dfe0d2242504a9bc
Fix accumulated index comments in felem_inv for p521

Comments in felem_inv refer to the logarithm with respect to in of the
element that has just been computed. The last two such annotations are
incorrect. By Fermat's last theorem, we hope to compute in^(p-2) in
GF(2^521-1), as such we expect the final index we reach to be 2^521-3.

CLA: Trivial

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19765)
crypto/ec/ecp_nistp521.c