aboutsummaryrefslogtreecommitdiff
path: root/lib/libmp/mp.h
blob: f1b5f96fd1c77669766dfd8f4eacfe84b5be2690 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* $FreeBSD: src/lib/libmp/mp.h,v 1.3.2.1.6.1 2010/12/21 17:09:25 kensmith Exp $ */

#ifndef _MP_H_
#define _MP_H_

#ifndef HEADER_BN_H_
#include <openssl/bn.h>
#endif

typedef struct _mint {
	BIGNUM *bn;
} MINT;

void mp_gcd(const MINT *, const MINT *, MINT *);
MINT *mp_itom(short);
void mp_madd(const MINT *, const MINT *, MINT *);
int mp_mcmp(const MINT *, const MINT *);
void mp_mdiv(const MINT *, const MINT *, MINT *, MINT *);
void mp_mfree(MINT *);
void mp_min(MINT *);
void mp_mout(const MINT *);
void mp_move(const MINT *, MINT *);
void mp_msqrt(const MINT *, MINT *, MINT *);
void mp_msub(const MINT *, const MINT *, MINT *);
char *mp_mtox(const MINT *);
void mp_mult(const MINT *, const MINT *, MINT *);
void mp_pow(const MINT *, const MINT *, const MINT *, MINT *);
void mp_rpow(const MINT *, short, MINT *);
void mp_sdiv(const MINT *, short, MINT *, short *);
MINT *mp_xtom(const char *);

#endif /* !_MP_H_ */