From: Ard Biesheuvel <ardb@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: herbert@gondor.apana.org.au, ebiggers@kernel.org,
Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH 0/9] crypto: fix alignmask handling
Date: Mon, 1 Feb 2021 19:02:28 +0100 [thread overview]
Message-ID: <20210201180237.3171-1-ardb@kernel.org> (raw)
Some generic implementations of vintage ciphers rely on alignmasks to
ensure that the input is presented with the right alignment. Given that
these are all C implementations, which may execute on architectures that
don't care about alignment in the first place, it is better to use the
unaligned accessors, which will deal with the misalignment in a way that
is appropriate for the architecture in question (and in many cases, this
means simply ignoring the misalignment, as the hardware doesn't care either)
So fix this across a number of implementations. Patch #1 stands out because
michael_mic.c was broken in spite of the alignmask. Patch #2 removes tnepres
instead of updating it, given that there is no point in keeping it.
The remaining patches all update generic ciphers that are outdated but still
used, and which are the only implementations available on most architectures
other than x86.
Ard Biesheuvel (9):
crypto: michael_mic - fix broken misalignment handling
crypto: serpent - get rid of obsolete tnepres variant
crypto: serpent - use unaligned accessors instead of alignmask
crypto: blowfish - use unaligned accessors instead of alignmask
crypto: camellia - use unaligned accessors instead of alignmask
crypto: cast5 - use unaligned accessors instead of alignmask
crypto: cast6 - use unaligned accessors instead of alignmask
crypto: fcrypt - drop unneeded alignmask
crypto: twofish - use unaligned accessors instead of alignmask
crypto/Kconfig | 3 +-
crypto/blowfish_generic.c | 23 ++--
crypto/camellia_generic.c | 45 +++----
crypto/cast5_generic.c | 23 ++--
crypto/cast6_generic.c | 39 +++---
crypto/fcrypt.c | 1 -
crypto/michael_mic.c | 31 ++---
crypto/serpent_generic.c | 126 ++++----------------
crypto/tcrypt.c | 6 +-
crypto/testmgr.c | 6 -
crypto/testmgr.h | 79 ------------
crypto/twofish_generic.c | 11 +-
12 files changed, 90 insertions(+), 303 deletions(-)
--
2.20.1
next reply other threads:[~2021-02-01 18:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 18:02 Ard Biesheuvel [this message]
2021-02-01 18:02 ` [PATCH 1/9] crypto: michael_mic - fix broken misalignment handling Ard Biesheuvel
2021-02-01 18:02 ` [PATCH 2/9] crypto: serpent - get rid of obsolete tnepres variant Ard Biesheuvel
2021-02-01 18:02 ` [PATCH 3/9] crypto: serpent - use unaligned accessors instead of alignmask Ard Biesheuvel
2021-02-01 18:02 ` [PATCH 4/9] crypto: blowfish " Ard Biesheuvel
2021-02-01 18:02 ` [PATCH 5/9] crypto: camellia " Ard Biesheuvel
2021-02-01 18:02 ` [PATCH 6/9] crypto: cast5 " Ard Biesheuvel
2021-02-01 18:02 ` [PATCH 7/9] crypto: cast6 " Ard Biesheuvel
2021-02-01 18:02 ` [PATCH 8/9] crypto: fcrypt - drop unneeded alignmask Ard Biesheuvel
2021-02-01 18:02 ` [PATCH 9/9] crypto: twofish - use unaligned accessors instead of alignmask Ard Biesheuvel
2021-02-02 22:20 ` [PATCH 0/9] crypto: fix alignmask handling Eric Biggers
2021-02-03 9:37 ` Ard Biesheuvel
2021-02-03 11:19 ` Herbert Xu
2021-02-03 11:22 ` Ard Biesheuvel
2021-02-10 7:22 ` Herbert Xu
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=20210201180237.3171-1-ardb@kernel.org \
--to=ardb@kernel.org \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.