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

Function xs_ec2_add

modules/crypt/arith/ec.c:103–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void
104xs_ec2_add(xsMachine *the)
105{
106 txECParam ec;
107 txECPoint r, p1, p2;
108 int i = 0;
109
110 xsmcVars(10);
111 get_ec_param(the, &ec, &i);
112 get_ecp(the, &p1, &xsArg(0), &i, &ec);
113 get_ecp(the, &p2, &xsArg(1), &i, &ec);
114 r.x = r.y = r.z = NULL;
115 // RI: r(x, y, z) will be fxBigInt_alloc'ed. Is it ok not to free?
116 fxBigInt_ec_add(the, &r, &p1, &p2, &ec);
117 fxBigInt_ec_norm(the, &r, &r, &ec);
118 set_ecp(the, &xsResult, &r, &ec);
119}
120
121void
122xs_ec2_mul(xsMachine *the)

Callers

nothing calls this directly

Calls 5

get_ec_paramFunction · 0.85
get_ecpFunction · 0.85
fxBigInt_ec_addFunction · 0.85
fxBigInt_ec_normFunction · 0.85
set_ecpFunction · 0.85

Tested by

no test coverage detected