Fast inversion for eight-limb Montgomery fields #
Correctness of the checked inversion of Montgomery/Native64x8InvDefs: invGcdRaw
computes the field inverse and FastField.invGcd is its proof-carrying wrapper. Also
proves the divstep coefficient bound and the mac-width safety of the candidate.
Divstep coefficient bounds #
Unfolding of one divstep.
Transition entries at most double per divstep.
Order from the borrow chain #
Mac-width safety of the candidate #
The division lincomb masks every output limb.
The Montgomery lincomb stays canonical for canonical inputs.
The main loop keeps both tracks at mac width and the Montgomery pair canonical.
The final chunks stay canonical for canonical inputs.
The candidate stays at mac width and canonical.
With the class data, the candidate is bounded and canonical for any bounded input.
The Fermat fallback and the checked raw inversion #
montPow computes acc · xⁿ.
The montPow fallback computes the field inverse.
invGcdRaw computes the field inverse.
The proof-carrying wrapper #
The proof-carrying wrapper of the checked inversion invGcdRaw.