BeeCrypt  4.2.1
mpprime.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003 Bob Deblier
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 
26 #ifndef _MPPRIME_H
27 #define _MPPRIME_H
28 
29 #include "beecrypt/mpbarrett.h"
30 
31 #define SMALL_PRIMES_PRODUCT_MAX 32
32 
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
40 int mpptrials (size_t);
42 int mppmilrab_w (const mpbarrett*, randomGeneratorContext*, int, mpw*);
43 
45 int mpprnd_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, mpw*);
47 int mpprndr_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, const mpnumber*, const mpnumber*, mpw*);
49 void mpprndsafe_w (mpbarrett*, randomGeneratorContext*, size_t, int, mpw*);
51 void mpprndcon_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, const mpnumber*, const mpnumber*, mpnumber*, mpw*);
53 void mpprndconone_w(mpbarrett*, randomGeneratorContext*, size_t, int, const mpbarrett*, const mpnumber*, mpnumber*, int, mpw*);
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif
Definition: beecrypt.h:235
int mpprndr_w(mpbarrett *, randomGeneratorContext *, size_t, int, const mpnumber *, const mpnumber *, const mpnumber *, mpw *)
int mpprnd_w(mpbarrett *, randomGeneratorContext *, size_t, int, const mpnumber *, mpw *)
mpw * mpspprod[SMALL_PRIMES_PRODUCT_MAX]
void mpprndconone_w(mpbarrett *, randomGeneratorContext *, size_t, int, const mpbarrett *, const mpnumber *, mpnumber *, int, mpw *)
void mpprndcon_w(mpbarrett *, randomGeneratorContext *, size_t, int, const mpnumber *, const mpnumber *, const mpnumber *, mpnumber *, mpw *)
Multi-precision integer routines using Barrett modular reduction, headers.
int mppmilrab_w(const mpbarrett *, randomGeneratorContext *, int, mpw *)
void mpprndsafe_w(mpbarrett *, randomGeneratorContext *, size_t, int, mpw *)
uint64_t mpw
Definition: api.h:87
#define SMALL_PRIMES_PRODUCT_MAX
Definition: mpprime.h:31
#define BEECRYPTAPI
Definition: api.h:52
int mpptrials(size_t)
Definition: mpnumber.h:36
Definition: mpbarrett.h:37