[PATCH] crypto: tcrypt: Remove VLA usage

2018-04-26 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this allocates the return code buffers before starting jiffie timers, rather than using stack space for the array. Additionally cleans up some exit paths and make sure that the num_mb module_param() is used only once per execution to av

Re: [PATCH v2 0/2] crypto: removing various VLAs

2018-04-26 Thread Salvatore Mesoraca
2018-04-20 18:51 GMT+02:00 Herbert Xu : > On Mon, Apr 09, 2018 at 03:54:45PM +0200, Salvatore Mesoraca wrote: >> v2: >> As suggested by Herbert Xu, the blocksize and alignmask checks >> have been moved to crypto_check_alg. >> So, now, all the other separate checks are not necessar

Re: [PATCH v2 0/5] crypto: Speck support

2018-04-26 Thread Paul Crowley
> Oh, OK, that sounds like something resembling Naor-Reingold or its > relatives. That would work, but with 3 or 4 passes I guess it wouldn't > be very fast. It most resembles HCH mode https://eprint.iacr.org/2007/028 using two passes of Poly1305, one pass of ChaCha20, and one invocation of a 128-

Re: [PATCH V8 1/5] crypto: Multi-buffer encryption infrastructure support

2018-04-26 Thread Herbert Xu
On Wed, Apr 25, 2018 at 01:14:26AM +, Dey, Megha wrote: > > Is there any existing implementation of async crypto algorithm that uses the > above approach? The ones I could find are either sync, have an outer and > inner algorithm or use cryptd. > > I tried removing the mcryptd layer and the

Re: [PATCH v2 1/2] crypto: ccree: enable support for hardware keys

2018-04-26 Thread Gilad Ben-Yossef
On Wed, Apr 25, 2018 at 6:47 PM, Tudor Ambarus wrote: > Hi, Gilad, > > On 04/23/2018 10:25 AM, Gilad Ben-Yossef wrote: >> >> Enable CryptoCell support for hardware keys. >> >> Hardware keys are regular AES keys loaded into CryptoCell internal memory >> via firmware, often from secure boot ROM or h