MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / mont_square

Function mont_square

modules/crypt/arith/xsBigIntEx.c:491–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491static txBigInt *mont_square(txMachine *the, txBigInt *r, txBigInt *a, txBigInt *m, txU4 u, pool_t *pool)
492{
493 txU2 aSize = a->size * 2;
494 txBigInt *t = pool_get(the, aSize, pool);
495
496 fxBigInt_sqr(the, t, a);
497 mont_reduction(the, r, t, m, u, pool);
498 pool_put(t, aSize);
499 return r;
500}
501
502static txBigInt *mont_exp_init(txMachine *the, txBigInt *r, txBigInt *m, pool_t *pool)
503{

Callers 2

fxBigInt_mont_exp_LRFunction · 0.85
fxBigInt_mont_exp_SWFunction · 0.85

Calls 4

pool_getFunction · 0.85
fxBigInt_sqrFunction · 0.85
mont_reductionFunction · 0.85
pool_putFunction · 0.85

Tested by

no test coverage detected