- 54AFE77A6A278EB793ECF8CA19CD3B1DEC64AE9D59826DCAD3ABC4DF46C0C3BC7A16E178A05690BF930C1935A94DD12EB635E6D37B4F6F89CB478FD92A2A0B7A
+ 69ED0DE509C413D6E911966E2E60DE118D6D8DB4516AC444FEC119C08576153246DA0F6AA27DDFCFE3398290A93E000C4A4B6F296B452ED3DDFE406660247708
eucrypt/smg_rsa/include/smg_rsa.h
(39 . 6)(39 . 30)
119 */
120 int get_random_octets_from(int noctets, unsigned char *out, int from);
121
122 /*********primegen.c*********/
123
124 /*
125 * This is an implementation of the Miller-Rabin probabilistic primality test:
126 * checking the specified number of randomly-chosen candidate witnesses
127 * (i.e. with an outer bound of (1/4)^nwitnesses).
128 * NB: a 1 result from this test means that the given n is indeed composite (non-prime)
129 but a 0 result does not fully guarantee that n is prime!
130 If this doesn't make sense to you, read more on probabilistic primality tests.
131 * @param n the candidate prime number;
132 the function will investigate whether this number is composite or *likely* to be prime.
133 How likely? It depends on the number of witnesses checked, see next parameter.
134 * @param nwitnesses this is the number of randomly chosen candidate witnesses to the compositeness of n
135 that will be checked; the outer bound of the algorithm depends on this.
136 * @param entropy_source the source of entropy (ready to read from) that will be used
137 to choose candidate witnesses to the compositeness of n.
138 * @return 1 if at least one witness to the compositeness of n has been found
139 (i.e. n is certainly composite);
140 0 if no witness to the compositeness of n was found (i.e. it is likely that n is prime)
141 * NB: the probability that n is *not* prime although this function returned 0 is
142 less than (1/4)^nwitnesses, but it is NOT zero.
143 */
144 int is_composite( MPI n, int nwitnesses, int entropy_source);
145
146
147 #endif /*SMG_RSA*/
148