7 mpz_t q
; //curve defined over F_q
8 mpz_t n
; //has order n (= q - t + 1) in F_q (and r^2 in F_q^k)
9 mpz_t h
; //h * r = n, r is prime
11 int D
; //discrminant needed to find j-invariant
12 int k
; //embedding degree
15 typedef struct pbc_cm_s
*pbc_cm_ptr
;
16 typedef struct pbc_cm_s pbc_cm_t
[1];
21 void pbc_cm_init(pbc_cm_t cm
);
25 void pbc_cm_clear(pbc_cm_t cm
);
28 For a given discriminant D, searches for type D pairings suitable for
29 cryptography (MNT curves of embedding degree 6).
30 The group order is at most 'bitlimit' bits. For each set of CM parameters
31 found, call 'callback' with +pbc_cm_t+ and given +void *+. If the callback
32 returns nonzero, stops search and returns that value.
35 int pbc_cm_search_d(int (*callback
)(pbc_cm_ptr
, void *), void *data
,
36 unsigned int D
, unsigned int bitlimit
);
39 For a given discriminant D, searches for type G pairings suitable for
40 cryptography (Freeman curve).
41 The group order is at most 'bitlimit' bits. For each set of CM parameters
42 found, call 'callback' with +pbc_cm_t+ and given +void *+. If the callback
43 returns nonzero, stops search and returns that value.
46 int pbc_cm_search_g(int (*callback
)(pbc_cm_ptr
, void *), void *data
,
47 unsigned int D
, unsigned int bitlimit
);
49 #endif //__PBC_MNT_H__