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

Function set_ecp

modules/crypt/arith/ec.c:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static void set_ecp(xsMachine *the, xsSlot *slot, txECPoint *p, txECParam *ec)
89{
90 mont_out(the, p->x, p->x, ec->m, ec->u);
91 mont_out(the, p->y, p->y, ec->m, ec->u);
92 mont_out(the, p->z, p->z, ec->m, ec->u);
93
94 xsmcSetBigInt(xsVar(0), p->x);
95 xsmcSetBigInt(xsVar(1), p->y);
96 xsmcSetBigInt(xsVar(2), p->z);
97 xsmcSetNewObject(*slot);
98 xsmcSet(*slot, xsID_x, xsVar(0));
99 xsmcSet(*slot, xsID_y, xsVar(1));
100 xsmcSet(*slot, xsID_z, xsVar(2));
101}
102
103void
104xs_ec2_add(xsMachine *the)

Callers 3

xs_ec2_addFunction · 0.85
xs_ec2_mulFunction · 0.85
xs_ec2_mul2Function · 0.85

Calls 1

mont_outFunction · 0.85

Tested by

no test coverage detected