[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160623033758.GA7819@gondor.apana.org.au>
Date: Thu, 23 Jun 2016 11:37:59 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Andy Lutomirski <luto@...capital.net>
Cc: Andy Lutomirski <luto@...nel.org>, linux-bluetooth@...r.kernel.org,
Johan Hedberg <johan.hedberg@...il.com>,
Gustavo Padovan <gustavo@...ovan.org>,
Marcel Holtmann <marcel@...tmann.org>,
linux-crypto@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: Doing crypto in small stack buffers (bluetooth vs vmalloc-stack
crash, etc)
On Wed, Jun 22, 2016 at 02:48:24PM -0700, Andy Lutomirski wrote:
>
> Before I do this, can you explain what the difference is between
> crypto_cipher and crypto_skcipher? net/bluetooth/smp.c currently uses
> crypto_alloc_skcipher, which you added in:
crypto_cipher operates on a single block. crypto_skcipher uses
modes of operations and works on multiple blocks.
>
> commit 71af2f6bb22a4bf42663e10f1d8913d4967ed07f
> Author: Herbert Xu <herbert@...dor.apana.org.au>
> Date: Sun Jan 24 21:18:30 2016 +0800
>
> Bluetooth: Use skcipher and hash
>
> Am I just supposed to replace "skcipher" with "cipher" everywhere?
If you're operating on one block only then you should use cipher,
otherwise skcipher would be the appropriate choice.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists