ExpModuloExtension InversionModulo Method A Sandcastle Documented Class Library
Computes the modular multiplicative inverse a modulo N, for given integers a and N.

The multiplicative inverse of a modulo N exists if and only if a and N are coprime (i.e., if gcd(a, N) = 1).

Namespace: Quantum.Operations
Assembly: Quantum (in Quantum.dll) Version: (

public static int InversionModulo(
	int a,
	int N

Return Value

Type: Int32
Value x such that [(a * x) modulo N] equals 1.
See Also