| 122 | } |
| 123 | |
| 124 | txBigInt *fxBigInt_mod_dbl(txMachine *the, txBigInt *r, txBigInt *a, int k, txBigInt *m, pool_t *pool) |
| 125 | { |
| 126 | txBigInt *t = pool_get(the, m->size + 1, pool); |
| 127 | |
| 128 | fxBigInt_copy(r, a); |
| 129 | while (--k >= 0) { |
| 130 | fxBigInt_ulsl1(the, t, r, 1); |
| 131 | while (fxBigInt_ucomp(t, m) >= 0) |
| 132 | fxBigInt_sub(the, t, t, m); |
| 133 | fxBigInt_copy(r, t); |
| 134 | } |
| 135 | pool_put(t, m->size + 1); |
| 136 | return r; |
| 137 | } |
| 138 | |
| 139 | txBigInt *fxBigInt_mod_sub(txMachine *the, txBigInt *r, txBigInt *a, txBigInt *b, txBigInt *m, pool_t *pool) |
| 140 | { |
no test coverage detected