3
Purpose: Pseudoprimality testing routines
4
Author: M. J. Fromberger <http://spinning-yarns.org/michael/>
5
Info: $Id: iprime.h 635 2008-01-08 18:19:40Z sting $
7
Copyright (C) 2002-2008 Michael J. Fromberger, All Rights Reserved.
9
Permission is hereby granted, free of charge, to any person
10
obtaining a copy of this software and associated documentation files
11
(the "Software"), to deal in the Software without restriction,
12
including without limitation the rights to use, copy, modify, merge,
13
publish, distribute, sublicense, and/or sell copies of the Software,
14
and to permit persons to whom the Software is furnished to do so,
15
subject to the following conditions:
17
The above copyright notice and this permission notice shall be
18
included in all copies or substantial portions of the Software.
20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
24
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
/* Test whether z is likely to be prime
40
MP_YES means it is probably prime
41
MP_NO means it is definitely composite
43
mp_result mp_int_is_prime(mp_int z);
45
/* Find the first apparent prime in ascending order from z */
46
mp_result mp_int_find_prime(mp_int z);
51
#endif /* IPRIME_H_ */