From: Denis Vlasenko <vda@ilport.com.ua>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, davem@davemloft.net,
linux-kernel@vger.kernel.org
Subject: [PATCH 0.5/4 :) ] ROR -> ror32
Date: Sun, 3 Jul 2005 16:00:20 +0300 [thread overview]
Message-ID: <200507031600.20219.vda@ilport.com.ua> (raw)
In-Reply-To: <200507031557.15416.vda@ilport.com.ua>
[-- Attachment #1: Type: text/plain, Size: 37 bytes --]
Remove local ROR, use ror32 instead.
[-- Attachment #2: 05.ror.patch --]
[-- Type: text/x-diff, Size: 760 bytes --]
diff -urpN linux-2.6.12.0.orig/crypto/des.c linux-2.6.12.05.n/crypto/des.c
--- linux-2.6.12.0.orig/crypto/des.c Tue Oct 19 00:55:29 2004
+++ linux-2.6.12.05.n/crypto/des.c Sun Jul 3 15:27:12 2005
@@ -35,8 +35,6 @@
#define DES3_EDE_EXPKEY_WORDS (3 * DES_EXPKEY_WORDS)
#define DES3_EDE_BLOCK_SIZE DES_BLOCK_SIZE
-#define ROR(d,c,o) ((d) = (d) >> (c) | (d) << (o))
-
struct des_ctx {
u8 iv[DES_BLOCK_SIZE];
u32 expkey[DES_EXPKEY_WORDS];
@@ -1159,9 +1157,7 @@ not_weak:
w |= (b1[k[18+24]] | b0[k[19+24]]) << 4;
w |= (b1[k[20+24]] | b0[k[21+24]]) << 2;
w |= b1[k[22+24]] | b0[k[23+24]];
-
- ROR(w, 4, 28); /* could be eliminated */
- expkey[1] = w;
+ expkey[1] = ror32(w, 4); /* could be eliminated */
k += 48;
expkey += 2;
next prev parent reply other threads:[~2005-07-03 13:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-20 10:54 [PATCH 0/5] random crypto cleanups Denis Vlasenko
2005-07-03 11:37 ` Herbert Xu
2005-07-03 12:57 ` Denis Vlasenko
2005-07-03 13:00 ` Denis Vlasenko [this message]
2005-07-03 13:03 ` [PATCH 1/4] do not open-code be/le conversions Denis Vlasenko
2005-07-03 13:05 ` [PATCH 2/4] whirlpool gcc bug fix Denis Vlasenko
2005-07-03 13:06 ` [PATCH 3/4] twofish on diet Denis Vlasenko
2005-07-03 13:14 ` [PATCH 4/4] 64 bit rotation Denis Vlasenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200507031600.20219.vda@ilport.com.ua \
--to=vda@ilport.com.ua \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®