Inv sets the target to the modular inverse of a with respect to modulus M.
(a kyber.Scalar)
| 257 | |
| 258 | // Inv sets the target to the modular inverse of a with respect to modulus M. |
| 259 | func (i *Int) Inv(a kyber.Scalar) kyber.Scalar { |
| 260 | ai := a.(*Int) |
| 261 | i.M = ai.M |
| 262 | i.V.ModInverse(&a.(*Int).V, i.M) |
| 263 | return i |
| 264 | } |
| 265 | |
| 266 | // Exp sets the target to a^e mod M, |
| 267 | // where e is an arbitrary big.Int exponent (not necessarily 0 <= e < M). |
no outgoing calls