[Libre-soc-bugs] [Bug 773] High-Level Demos of Cryptographic and Other Relevant Algorithms
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Fri May 19 14:20:44 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=773
--- Comment #3 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
curve25519_mul
t[0] = r0 * s0
t[1] = r0 * s1 + r1 * s0;
t[2] = r0 * s2 + r2 * s0 + r1 * s1;
t[3] = r0 * s3 + r3 * s0 + r1 * s2 + r2 * s1;
t[4] = r0 * s4 + r4 * s0 + r3 * s1 + r1 * s3 + r2 * s2;
r1 *= 19;
r2 *= 19;
r3 *= 19;
r4 *= 19;
t[0] += r4 * s1 + r1 * s4 + r2 * s3 + r3 * s2;
t[1] += r4 * s2 + r2 * s4 + r3 * s3;
t[2] += r4 * s3 + r3 * s4;
t[3] += r4 * s4;
r0 = lo128(t[0]) & reduce_mask_51; shr128(c, t[0], 51);
add128_64(t[1], c) r1 = lo128(t[1]) & reduce_mask_51; shr128(c, t[1], 51);
add128_64(t[2], c) r2 = lo128(t[2]) & reduce_mask_51; shr128(c, t[2], 51);
add128_64(t[3], c) r3 = lo128(t[3]) & reduce_mask_51; shr128(c, t[3], 51);
add128_64(t[4], c) r4 = lo128(t[4]) & reduce_mask_51; shr128(c, t[4], 51);
r0 += c * 19; c = r0 >> 51; r0 = r0 & reduce_mask_51;
r1 += c;
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list