| 51 | extern txBigInt gxBigIntOne; |
| 52 | |
| 53 | static void get_ec_param(xsMachine *the, txECParam *ec, int *i) |
| 54 | { |
| 55 | xsmcGet(xsVar(*i), xsThis, xsID_m); |
| 56 | ec->m = xsmcToBigInt(xsVar(*i)); |
| 57 | (*i)++; |
| 58 | xsmcGet(xsVar(*i), xsThis, xsID_a); |
| 59 | ec->a = xsmcToBigInt(xsVar(*i)); |
| 60 | (*i)++; |
| 61 | xsmcGet(xsVar(*i), xsThis, xsID_b); |
| 62 | ec->b = xsmcToBigInt(xsVar(*i)); |
| 63 | (*i)++; |
| 64 | ec->u = mont_init(ec->m); |
| 65 | ec->a = mont_in(the, NULL, ec->a, ec->m); |
| 66 | ec->b = mont_in(the, NULL, ec->b, ec->m); |
| 67 | ec->one = mont_in(the, NULL, &gxBigIntOne, ec->m); |
| 68 | // RI: (a, b, one) are fxBigInt_alloc'ed. Is it no to free? |
| 69 | } |
| 70 | |
| 71 | static void get_ecp(xsMachine *the, txECPoint *p, xsSlot *slot, int *i, txECParam *ec) |
| 72 | { |
no test coverage detected