code: func modInverse(a, n *big.Int) (ia *big.Int, ok bool) {
  	g := new(big.Int)
  	x := new(big.Int)
  	y := new(big.Int)
  	g.GCD(x, y, a, n)
  	if g.Cmp(bigOne) != 0 {
  		// In this case, a and n aren't coprime and we cannot calculate
  		// the inverse. This happens because the values of n are nearly
  		// prime (being the product of two primes) rather than truly
  		// prime.
  		return
  	}
  
  	if x.Cmp(bigOne) < 0 {
  		// 0 is not the multiplicative inverse of any element so, if x
  		// < 1, then x is negative.
  		x.Add(x, n)
  	}
  
  	return x, true
  }
docs: // modInverse returns ia, the inverse of a in the multiplicative group of prime
  // order n. It requires that a be a member of the group (i.e. less than n).