Main Page Modules Data Structures File List Data Fields Globals Related Pages

# beecrypt/mp32prime.h

Go to the documentation of this file.

    00001
    00007 /*
    00008  * Copyright (c) 2000 Virtual Unlimited B.V.
    00009  *
    00010  * Author: Bob Deblier <bob@virtualunlimited.com>
    00011  *
    00012  * This library is free software; you can redistribute it and/or
    00013  * modify it under the terms of the GNU Lesser General Public
    00014  * License as published by the Free Software Foundation; either
    00015  * version 2.1 of the License, or (at your option) any later version.
    00016  *
    00017  * This library is distributed in the hope that it will be useful,
    00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00020  * Lesser General Public License for more details.
    00021  *
    00022  * You should have received a copy of the GNU Lesser General Public
    00023  * License along with this library; if not, write to the Free Software
    00024  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00025  *
    00026  */
    00027
    00028 #ifndef _MP32PRIME_H
    00029 #define _MP32PRIME_H
    00030
    00031 #include "mp32barrett.h"
    00032
    00033 #define SMALL_PRIMES_PRODUCT_MAX        64
    00034
    00037 /*@-exportlocal@*/
    00038 extern uint32* mp32spprod[SMALL_PRIMES_PRODUCT_MAX];
    00039 /*@=exportlocal@*/
    00040
    00041 #ifdef __cplusplus
    00042 extern "C" {
    00043 #endif
    00044
    00047 BEECRYPTAPI
    00048 int  mp32ptrials     (uint32 bits)
    00049         /*@*/;
    00050
    00053 BEECRYPTAPI
    00054 int  mp32pmilrab_w   (const mp32barrett* p, randomGeneratorContext* rc, int t, /*@out@*/ uint32* wksp)
    00055         /*@modifies wksp @*/;
    00056
    00059 BEECRYPTAPI
    00060 void mp32prnd_w      (mp32barrett* p, randomGeneratorContext* rc, uint32 size, int t, /*@null@*/ const mp32number* f, /*@out@*/ uint32* wksp)
    00061         /*@globals mp32spprod @*/
    00062         /*@modifies p, rc, wksp @*/;
    00063
    00066 BEECRYPTAPI
    00067 void mp32prndsafe_w  (mp32barrett* p, randomGeneratorContext* rc, uint32 size, int t, /*@out@*/ uint32* wksp)
    00068         /*@globals mp32spprod @*/
    00069         /*@modifies p, rc, wksp @*/;
    00070
    00071 #ifdef  NOTYET
    00072
    00074 BEECRYPTAPI /*@unused@*/
    00075 void mp32prndcon_w   (mp32barrett* p, randomGeneratorContext* rc, uint32, int, const mp32number*, const mp32number*, const mp32number*, mp32number*, /*@out@*/ uint32* wksp)
    00076         /*@modifies wksp @*/;
    00077 #endif
    00078
    00081 BEECRYPTAPI
    00082 void mp32prndconone_w(mp32barrett* p, randomGeneratorContext* rc, uint32 size, int t, const mp32barrett* q, /*@null@*/ const mp32number* f, mp32number* r, int cofactor, /*@out@*/ uint32* wksp)
    00083         /*@globals mp32spprod @*/
    00084         /*@modifies p, rc, r, wksp @*/;
    00085
    00086 #ifdef __cplusplus
    00087 }
    00088 #endif
    00089
    00090 #endif