~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a94f003
)
symm/poly1305.c: Remove spaces around `&'.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 25 Apr 2023 00:43:54 +0000
(
01:43
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 25 Apr 2023 01:02:14 +0000
(
02:02
+0100)
symm/poly1305.c
patch
|
blob
|
blame
|
history
diff --git
a/symm/poly1305.c
b/symm/poly1305.c
index
d59615e
..
39c832f
100644
(file)
--- a/
symm/poly1305.c
+++ b/
symm/poly1305.c
@@
-679,9
+679,9
@@
void poly1305_concat(poly1305_ctx *ctx,
#define BIT (1ul << (ULONG_BITS - 1))
if (n) {
i = ULONG_BITS;
#define BIT (1ul << (ULONG_BITS - 1))
if (n) {
i = ULONG_BITS;
- while (!(n
&
BIT)) { n <<= 1; i--; }
+ while (!(n
&
BIT)) { n <<= 1; i--; }
mul_r(prefix, x, x); n <<= 1; i--;
mul_r(prefix, x, x); n <<= 1; i--;
- while (i--) { sqr(x, x); if (n
&
BIT) mul_r(prefix, x, x); n <<= 1; }
+ while (i--) { sqr(x, x); if (n
&
BIT) mul_r(prefix, x, x); n <<= 1; }
}
#undef BIT
mul(x, prefix->u.P.h, x);
}
#undef BIT
mul(x, prefix->u.P.h, x);
@@
-789,10
+789,10
@@
void poly1305_done(poly1305_ctx *ctx, void *h)
/* Convert this mess back into 32-bit words. We lose the top two bits,
* but that's fine.
*/
/* Convert this mess back into 32-bit words. We lose the top two bits,
* but that's fine.
*/
- h0 = (h0 >> 0) | ((h1
&
0x0000003f) << 26);
- h1 = (h1 >> 6) | ((h2
&
0x00000fff) << 20);
- h2 = (h2 >> 12) | ((h3
&
0x0003ffff) << 14);
- h3 = (h3 >> 18) | ((h4
&
0x00ffffff) << 8);
+ h0 = (h0 >> 0) | ((h1
&
0x0000003f) << 26);
+ h1 = (h1 >> 6) | ((h2
&
0x00000fff) << 20);
+ h2 = (h2 >> 12) | ((h3
&
0x0003ffff) << 14);
+ h3 = (h3 >> 18) | ((h4
&
0x00ffffff) << 8);
/* All done. */
STORE32_L(p + 0, h0); STORE32_L(p + 4, h1);
/* All done. */
STORE32_L(p + 0, h0); STORE32_L(p + 4, h1);