File: bls75.h

package info (click to toggle)
libmath-prime-util-gmp-perl 0.52-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,504 kB
  • sloc: ansic: 16,770; perl: 4,530; sh: 162; makefile: 15
file content (36 lines) | stat: -rw-r--r-- 1,347 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef MPU_BLS75_H
#define MPU_BLS75_H

#include <gmp.h>
#include "ptypes.h"

/* extern int _GMP_primality_pocklington(mpz_t n, int do_quick); */

/* Note that the theorem 3 and 15 checks, as well as the splitters:
 *  1) do not do a full proof.  You must verify q.
 *  2) do not indicate compositeness on failure.
 */

/* These will check the theorem conditions for given n and factor. */
/* Check BLS75 theorem  3 conditions */
extern int _GMP_primality_bls_3(mpz_t n, mpz_t p, UV* a);
/* Check BLS75 theorem 15 conditions */
extern int _GMP_primality_bls_15(mpz_t n, mpz_t q, IV* lp, IV* lq);

/* These will try to factor and check the theorem conditions. */
/* BLS75 theorem  3, you must verify q for a proof */
extern int _GMP_primality_bls_nm1_split(mpz_t n, int effort, mpz_t q, UV* a);
/* BLS75 theorem 15, you must verify q for a proof */
extern int _GMP_primality_bls_np1_split(mpz_t n, int effort, mpz_t q, IV* lp, IV* lq);

/* This does a complete recursive proof */
/* BLS75 theorem 5/7 complete proof */
extern int _GMP_primality_bls_nm1(mpz_t n, int effort, char ** prooftextptr);

/* BLS75 theorem 17 complete proof (N+1) */
extern int _GMP_primality_bls_np1(mpz_t n, int effort, char** prooftextptr);

/* BLS75 theorem 20 complete proof (N-1 and N+1) */
extern int bls75_hybrid(mpz_t n, int effort, char** prooftextptr);

#endif