Computes a plus b and puts the result into res.
Computes a plus b and puts the result into res.
output; must be not null; may be equal to a and/or b
multiplicand; may be equal to res, in which case will get overwritten
multiplier; may be equal to res, in which case will get overwritten
Computes a times b and puts the result into res.
Computes a times b and puts the result into res. Uses table lookups, which may not preserve the secrecy of the inputs in case of side-channel attacks.
output; must be not null; may be equal to a and/or b
multiplicand; may be equal to res, in which case will get overwritten
multiplier; may be equal to res, in which case will get overwritten
Computes a times b and puts the result into res.
Computes a times b and puts the result into res. More efficient than mul(res, a, new GF2_192(b))
output; must be not null; may be equal to a and/or b
multiplicand; may be equal to res, in which case will get overwritten
multiplier; may be equal to res, in which case will get overwritten
Raises z to the power 2{2k} and puts the result into res.
Raises z to the power 2{2k} and puts the result into res. Same sqr(z, z) 2^k times. Takes only about as much time as mul(res, z, z) (even more efficient implementations are possible, but not provided here because of risk of side-channel attacks)
output; must be not null; may be equal to z
input to be squared; may be equal to res, in which case will get overwritten
Squares z and puts the result into res.
Squares z and puts the result into res. Same as power2To2ToK(res, z, 0). About same efficiency as mul(res, z, z) (more efficient implementations are possible, but not provided here because of risk of side-channel attacks)
output; must be not null; may be equal to z
input to be squared; may be equal to res, in which case will get overwritten