Linux Security Modules development
 help / color / mirror / Atom feed
From: ebiggers3@gmail.com (Eric Biggers)
To: linux-security-module@vger.kernel.org
Subject: [PATCH] security: keys: switch big_key encryption to AES in CTR mode
Date: Fri, 15 Sep 2017 19:47:53 -0700	[thread overview]
Message-ID: <20170916024753.GA6901@zzz.localdomain> (raw)
In-Reply-To: <20170915223723.20789-1-ard.biesheuvel@linaro.org>

[Added Jason Donenfeld to Cc]

Hi Ard,

On Fri, Sep 15, 2017 at 03:37:23PM -0700, Ard Biesheuvel wrote:
> The ECB chaining mode only supports inputs that are a multiple of the
> blocksize. Furthermore, it is not recommended for direct use, given
> that it may reveal recurring patterns in the plaintext, due to the
> lack of feedback between input blocks. So let's solve both issues at
> once, and switch to AES in CTR mode.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

The choice of ECB here is definitely a mistake, but it really should use an
authenticated encryption mode such as GCM rather than plain CTR.  There was a
patch a few months ago that implemented this and fixed a couple other problems,
but it hasn't been merged; maybe someone wants to take over that patch instead?
Link: http://lkml.kernel.org/r/20170607101209.7603-1-Jason at zx2c4.com

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-09-16  2:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 22:37 [PATCH] security: keys: switch big_key encryption to AES in CTR mode Ard Biesheuvel
2017-09-16  2:47 ` Eric Biggers [this message]
2017-09-16  7:05   ` Ard Biesheuvel
2017-09-16 12:40   ` Jason A. Donenfeld

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=20170916024753.GA6901@zzz.localdomain \
    --to=ebiggers3@gmail.com \
    --cc=linux-security-module@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