- 125731AB93CC7040A8516735C40563958A82EF0484E0F9DF9BC60E33225E39BF919D5F6B277421FED43047FA2B2185C0244378C5568A3623674E8B4ABB015168
+ 992C1ED9B3037031C841DB0BB5D6467D2142ACCE1E9B67DDF91D1661D7A9731452D2F2D95222AAC51EE7672A781FD2BB195692D3949E14EAF46B8E29D2243FE0
eucrypt/smg_rsa/primegen.c
(135 . 8)(135 . 11)
17 * loop until a prime is found: get noctets of random bits, trim and apply 110...01 mask, check if prime
18 */
19 unsigned char *p = xmalloc( noctets );
20 int nread;
21 do {
22 get_random_octets_from( noctets, p, entropy_source );
23 do {
24 nread = get_random_octets_from( noctets, p, entropy_source );
25 } while ( nread != noctets );
26 mpi_set_buffer( output, p, noctets, 0); /* convert to MPI representation */
27 mpi_set_highbit( output, nbits - 1 ); /* trim at required size and set top bit */
28 mpi_set_bit( output, nbits - 2); /* set second top bit */