X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/fe6657c961b01ec72e9f35f4c3d96b11b31cf09c..45c0fd363937c6e9b05da04a9167e9912c05ca0c:/seal.c diff --git a/seal.c b/seal.c index b3e96a1..444a11c 100644 --- a/seal.c +++ b/seal.c @@ -7,7 +7,7 @@ * (c) 2000 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,12 +15,12 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * Catacomb is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with Catacomb; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, @@ -139,7 +139,7 @@ static void gamma(uint32 *p, size_t sz, const void *k, unsigned i) if (sz) { *p++ = e; sz--; } skip = 0; } - } + } } /* --- @seal_initkey@ --- * @@ -202,7 +202,7 @@ static void seal_reset(seal_ctx *c) } A = n ^ c->r[0]; - B = ROR32(n, 8) ^ c->r[1]; + B = ROR32(n, 8) ^ c->r[1]; C = ROR32(n, 16) ^ c->r[2]; D = ROR32(n, 24) ^ c->r[3]; c->l += 4; @@ -309,7 +309,7 @@ void seal_encrypt(seal_ctx *c, const void *src, void *dest, size_t sz) if (j == 256) { seal_reset(c); - A = c->a, B = c->b, C = c->c, D = c->d; + A = c->a, B = c->b, C = c->c, D = c->d; n1 = c->n1, n2 = c->n2, n3 = c->n3, n4 = c->n4; j = 0; } @@ -324,7 +324,7 @@ void seal_encrypt(seal_ctx *c, const void *src, void *dest, size_t sz) Q = (Q + B) & 0x7fc; C += k->t[Q >> 2]; B = ROR32(B, 9); P = (P + C) & 0x7fc; D ^= k->t[P >> 2]; C = ROR32(C, 9); Q = (Q + D) & 0x7fc; A += k->t[Q >> 2]; D = ROR32(D, 9); - + /* --- Remember the output and set up the next round --- */ aa = B + k->s[j + 0];