summaryrefslogtreecommitdiffstats
path: root/lib/libmp/mp.h
blob: 4c2c94d05fc845e16379466160ed00f76def7b2d (plain)
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$ */

#ifndef _MP_H_
#define _MP_H_

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

typedef struct _mint {
	BIGNUM *bn;
} MINT;

void gcd(const MINT *, const MINT *, MINT *);
MINT *itom(short);
void madd(const MINT *, const MINT *, MINT *);
int mcmp(const MINT *, const MINT *);
void mdiv(const MINT *, const MINT *, MINT *, MINT *);
void mfree(MINT *);
void min(MINT *);
void mout(const MINT *);
void move(const MINT *, MINT *);
void msqrt(const MINT *, MINT *, MINT *);
void msub(const MINT *, const MINT *, MINT *);
char *mtox(const MINT *);
void mult(const MINT *, const MINT *, MINT *);
void pow(const MINT *, const MINT *, const MINT *, MINT *);
void rpow(const MINT *, short, MINT *);
void sdiv(const MINT *, short, MINT *, short *);
MINT *xtom(const char *);

#endif /* !_MP_H_ */
OpenPOWER on IntegriCloud