diff options
Diffstat (limited to 'beecrypt/mpbarrett.h')
-rw-r--r-- | beecrypt/mpbarrett.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/beecrypt/mpbarrett.h b/beecrypt/mpbarrett.h index fb4e4ab84..8dec07759 100644 --- a/beecrypt/mpbarrett.h +++ b/beecrypt/mpbarrett.h @@ -33,12 +33,12 @@ typedef struct { - uint32 size; + size_t size; /*@owned@*/ - uint32* modl; /* (size) words */ + mpw* modl; /* (size) words */ /*@dependent@*/ /*@null@*/ - uint32* mu; /* (size+1) words */ -} mp32barrett; + mpw* mu; /* (size+1) words */ +} mpbarrett; #ifdef __cplusplus extern "C" { @@ -47,19 +47,19 @@ extern "C" { /** */ BEECRYPTAPI -void mp32bzero(/*@out@*/ mp32barrett* b) +void mpbzero(/*@out@*/ mpbarrett* b) /*@modifies b->size, b->modl, b->mu @*/; /** */ BEECRYPTAPI -void mp32binit(mp32barrett* b, uint32 size) +void mpbinit(mpbarrett* b, size_t size) /*@modifies b->size, b->modl, b->mu @*/; /** */ BEECRYPTAPI -void mp32bfree(/*@special@*/ mp32barrett* b) +void mpbfree(/*@special@*/ mpbarrett* b) /*@uses b->size, b->modl @*/ /*@releases b->modl @*/ /*@modifies b->size, b->modl, b->mu @*/; @@ -67,100 +67,100 @@ void mp32bfree(/*@special@*/ mp32barrett* b) /** */ BEECRYPTAPI -void mp32bcopy(mp32barrett* b, const mp32barrett* copy) +void mpbcopy(mpbarrett* b, const mpbarrett* copy) /*@modifies b->size, b->modl, b->mu @*/; /** */ BEECRYPTAPI -void mp32bset(mp32barrett* b, uint32 size, const uint32* data) +void mpbset(mpbarrett* b, size_t size, const mpw* data) /*@modifies b->size, b->modl, b->mu @*/; /** */ BEECRYPTAPI /*@unused@*/ -void mp32bsethex(mp32barrett* b, const char* hex) +void mpbsethex(mpbarrett* b, const char* hex) /*@modifies b->size, b->modl, b->mu @*/; /** */ BEECRYPTAPI -void mp32bsubone(const mp32barrett* b, uint32* result) +void mpbsubone(const mpbarrett* b, mpw* result) /*@modifies result @*/; /** */ BEECRYPTAPI /*@unused@*/ -void mp32bneg(const mp32barrett* b, const uint32* xdata, uint32* result) +void mpbneg(const mpbarrett* b, const mpw* xdata, mpw* result) /*@modifies result @*/; /** */ BEECRYPTAPI -void mp32bmu_w(mp32barrett* b, /*@out@*/ uint32* wksp) +void mpbmu_w(mpbarrett* b, /*@out@*/ mpw* wksp) /*@modifies b->size, b->modl, b->mu, wksp @*/; /** */ BEECRYPTAPI -void mp32brnd_w (const mp32barrett* b, randomGeneratorContext* rc, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbrnd_w (const mpbarrett* b, randomGeneratorContext* rc, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /** */ /*@-exportlocal@*/ BEECRYPTAPI -void mp32brndodd_w(const mp32barrett* b, randomGeneratorContext* rc, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbrndodd_w(const mpbarrett* b, randomGeneratorContext* rc, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /*@=exportlocal@*/ /** */ BEECRYPTAPI -void mp32brndinv_w(const mp32barrett* b, randomGeneratorContext* rc, /*@out@*/ uint32* result, /*@out@*/ uint32* inverse, /*@out@*/ uint32* wksp) +void mpbrndinv_w(const mpbarrett* b, randomGeneratorContext* rc, /*@out@*/ mpw* result, /*@out@*/ mpw* inverse, /*@out@*/ mpw* wksp) /*@modifies result, inverse, wksp @*/; /** */ BEECRYPTAPI -void mp32bmod_w(const mp32barrett* b, const uint32* xdata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbmod_w(const mpbarrett* b, const mpw* xdata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /** */ BEECRYPTAPI -void mp32baddmod_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, uint32 ysize, const uint32* ydata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbaddmod_w(const mpbarrett* b, size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /** */ BEECRYPTAPI /*@unused@*/ -void mp32bsubmod_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, uint32 ysize, const uint32* ydata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbsubmod_w(const mpbarrett* b, size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /** */ BEECRYPTAPI -void mp32bmulmod_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, uint32 ysize, const uint32* ydata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbmulmod_w(const mpbarrett* b, size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /** */ BEECRYPTAPI -void mp32bsqrmod_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbsqrmod_w(const mpbarrett* b, size_t xsize, const mpw* xdata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /** */ BEECRYPTAPI -void mp32bpowmod_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, uint32 psize, const uint32* pdata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbpowmod_w(const mpbarrett* b, size_t xsize, const mpw* xdata, size_t psize, const mpw* pdata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /** */ /*@-exportlocal@*/ BEECRYPTAPI -void mp32bpowmodsld_w(const mp32barrett* b, const uint32* slide, uint32 psize, const uint32* pdata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbpowmodsld_w(const mpbarrett* b, const mpw* slide, size_t psize, const mpw* pdata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@globals internalState @*/ /*@modifies result, wksp, internalState @*/; /*@=exportlocal@*/ @@ -168,13 +168,13 @@ void mp32bpowmodsld_w(const mp32barrett* b, const uint32* slide, uint32 psize, c /** */ BEECRYPTAPI -void mp32btwopowmod_w(const mp32barrett* b, uint32 psize, const uint32* pdata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +void mpbtwopowmod_w(const mpbarrett* b, size_t psize, const mpw* pdata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; /** */ BEECRYPTAPI -int mp32binv_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, /*@out@*/ uint32* result, /*@out@*/ uint32* wksp) +int mpbinv_w(const mpbarrett* b, size_t xsize, const mpw* xdata, /*@out@*/ mpw* result, /*@out@*/ mpw* wksp) /*@modifies result, wksp @*/; #ifdef NOTYET @@ -183,53 +183,53 @@ int mp32binv_w(const mp32barrett* b, uint32 xsize, const uint32* xdata, /*@out@ * signature verification. */ BEECRYPTAPI /*@unused@*/ -void mp32bsm2powmod(const mp32barrett* b, const uint32*, const uint32*, const uint32*, const uint32*); +void mpbsm2powmod(const mpbarrett* b, const mpw*, const mpw*, const mpw*, const mpw*); /** */ BEECRYPTAPI /*@unused@*/ -void mp32bsm3powmod(const mp32barrett* b, const uint32*, const uint32*, const uint32*, const uint32*, const uint32*, const uint32*); +void mpbsm3powmod(const mpbarrett* b, const mpw*, const mpw*, const mpw*, const mpw*, const mpw*, const mpw*); #endif /* NOTYET */ /** */ BEECRYPTAPI /*@unused@*/ -int mp32bpprime_w(const mp32barrett* b, randomGeneratorContext* rc, int t, /*@out@*/ uint32* wksp) +int mpbpprime_w(const mpbarrett* b, randomGeneratorContext* rc, int t, /*@out@*/ mpw* wksp) /*@modifies wksp @*/; /** * @note Takes mpnumber as parameter. */ BEECRYPTAPI -void mp32bnrnd(const mp32barrett* b, randomGeneratorContext* rc, mpnumber* result) +void mpbnrnd(const mpbarrett* b, randomGeneratorContext* rc, mpnumber* result) /*@modifies result @*/; /** * @note Takes mpnumber as parameter. */ BEECRYPTAPI /*@unused@*/ -void mp32bnmulmod(const mp32barrett* b, const mpnumber* x, const mpnumber* y, mpnumber* result) +void mpbnmulmod(const mpbarrett* b, const mpnumber* x, const mpnumber* y, mpnumber* result) /*@modifies result @*/; /** * @note Takes mpnumber as parameter. */ BEECRYPTAPI /*@unused@*/ -void mp32bnsqrmod(const mp32barrett* b, const mpnumber* x, mpnumber* result) +void mpbnsqrmod(const mpbarrett* b, const mpnumber* x, mpnumber* result) /*@modifies result @*/; /** * @note Takes mpnumber as parameter. */ BEECRYPTAPI -void mp32bnpowmod (const mp32barrett* b, const mpnumber* x, const mpnumber* pow, mpnumber* y) +void mpbnpowmod (const mpbarrett* b, const mpnumber* x, const mpnumber* pow, mpnumber* y) /*@modifies y @*/; /** * @note Takes mpnumber as parameter. */ BEECRYPTAPI /*@unused@*/ -void mp32bnpowmodsld(const mp32barrett* b, const uint32* slide, const mpnumber* pow, mpnumber* y) +void mpbnpowmodsld(const mpbarrett* b, const mpw* slide, const mpnumber* pow, mpnumber* y) /*@modifies y @*/; #ifdef __cplusplus |