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


Groups > linux.kernel > #1548526

Re: [RFC PATCH v2] crypto: Add IV generation algorithms

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: [RFC PATCH v2] crypto: Add IV generation algorithms
Date 2016-12-30 11:30 +0100
Message-ID <sU2BH-364-7@gated-at.bofh.it> (permalink)
References (2 earlier) <sNSc1-8lZ-11@gated-at.bofh.it> <sR7oe-75y-13@gated-at.bofh.it> <sR9gl-8pD-9@gated-at.bofh.it> <sRsVH-41t-7@gated-at.bofh.it> <sTFc6-4L0-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Dec 29, 2016 at 02:53:25PM +0530, Binoy Jayan wrote:
>
> When we keep these in dm-crypt and if more than one key is used
> (it is actually more than one parts of the original key),
> there are more than one cipher instance created - one for each
> unique part of the key. Since the crypto requests are modelled
> to go through the template ciphers in the order:
> 
> "essiv -> cbc -> aes"
> 
> a particular cipher instance of the IV (essiv in this example) is
> responsible to encrypt an entire bigger block. If this bigger block
> is to be later split into 512 bytes blocks and then encrypted using
> the other cipher instance depending on the following formula:
> 
> key_index = sector & (key_count - 1)

This is just a matter of structuring the key for the IV generator.
The IV generator's key in this case should be a combination of the
key to the underlying CBC plus the set of all keys for the IV
generator itself.  It should then allocate the required number of
tfms as is currently done by crypt_alloc_tfms in dm-crypt.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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


Thread

[RFC PATCH v2] IV Generation algorithms for dm-crypt Binoy Jayan <binoy.jayan@linaro.org> - 2016-12-13 10:00 +0100
  Re: [RFC PATCH v2] crypto: Add IV generation algorithms Milan Broz <gmazyland@gmail.com> - 2016-12-13 11:10 +0100
    Re: [RFC PATCH v2] crypto: Add IV generation algorithms Binoy Jayan <binoy.jayan@linaro.org> - 2016-12-14 07:20 +0100
    Re: [RFC PATCH v2] crypto: Add IV generation algorithms Binoy Jayan <binoy.jayan@linaro.org> - 2016-12-16 07:00 +0100
    Re: [RFC PATCH v2] crypto: Add IV generation algorithms Herbert Xu <herbert@gondor.apana.org.au> - 2016-12-22 10:00 +0100
      Re: [RFC PATCH v2] crypto: Add IV generation algorithms Binoy Jayan <binoy.jayan@linaro.org> - 2016-12-22 12:00 +0100
        Re: [RFC PATCH v2] crypto: Add IV generation algorithms Herbert Xu <herbert@gondor.apana.org.au> - 2016-12-23 09:00 +0100
          Re: [RFC PATCH v2] crypto: Add IV generation algorithms Binoy Jayan <binoy.jayan@linaro.org> - 2016-12-29 10:30 +0100
            Re: [RFC PATCH v2] crypto: Add IV generation algorithms Herbert Xu <herbert@gondor.apana.org.au> - 2016-12-30 11:30 +0100
              Re: [RFC PATCH v2] crypto: Add IV generation algorithms Binoy Jayan <binoy.jayan@linaro.org> - 2017-01-02 07:50 +0100
                Re: [RFC PATCH v2] crypto: Add IV generation algorithms Herbert Xu <herbert@gondor.apana.org.au> - 2017-01-02 08:00 +0100
                Re: [RFC PATCH v2] crypto: Add IV generation algorithms Binoy Jayan <binoy.jayan@linaro.org> - 2017-01-02 08:10 +0100
  Re: [RFC PATCH v2] crypto: Add IV generation algorithms Gilad Ben-Yossef <gilad@benyossef.com> - 2017-01-03 15:30 +0100

csiph-web