Re: [PATCH v2 2/2] crypto, x86: SSSE3 based SHA1 implementation for x86-64

2011-08-08 Thread Sandy Harris
On Mon, Aug 8, 2011 at 1:48 PM, Locktyukhin, Maxim maxim.locktyuk...@intel.com wrote: 20 (and more) cycles per byte shown below are not reasonable numbers for SHA-1 - ~6 c/b (as can be seen in some of the results for Core2) is the expected results ... Ten years ago, on Pentium II, one

Re: [PATCH] lib/sha1: remove memsets and allocate workspace on the stack

2011-08-08 Thread Joe Perches
On Mon, 2011-08-08 at 16:07 -0700, Mandeep Singh Baines wrote: The previous implementation required the workspace to be passed in as a parameter. This prevents the compiler from being able to store the workspace in registers. I've also removed the memset since that also prevents the compiler

Re: [PATCH] lib/sha1: remove memsets and allocate workspace on the stack

2011-08-08 Thread Linus Torvalds
On Mon, Aug 8, 2011 at 4:07 PM, Mandeep Singh Baines m...@chromium.org wrote: There is no loss of security due to removing the memset. It would be a bug for the stack to leak to userspace. However, a defence-in-depth argument could be made for keeping the clearing of the workspace. So I'm

Re: [PATCH] lib/sha1: remove memsets and allocate workspace on the stack

2011-08-08 Thread Mandeep Singh Baines
Joe Perches (j...@perches.com) wrote: On Mon, 2011-08-08 at 16:07 -0700, Mandeep Singh Baines wrote: The previous implementation required the workspace to be passed in as a parameter. This prevents the compiler from being able to store the workspace in registers. I've also removed the