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