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

Function xs_ec2_mul

modules/crypt/arith/ec.c:121–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void
122xs_ec2_mul(xsMachine *the)
123{
124 txECParam ec;
125 txECPoint r, p;
126 txBigInt *k;
127 int i = 0;
128
129 xsmcVars(10);
130 get_ec_param(the, &ec, &i);
131 get_ecp(the, &p, &xsArg(0), &i, &ec);
132 k = xsmcToBigInt(xsArg(1));
133 r.x = r.y = r.z = NULL;
134 // RI: r(x, y, z) will be fxBigInt_alloc'ed. Is it ok not to free?
135 fxBigInt_ec_mul(the, &r, &p, k, &ec);
136 fxBigInt_ec_norm(the, &r, &r, &ec);
137 set_ecp(the, &xsResult, &r, &ec);
138}
139
140void
141xs_ec2_mul2(xsMachine *the)

Callers

nothing calls this directly

Calls 5

get_ec_paramFunction · 0.85
get_ecpFunction · 0.85
fxBigInt_ec_mulFunction · 0.85
fxBigInt_ec_normFunction · 0.85
set_ecpFunction · 0.85

Tested by

no test coverage detected