ModInverse calls (big.Int).ModInverse.
(g, n *BigInt)
| 659 | |
| 660 | // ModInverse calls (big.Int).ModInverse. |
| 661 | func (z *BigInt) ModInverse(g, n *BigInt) *BigInt { |
| 662 | var tmp1, tmp2, tmp3 big.Int //gcassert:noescape |
| 663 | zi := z.inner(&tmp1) |
| 664 | if zi.ModInverse(g.inner(&tmp2), n.inner(&tmp3)) == nil { |
| 665 | return nil |
| 666 | } |
| 667 | z.updateInner(zi) |
| 668 | return z |
| 669 | } |
| 670 | |
| 671 | // ModSqrt calls (big.Int).ModSqrt. |
| 672 | func (z *BigInt) ModSqrt(x, p *BigInt) *BigInt { |