1 // Bignum modular power (x^n mod m)
6 // could do indexed bit test instead of shift right
9 mmodpow(unsigned int *x
, unsigned int *n
, unsigned int *m
)
42 unsigned int *xx
, *nn
, *mm
, *y
;
44 for (x
= 1; x
< 100; x
++) {
46 for (n
= 1; n
< 100; n
++) {
48 for (m
= 1; m
< 10; m
++) {
50 y
= mmodpow(xx
, nn
, mm
);
59 sprintf(logbuf
, "mmodpow memory leak %d %d\n", mem
, mtotal
);