mp.h revision 189092
1181344Sdfr/* $FreeBSD: head/lib/libmp/mp.h 189092 2009-02-26 21:43:15Z ed $ */
2181344Sdfr
3181344Sdfr#ifndef _MP_H_
4181344Sdfr#define _MP_H_
5181344Sdfr
6181344Sdfr#ifndef HEADER_BN_H_
7181344Sdfr#include <openssl/bn.h>
8181344Sdfr#endif
9181344Sdfr
10181344Sdfrtypedef struct _mint {
11181344Sdfr	BIGNUM *bn;
12181344Sdfr} MINT;
13181344Sdfr
14181344Sdfrvoid mp_gcd(const MINT *, const MINT *, MINT *);
15181344SdfrMINT *mp_itom(short);
16181344Sdfrvoid mp_madd(const MINT *, const MINT *, MINT *);
17181344Sdfrint mp_mcmp(const MINT *, const MINT *);
18181344Sdfrvoid mp_mdiv(const MINT *, const MINT *, MINT *, MINT *);
19181344Sdfrvoid mp_mfree(MINT *);
20181344Sdfrvoid mp_min(MINT *);
21181344Sdfrvoid mp_mout(const MINT *);
22181344Sdfrvoid mp_move(const MINT *, MINT *);
23181344Sdfrvoid mp_msqrt(const MINT *, MINT *, MINT *);
24181344Sdfrvoid mp_msub(const MINT *, const MINT *, MINT *);
25181344Sdfrchar *mp_mtox(const MINT *);
26181344Sdfrvoid mp_mult(const MINT *, const MINT *, MINT *);
27181344Sdfrvoid mp_pow(const MINT *, const MINT *, const MINT *, MINT *);
28181344Sdfrvoid mp_rpow(const MINT *, short, MINT *);
29181344Sdfrvoid mp_sdiv(const MINT *, short, MINT *, short *);
30181344SdfrMINT *mp_xtom(const char *);
31181344Sdfr
32181344Sdfr#endif /* !_MP_H_ */
33181344Sdfr