xref: /freebsd/lib/libmp/mp.h (revision 68e7a217f8019b955f87547f218e95ab237597af)
1 /* $FreeBSD$ */
2 
3 #ifndef _MP_H_
4 #define _MP_H_
5 
6 #include <openssl/bn.h>
7 
8 typedef struct _mint {
9 	BIGNUM *bn;
10 } MINT;
11 
12 void gcd(const MINT *, const MINT *, MINT *);
13 MINT *itom(short);
14 void madd(const MINT *, const MINT *, MINT *);
15 int mcmp(const MINT *, const MINT *);
16 void mdiv(const MINT *, const MINT *, MINT *, MINT *);
17 void mfree(MINT *);
18 void min(MINT *);
19 void mout(const MINT *);
20 void move(const MINT *, MINT *);
21 void msqrt(const MINT *, MINT *, MINT *);
22 void msub(const MINT *, const MINT *, MINT *);
23 char *mtox(const MINT *);
24 void mult(const MINT *, const MINT *, MINT *);
25 void pow(const MINT *, const MINT *, const MINT *, MINT *);
26 void rpow(const MINT *, short, MINT *);
27 void sdiv(const MINT *, short, MINT *, short *);
28 MINT *xtom(const char *);
29 
30 #endif /* !_MP_H_ */
31