xref: /freebsd/lib/libmp/mp.h (revision 656c5bc76b972d4df1f1d25744dd11e44c057e5f)
1656c5bc7SDima Dorfman /* $FreeBSD$ */
2656c5bc7SDima Dorfman 
3656c5bc7SDima Dorfman #ifndef _MP_H_
4656c5bc7SDima Dorfman #define _MP_H_
5656c5bc7SDima Dorfman 
6656c5bc7SDima Dorfman #include <openssl/bn.h>
7656c5bc7SDima Dorfman 
8656c5bc7SDima Dorfman typedef struct _mint {
9656c5bc7SDima Dorfman 	BIGNUM *bn;
10656c5bc7SDima Dorfman } MINT;
11656c5bc7SDima Dorfman 
12656c5bc7SDima Dorfman void gcd(const MINT *, const MINT *, MINT *);
13656c5bc7SDima Dorfman MINT *itom(short);
14656c5bc7SDima Dorfman void madd(const MINT *, const MINT *, MINT *);
15656c5bc7SDima Dorfman int mcmp(const MINT *, const MINT *);
16656c5bc7SDima Dorfman void mdiv(const MINT *, const MINT *, MINT *, MINT *);
17656c5bc7SDima Dorfman void mfree(MINT *);
18656c5bc7SDima Dorfman void min(MINT *);
19656c5bc7SDima Dorfman void mout(const MINT *);
20656c5bc7SDima Dorfman void move(const MINT *, MINT *);
21656c5bc7SDima Dorfman void msqrt(const MINT *, MINT *, MINT *);
22656c5bc7SDima Dorfman void msub(const MINT *, const MINT *, MINT *);
23656c5bc7SDima Dorfman char *mtox(const MINT *);
24656c5bc7SDima Dorfman void mult(const MINT *, const MINT *, MINT *);
25656c5bc7SDima Dorfman void pow(const MINT *, const MINT *, const MINT *, MINT *);
26656c5bc7SDima Dorfman void rpow(const MINT *, short, MINT *);
27656c5bc7SDima Dorfman void sdiv(const MINT *, short, MINT *, short *);
28656c5bc7SDima Dorfman MINT *xtom(const char *);
29656c5bc7SDima Dorfman 
30656c5bc7SDima Dorfman #endif /* !_MP_H_ */
31