Add sets the target to a + b mod M, where M is a's modulus..
(a, b kyber.Scalar)
| 205 | |
| 206 | // Add sets the target to a + b mod M, where M is a's modulus.. |
| 207 | func (i *Int) Add(a, b kyber.Scalar) kyber.Scalar { |
| 208 | ai := a.(*Int) |
| 209 | bi := b.(*Int) |
| 210 | i.M = ai.M |
| 211 | i.V.Add(&ai.V, &bi.V).Mod(&i.V, i.M) |
| 212 | return i |
| 213 | } |
| 214 | |
| 215 | // Sub sets the target to a - b mod M. |
| 216 | // Target receives a's modulus. |
no outgoing calls