Pick a [pseudo-]random integer modulo M using bits from the given stream cipher.
(rand cipher.Stream)
| 297 | // Pick a [pseudo-]random integer modulo M |
| 298 | // using bits from the given stream cipher. |
| 299 | func (i *Int) Pick(rand cipher.Stream) kyber.Scalar { |
| 300 | i.V.Set(random.Int(i.M, rand)) |
| 301 | return i |
| 302 | } |
| 303 | |
| 304 | // MarshalSize returns the length in bytes of encoded integers with modulus M. |
| 305 | // The length of encoded Ints depends only on the size of the modulus, |