Big signed (64 * L)-bit integer type, whose variables store
numbers in the two’s complement code as arrays of 64-bit chunks.
The ordering of the chunks in these arrays is little-endian.
The arithmetic operations for this type are wrapping ones
Returns the Jacobi symbol (“n” / “d”) computed by means of the modification
of the Pornin’s method for modular inversion. The arguments are unsigned
big integers in the form of arrays of 64-bit chunks, the ordering of which
is little-endian. The value of “d” must be odd in accordance with the Jacobi
symbol definition. Both the arguments must be less than 2 ^ (64 * L - 31).
For an incorrect input, the behavior of the function is undefined. The
method differs from the Pornin’s method for modular inversion in absence of
the parts, which are not necessary to compute the greatest common divisor of
arguments, presence of the parts used to compute the Jacobi symbol, which
are based on the properties of the modified Jacobi symbol (x / |y|)
described by M. Hamburg, and some original optimizations. Only these
differences have been commented; the aforesaid Pornin’s method and the used
ideas of M. Hamburg were given here: