Sub sets the target to a - b mod M. Target receives a's modulus.
(a, b kyber.Scalar)
| 215 | // Sub sets the target to a - b mod M. |
| 216 | // Target receives a's modulus. |
| 217 | func (i *Int) Sub(a, b kyber.Scalar) kyber.Scalar { |
| 218 | ai := a.(*Int) |
| 219 | bi := b.(*Int) |
| 220 | i.M = ai.M |
| 221 | i.V.Sub(&ai.V, &bi.V).Mod(&i.V, i.M) |
| 222 | return i |
| 223 | } |
| 224 | |
| 225 | // Neg sets the target to -a mod M. |
| 226 | func (i *Int) Neg(a kyber.Scalar) kyber.Scalar { |
no outgoing calls
no test coverage detected