Lines Matching defs:seed
93 /* deterministically generate from seed/idx a string of buflen pseudorandom bytes */
94 static void det_randomize(void *buf, size_t buflen, const void *seed, size_t seedlen, uint32_t idx) {
101 gcry_md_write(hd, seed, seedlen);
123 /* deterministically generate from seed/idx a prime of length `bits' that is 3 (mod 4) */
124 static gcry_mpi_t genprime3mod4(int bits, const void *seed, size_t seedlen, uint32_t idx) {
132 det_randomize(buf, buflen, seed, seedlen, idx);
143 /* deterministically generate from seed/idx a quadratic residue (mod n) */
144 static gcry_mpi_t gensquare(const gcry_mpi_t n, const void *seed, size_t seedlen, uint32_t idx, unsigned secpar) {
149 det_randomize(buf, buflen, seed, seedlen, idx);
254 void FSPRG_GenMK(void *msk, void *mpk, const void *seed, size_t seedlen, unsigned _secpar) {
264 if (!seed) {
266 seed = iseed;
270 p = genprime3mod4(secpar / 2, seed, seedlen, RND_GEN_P);
271 q = genprime3mod4(secpar / 2, seed, seedlen, RND_GEN_Q);
294 void FSPRG_GenState0(void *state, const void *mpk, const void *seed, size_t seedlen) {
302 x = gensquare(n, seed, seedlen, RND_GEN_X, secpar);
340 void FSPRG_Seek(void *state, uint64_t epoch, const void *msk, const void *seed, size_t seedlen) {
353 x = gensquare(n, seed, seedlen, RND_GEN_X, secpar);