Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1735525

Re: [PATCH v6] security/keys: rewrite all of big_key crypto

From Stephan Mueller <smueller@chronox.de>
Newsgroups linux.kernel
Subject Re: [PATCH v6] security/keys: rewrite all of big_key crypto
Date 2017-09-20 07:40 +0200
Message-ID <urFTQ-79w-9@gated-at.bofh.it> (permalink)
References <uqGoV-7u3-1@gated-at.bofh.it> <uqGoV-7u3-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Am Sonntag, 17. September 2017, 13:52:17 CEST schrieb Jason A. Donenfeld:

Hi Jason,

>   * Use of ECB mode, allowing an attacker to trivially swap blocks or
>     compare identical plaintext blocks.

The use of GCM with the implementtion here is just as challenging. The 
implementation uses a NULL IV. GCM is a very brittle cipher where the 
construction of the IV is of special importance. SP800-38D section 8.2.1 and 
8.2.2 outlines the generation methods of the IV. A collision of keys/IVs is 
fatal. I understand that keys are generated anew each time which makes that 
issue less critical here. However, as user space may see the ciphertext, GCM 
should simply not be used.

A fix could be as easy as to use CCM or one of the authenc() ciphers. Yet, for 
both I am not sure how a zero IV affects the cipher.

The cipher where you do not need to handle the IV at all would be the RFC3394/
SP800-38F keywrapping cipher which is meant for the encryption of key material 
which includes authentication as well. It is available as an skcipher under 
the name of kw(aes). If you want to use it, please be careful that you obtain 
the generated IV to be stored with the plaintext as documented in the comments 
in crypto/keywrap.c


Ciao
Stephan

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-16 15:10 +0200
  [PATCH v5] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-16 15:20 +0200
    Re: [PATCH v5] security/keys: rewrite all of big_key crypto Eric Biggers <ebiggers3@gmail.com> - 2017-09-17 08:10 +0200
      Re: [PATCH v5] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-17 14:00 +0200
        [PATCH v6] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-17 14:00 +0200
          Re: [PATCH v6] security/keys: rewrite all of big_key crypto David Howells <dhowells@redhat.com> - 2017-09-19 17:40 +0200
            Re: [PATCH v6] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-20 17:00 +0200
          Re: [PATCH v6] security/keys: rewrite all of big_key crypto Stephan Mueller <smueller@chronox.de> - 2017-09-20 07:40 +0200
            Re: [PATCH v6] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-20 13:00 +0200
              Re: [PATCH v6] security/keys: rewrite all of big_key crypto Stephan Mueller <smueller@chronox.de> - 2017-09-20 15:50 +0200
                Re: [PATCH v6] security/keys: rewrite all of big_key crypto Stephan Mueller <smueller@chronox.de> - 2017-09-20 16:10 +0200
                Re: [PATCH v6] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-20 16:10 +0200
                Re: [PATCH v6] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-20 16:10 +0200
  Re: [PATCH v4] security/keys: rewrite all of big_key crypto Stephan Mueller <smueller@chronox.de> - 2017-09-18 11:00 +0200
    Re: [kernel-hardening] Re: [PATCH v4] security/keys: rewrite all of  big_key crypto Greg KH <gregkh@linuxfoundation.org> - 2017-09-18 11:10 +0200
      Re: [kernel-hardening] Re: [PATCH v4] security/keys: rewrite all of big_key crypto Stephan Mueller <smueller@chronox.de> - 2017-09-18 11:20 +0200
    Re: [PATCH v4] security/keys: rewrite all of big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-18 13:30 +0200
      Re: [PATCH v4] security/keys: rewrite all of big_key crypto Theodore Ts'o <tytso@mit.edu> - 2017-09-19 16:30 +0200
        Re: [kernel-hardening] Re: [PATCH v4] security/keys: rewrite all of  big_key crypto Sandy Harris <sandyinchina@gmail.com> - 2017-09-19 21:10 +0200
          Re: [kernel-hardening] Re: [PATCH v4] security/keys: rewrite all of  big_key crypto "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-09-19 21:20 +0200
          Re: [kernel-hardening] Re: [PATCH v4] security/keys: rewrite all of  big_key crypto Theodore Ts'o <tytso@mit.edu> - 2017-09-20 03:20 +0200

csiph-web