Computes the modular multiplicative inverse a modulo N, for given integers a and N.
Namespace: Quantum.OperationsThe multiplicative inverse of a modulo N exists if and only if a and N are coprime (i.e., if gcd(a, N) = 1).
Assembly: Quantum (in Quantum.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
Parameters
- a
- Type: System Int32
Integer for which we wish to get a modular inversion.
- N
- Type: System Int32
The integer N.
Return Value
Type: Int32Value x such that [(a * x) modulo N] equals 1.
See Also