| Aleksandr Lenin on Tue, 27 Mar 2018 13:41:54 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Random bitstring generation in PARI library |
Hello, what is the procedure to generate a random k-bit number, where k is greater than BITS_IN_LONG? Reading through the manual (https://pari.math.u-bordeaux.fr/pub/pari/manuals/2.10.0/libpari.pdf) I managed to find only pari_rand, random_bits, random_Fl which return an (unsigned) long, and I need a bigger number. The function randomi indeed returns a GEN, but in the range 1..p-1, but I need a random bitstring of length k. Could you please recommend any procedure how to accomplish this task in PARI library? -- With kind regards, Aleksandr