MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / mul

Function mul

Math/gf2n.cpp:198–203  ·  view source on GitHub ↗

Takes 8bit x and y and returns the 16 bit product in c1 and c0 ans = (c1<<8)^c0 where c1 and c0 are 8 bit */

Source from the content-addressed store, hash-verified

196 where c1 and c0 are 8 bit
197*/
198void mul(octet x, octet y, octet& c0, octet& c1)
199{
200 auto full = gf2n_short_table[octet(x)][octet(y)];
201 c0 = full;
202 c1 = full >> 8;
203}
204
205/* Takes 16bit x and y and returns the 32 bit product in c1 and c0
206 ans = (c1<<16)^c0

Callers 4

gf2n_Class · 0.70
gf2n.cppFile · 0.70
gfp_Class · 0.70
Share_Class · 0.50

Calls 1

mul32Function · 0.85

Tested by

no test coverage detected