[Cryptodev-linux-devel] cryptodev-linux 1.9

2017-04-22 Thread Phil Sutter
Hi, I just released current master as new version 1.9. It is comprised of the following commits in addition to the previous release: * fix benchmarks linking * fix Makefile to allow parallel make with -j option * use Linux kernel conventions for Makefile variables * for consistency, use $(...) in

[Cryptodev-linux-devel] tests/cipher-gcm crashes kernel

2017-03-20 Thread Phil Sutter
Hi, Testing cryptodev on a recent kernel (4.10.0), I get an oops when running tests/cipher-gcm. It fails with the last entry in aes_gcm_vectors (the one with auth data). I couldn't find out yet where the problem comes from, but looking at cryptodev_cipher_auth(), it seems like we miss attaching a

Re: [Cryptodev-linux-devel] [PATCH] Fix ablkcipher algorithms usage in v4.8+ kernels

2017-02-09 Thread Phil Sutter
On Thu, Feb 09, 2017 at 11:47:16AM +, Horia Geantă wrote: > On 2/9/2017 12:35 PM, Phil Sutter wrote: > > Hi, > > > > On Wed, Feb 08, 2017 at 04:41:50PM +, Horia Geantă wrote: > >> Phil? > > > > I intentionally left this out since (according to m

Re: [Cryptodev-linux-devel] [PATCH] adjust to API changes in kernel >=4.10

2017-02-09 Thread Phil Sutter
Hi, On Thu, Feb 09, 2017 at 08:28:06AM +, Cristian Stoica wrote: > I'm sure I can find an explanation of why I've written it that way but as I > look at your version I wonder why I didn't recheck my assumptions and > simplify it further. > > Anyway, Phil can apply your suggested version si

Re: [Cryptodev-linux-devel] [PATCH] Fix ablkcipher algorithms usage in v4.8+ kernels

2017-02-09 Thread Phil Sutter
Hi, On Wed, Feb 08, 2017 at 04:41:50PM +, Horia Geantă wrote: > Phil? I intentionally left this out since (according to my INBOX) there are open questions from Michael. Did you sort this out in private? Cheers, Phil ___ Cryptodev-linux-devel maili

Re: [Cryptodev-linux-devel] [PATCH] adjust to API changes in kernel >=4.10

2017-02-08 Thread Phil Sutter
On Wed, Feb 08, 2017 at 12:11:04PM +0200, Cristian Stoica wrote: > There are many changes related to get_user_pages and the code is rewritten > for clarity. > > Signed-off-by: Cristian Stoica Applied, thanks! ___ Cryptodev-linux-devel mailing list Cry

Re: [Cryptodev-linux-devel] Question regarding cryptodev using hardware acceleration for FIPS validation

2017-02-08 Thread Phil Sutter
Hi, On Thu, Feb 02, 2017 at 10:04:56AM -0800, Chirag Shahani wrote: > The accelerated algo. is in use when the code is run on a h/w box which has > the C2xxx SoC with QAT 1.5. > > *O/p from /proc/crypto*: > > name : authenc(hmac(sha512),cbc(des3_ede)) > driver : icp_qat_des3_cbc_sh

Re: [Cryptodev-linux-devel] Question regarding cryptodev using hardware acceleration for FIPS validation

2017-02-02 Thread Phil Sutter
Hi, On Thu, Feb 02, 2017 at 06:53:55AM -0800, Chirag Shahani wrote: > Thanks for your reply. > > Yes. The QAT 1.5 module is loaded. I verified that by: > > cat /proc/icp_c2xxx_dev0/version > +--+ > | Hardware and Software versions for device 0 > |

Re: [Cryptodev-linux-devel] Question regarding cryptodev using hardware acceleration for FIPS validation

2017-02-02 Thread Phil Sutter
Hi Chirag, On Tue, Jan 31, 2017 at 10:58:15AM -0800, Chirag Shahani wrote: [...] > However, when I running the same user space program on a box which has SoC > C2000 co-processor (QAT-1.5), I was expecting the code to* NOT *print > printf("Note: This is not an accelerated cipher\n"). > > > > *

Re: [Cryptodev-linux-devel] [PATCH v2 1/7] fix incorrect return code in case of error from openssl_cioccrypt

2016-12-06 Thread Phil Sutter
On Tue, Nov 29, 2016 at 01:37:18PM +0200, Cristian Stoica wrote: > In this case test_crypto returns the value of "ret" but if openssl_ciocrypt > fails, > the error code was set in "fail" and later ignored > > Signed-off-by: Cristian Stoica All applied (using v3 of patch 3), thanks! Cheers, Phi

Re: [Cryptodev-linux-devel] [PATCH] fix ignored SIGALRM signals on some platforms

2016-11-28 Thread Phil Sutter
On Mon, Oct 31, 2016 at 11:03:45AM +0200, Cristian Stoica wrote: > Signed-off-by: Tudor Ambarus > Signed-off-by: Cristian Stoica Applied, but please try to be a little more verbose especially with non-obvious changes like this one. E.g. which platforms are affected? How did you reproduce the iss

Re: [Cryptodev-linux-devel] [PATCH 6/6] setting KERNEL_DIR is not necessary to build tests

2016-11-28 Thread Phil Sutter
On Wed, Oct 26, 2016 at 02:09:29PM +0300, Cristian Stoica wrote: > Signed-off-by: Cristian Stoica > --- > tests/Makefile | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/tests/Makefile b/tests/Makefile > index 49959de..2502f32 100644 > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -1

Re: [Cryptodev-linux-devel] [PATCH 5/6] fix issues with install target

2016-11-28 Thread Phil Sutter
On Wed, Oct 26, 2016 at 02:09:28PM +0300, Cristian Stoica wrote: > Aparently, on some setups, 'sudo make' will clear the $PWD variable > on the first Makefile expansion. This leads to failures of "sudo make > install" or other issues when trying to preserve the environment with > sudo -E. > > Ther

Re: [Cryptodev-linux-devel] [PATCH 4/6] do more strict code checking to avoid maintenance issues

2016-11-28 Thread Phil Sutter
On Wed, Oct 26, 2016 at 02:09:27PM +0300, Cristian Stoica wrote: > Signed-off-by: Cristian Stoica > --- > tests/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/Makefile b/tests/Makefile > index 5e3111d..49959de 100644 > --- a/tests/Makefile > +++ b/tests/M

Re: [Cryptodev-linux-devel] [PATCH 3/6] remove not used local variables

2016-11-28 Thread Phil Sutter
On Wed, Oct 26, 2016 at 02:09:26PM +0300, Cristian Stoica wrote: > Signed-off-by: Cristian Stoica > --- > tests/async_hmac.c | 2 -- > tests/cipher_comp.c | 2 +- > tests/hash_comp.c | 5 ++--- > tests/hmac.c| 2 -- > tests/sha_speed.c | 1 - > tests/speed.c | 1 - > 6 files ch

Re: [Cryptodev-linux-devel] [PATCH 2/6] fix warnings of "implicit declaration of function" in async_speed

2016-11-28 Thread Phil Sutter
On Wed, Oct 26, 2016 at 02:09:25PM +0300, Cristian Stoica wrote: > Signed-off-by: Cristian Stoica > --- > tests/async_speed.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tests/async_speed.c b/tests/async_speed.c > index 1188599..dad5bc5 100644 > --- a/tests/async_speed.c > +++ b/t

Re: [Cryptodev-linux-devel] [PATCH 1/6] avoid implicit conversion between signed and unsigned char

2016-11-28 Thread Phil Sutter
Hi, On Wed, Oct 26, 2016 at 02:09:24PM +0300, Cristian Stoica wrote: > Signed-off-by: Cristian Stoica > --- > tests/async_cipher.c | 36 ++-- > tests/async_hmac.c | 8 +++ > tests/cipher-aead-srtp.c | 50 +++--- > tests/ciphe

Re: [Cryptodev-linux-devel] Crypto API changes in 4.8

2016-08-06 Thread Phil Sutter
On Sat, Aug 06, 2016 at 01:22:01AM +0200, Michael Weiser wrote: > Hi Phil, > > On Fri, Aug 05, 2016 at 10:09:08PM +0200, Phil Sutter wrote: > > > > I've done some groundwork, mostly research through a well known search > > > engine and in the kernel code. Wh

Re: [Cryptodev-linux-devel] Crypto API changes in 4.8

2016-08-05 Thread Phil Sutter
Hi Michael, On Fri, Aug 05, 2016 at 07:23:38PM +0200, Michael Weiser wrote: > On Fri, Aug 05, 2016 at 01:13:44PM +0200, Michael Weiser wrote: > > > > If you care to provide a patch, I'd happily test/review it. > > > I'll give it a whirl and report back. > > I've done some groundwork, mostly res

Re: [Cryptodev-linux-devel] Rabin Finger Print support

2016-04-07 Thread Phil Sutter
Hi, On Wed, Apr 06, 2016 at 03:38:35PM +0530, Pramod Kumar wrote: > I was looking for “Rabin Finger Print” support in Linux crypto subsystem. I > don’t see it being supported yet. Is anybody putting any effort on this? > Would be great if I’m being pointed to any discussion/effort. You picked th

Re: [Cryptodev-linux-devel] [PATCH 1/3] fix comment typo

2016-03-02 Thread Phil Sutter
On Mon, Feb 15, 2016 at 04:37:39PM +0200, Cristian Stoica wrote: > Signed-off-by: Cristian Stoica Series applied, many thanks! Cheers, Phil ___ Cryptodev-linux-devel mailing list Cryptodev-linux-devel@gna.org https://mail.gna.org/listinfo/cryptodev-li

Re: [Cryptodev-linux-devel] [PATCH 1/2] fix destination for staged installs

2016-02-14 Thread Phil Sutter
On Thu, Feb 11, 2016 at 04:37:23PM +0200, Cristian Stoica wrote: > The standard variable for staged installations is DESTDIR and it should > be set only by the user, outside of Makefile. This is consistent with > recommendations from both GNU Make and FreeBSD porters-handbook. > > make DESTD

Re: [Cryptodev-linux-devel] [PATCH v2] add separate target for building tests

2016-02-14 Thread Phil Sutter
On Wed, Feb 10, 2016 at 04:22:05PM +0200, Cristian Stoica wrote: > A separate target for build is useful with cross-compilation. In this > case it makes sense to build the tests without running them on the host > machine. > > The default target is now 'all' and only builds the tests > > Signed-of

Re: [Cryptodev-linux-devel] [PATCH 0/2] RFC for CIOCHASH digest ioctl

2016-02-14 Thread Phil Sutter
Hi Cristian, On Thu, Jan 21, 2016 at 12:58:55PM +0200, Cristian Stoica wrote: > Hi Phil, > > These two patches add CIOCHASH ioctl that targets only hash operations. It > is a proof of concept with the goal of improving digest performance and make > better > use of Linux crypto-API. Please ignore

Re: [Cryptodev-linux-devel] [v2 PATCH] remove code duplication in cryptodev_hash_init

2016-02-14 Thread Phil Sutter
On Tue, Jan 19, 2016 at 01:19:41PM +0200, Cristian Stoica wrote: > cryptodev_hash_init is concerned mostly with allocating data structures > for hash operations. > This patch replaces the call it makes to crypto_ahash_init with > one to cryptodev_hash_reset to avoid code duplication. This call is m

Re: [Cryptodev-linux-devel] [PATCH] fix the NULL input or output case for get_userbuf

2016-01-20 Thread Phil Sutter
Hi Cristian, On Wed, Jan 20, 2016 at 02:06:49PM +, Cristian Stoica wrote: > > I really have no idea where you're heading at with this. But without further > > context, it doesn't make any sense to me. If you have a functional > > enhancement up your sleeve, I suggest submitting that along with

Re: [Cryptodev-linux-devel] [PATCH] fix the NULL input or output case for get_userbuf

2016-01-19 Thread Phil Sutter
On Tue, Jan 19, 2016 at 01:38:53PM +, Cristian Stoica wrote: > > > On 01/18/2016 11:04 PM, Phil Sutter wrote: > > On Tue, Jan 12, 2016 at 12:08:02PM +0200, Cristian Stoica wrote: > ... > >> - *src_sg = NULL; /* default to no input */ > >> - *dst_sg

Re: [Cryptodev-linux-devel] [PATCH] remove code duplication in cryptodev_hash_init

2016-01-18 Thread Phil Sutter
On Tue, Jan 12, 2016 at 10:16:18AM +0200, Cristian Stoica wrote: > cryptodev_hash_init is concerned mostly with allocating data structures > for hash operations. > This patch replaces the call it makes to crypto_ahash_init with > one to cryptodev_hash_reset to avoid code duplication. This call is m

Re: [Cryptodev-linux-devel] [PATCH] fix clean-up on error path for crypto_create_session

2016-01-18 Thread Phil Sutter
On Mon, Jan 11, 2016 at 05:45:50PM +0200, Cristian Stoica wrote: > This patch fixes clean-up on error path for failed allocations of > ses_new->pages or ses_new->sg. In these cases, allocations made in > cryptodev_hash_init have not been undone resulting in possible memory > leaks. > > We take adv

Re: [Cryptodev-linux-devel] [PATCH 1/3] fix Makefile to allow parallel make with -j option

2016-01-18 Thread Phil Sutter
On Thu, Dec 10, 2015 at 12:42:18PM +0200, Cristian Stoica wrote: > Recursive make commands should always use the variable MAKE, not the > explicit command name ‘make’ > > Documented in section "5.7.1 How the MAKE Variable Works" of GNU Make manual > > Signed-off-by: Cristian Stoica All patches

Re: [Cryptodev-linux-devel] [PATCH] fix the NULL input or output case for get_userbuf

2016-01-18 Thread Phil Sutter
Hi, On Tue, Jan 12, 2016 at 12:08:02PM +0200, Cristian Stoica wrote: > NULL input or output is a valid case and we should not attempt > to write default values to NULL input or output pointers. > > Signed-off-by: Cristian Stoica > --- > zc.c | 3 --- > 1 file changed, 3 deletions(-) > > diff -

Re: [Cryptodev-linux-devel] Compile cryptodev without the kernel headers

2016-01-08 Thread Phil Sutter
Hi, On Fri, Jan 08, 2016 at 09:19:57AM -0200, Marcos Bontempo wrote: > I want to compile the cryptodev module with the 3.12.10 kernel version in the > Beaglebone Black. The problem is that I cannot find the kernel headers for > this version. Is there a way to compile the cryptodev module without

Re: [Cryptodev-linux-devel] [PATCH] Fix compilation against linux 4.3

2015-11-27 Thread Phil Sutter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, Nov 19, 2015 at 12:05:51PM -0300, Gustavo Zacarias wrote: > Linux Crypto API changed to using aead_request_set_ad() > instead of aead_request_set_assoc(). > > Based on Horia Geantă's patch from > https://mail.gna.org/public/cryptodev-linux-dev

Re: [Cryptodev-linux-devel] cryptodev with openssl problem

2015-11-27 Thread Phil Sutter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Mon, Nov 09, 2015 at 12:37:46AM +0900, minkyung park wrote: > I'm using cryptodev (in beaglebone black) with openssl. [...] > But when I do SSL_read & SSL_write after TLS handshaking, the speed of AES > encrypt and decrypt does not improved.

Re: [Cryptodev-linux-devel] cryptodev test failures on Sitara CPU

2015-06-02 Thread Phil Sutter
Hi, On Tue, Jun 02, 2015 at 01:58:58PM +, Andrew Goodbody wrote: > I am running v1.7 of cryptodev module on a TI Sitara CPU and I am getting the > following failures from the cryptodev tests, all the rest pass. > > Can anyone please give me some idea of where I should be looking for the > p

Re: [Cryptodev-linux-devel] cryptodev fails to compile with kernel 4.04 on arch

2015-06-02 Thread Phil Sutter
Hi, On Mon, Jun 01, 2015 at 09:55:16PM +0200, Sebastian Anding wrote: > i tried to compile cryptodev 1.7 on arch linux at a beagle bone black. > > I attached a uname -a, gcc --version and make 2> compile.err and > 1> compile.err.add This looks like a problem in your build system, maybe you are m

Re: [Cryptodev-linux-devel] Problem with OpenSSH/OpenSSL Interaction When Cryptodev is Used

2015-05-27 Thread Phil Sutter
On Wed, May 27, 2015 at 10:36:29PM +0100, Gordan Bobic wrote: > What do I need to change in which file to disable 0-copy? Have a look at main.c, line 239: | if (cop->flags & COP_FLAG_NO_ZC) | ret = __crypto_run_std(ses_ptr, &kcop->cop); | else | ret = __crypto_run_zc(ses_ptr,

Re: [Cryptodev-linux-devel] Problem with OpenSSH/OpenSSL Interaction When Cryptodev is Used

2015-05-27 Thread Phil Sutter
On Wed, May 27, 2015 at 11:20:28AM +0100, Gordan Bobic wrote: > On 2015-05-27 11:07, Phil Sutter wrote: > > Hi, > > > > On Wed, May 27, 2015 at 10:25:00AM +0100, Gordan Bobic wrote: > >> ./cipher-aead-srtp > >> ioctl(CIOCGSESSION): Invalid argument > >

Re: [Cryptodev-linux-devel] Problem with OpenSSH/OpenSSL Interaction When Cryptodev is Used

2015-05-27 Thread Phil Sutter
Hi, On Wed, May 27, 2015 at 10:25:00AM +0100, Gordan Bobic wrote: > ./cipher-aead-srtp > ioctl(CIOCGSESSION): Invalid argument Not sure if this should succeed at all, at least that's not my code. ;) > # ./hmac_comp > requested cipher CRYPTO_AES_CBC and mac CRYPTO_SHA1_HMAC, got cipher > cbc(aes

Re: [Cryptodev-linux-devel] Problem with OpenSSH/OpenSSL Interaction When Cryptodev is Used

2015-05-26 Thread Phil Sutter
Hi, On Tue, May 26, 2015 at 07:29:34PM +0100, Gordan Bobic wrote: > A bit of extra info, with cryptodev_verbosity=2, on 0.9 when the error > occurs: > cryptodev: sshd[1205]: invalid session ID=0xAADBA6A0 > > With 1.7: > cryptodev: sshd[1520] (fill_kcop_from_cop:647): invalid session > ID=0xEC91

Re: [Cryptodev-linux-devel] Consistancy issue with data transfered to my SHA1 driver

2015-05-14 Thread Phil Sutter
Hi, On Wed, May 13, 2015 at 03:51:02PM +0200, Francois Mace wrote: > I can indeed suppose that my driver is a stake here, however, I am not sure > how to proceed to validate and find out the issue since I have to use > cryptodev to interact with it. I did not look very closely at the provided inf

Re: [Cryptodev-linux-devel] cryptodev, mv_cesa & sha1

2015-04-27 Thread Phil Sutter
Hi, On Mon, Apr 27, 2015 at 02:08:29PM +0200, JM wrote: > Hello, > > Thank you for the quick reply. > > I use the mv_cesa driver as shipped by Debian with the 3.16 kernel, which > is almost certainly the same as mainline. > > I tried to run the _comp tools with mv_cesa removed: > > fijam@yukik

Re: [Cryptodev-linux-devel] cryptodev, mv_cesa & sha1

2015-04-27 Thread Phil Sutter
Hello Jan, On Mon, Apr 27, 2015 at 12:44:50PM +0200, JM wrote: > I installed cryptodev 1.7 on my Debian box running on Marvell Feroceon > processor (featuring mv_cesa hardware accelerator). I'm running debian > wheezy with openssl_1.0.1e (with enabled cryptodev and the two recommended > patches) a

Re: [Cryptodev-linux-devel] Issue with "make check"

2015-04-11 Thread Phil Sutter
Hi, On Fri, Apr 10, 2015 at 11:08:10AM +0200, Filip Kubicz wrote: > The version of cc is > > > cc (Ubuntu 4.8.2-18ubuntu1) 4.8.2 > > Copyright (C) 2013 Free Software Foundation, Inc. OK, looks like GCC as well. According to the GCC docs at https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html (d

Re: [Cryptodev-linux-devel] Python bindings for the cryptodev module.

2015-03-04 Thread Phil Sutter
Hi, On Wed, Mar 04, 2015 at 05:50:35PM +0200, Tilemachos Charalampous wrote: > Hello. I'm an undergraduate student studying electrical and computer > engineering at the NTUA. > As part of an Operating Systems course, I worked a bit on the cryptodev > module, and needed it to use it in a Pyhton p

Re: [Cryptodev-linux-devel] cryptodev 1.7 issue with ssh

2015-02-19 Thread Phil Sutter
Hi Corentin, On Thu, Feb 19, 2015 at 02:42:30PM +0100, Corentin LABBE wrote: > I have some issue with cryptodev 1.7 under a gentoo with a 3.19 kernel. > I use the cryptodev engine for openssl (1.0.1k)(compiled with the 2 patch > found on rt.openssl.org) > When the module is loaded, I cannot login

Re: [Cryptodev-linux-devel] cryptodev-linux 1.7

2015-02-08 Thread Phil Sutter
On Sun, Feb 08, 2015 at 09:04:28PM +0100, Nikos Mavrogiannopoulos wrote: > On Sat, 2015-02-07 at 23:01 +0100, Phil Sutter wrote: > > - Fixed 'make dist', replacing most of the manual work in it with a > > simple call to 'git archive' while doing so. > >

Re: [Cryptodev-linux-devel] cryptodev-linux 1.7

2015-02-07 Thread Phil Sutter
I *knew* it. On Sat, Feb 07, 2015 at 11:01:05PM +0100, Phil Sutter wrote: > I have eventually managed to release a new version of cryptodev-linux. > As almost a year has passed since the last release, the list of changes > is a rather long one: There is the bug already: It's 2015,

[Cryptodev-linux-devel] cryptodev-linux 1.7

2015-02-07 Thread Phil Sutter
Hi, I have eventually managed to release a new version of cryptodev-linux. As almost a year has passed since the last release, the list of changes is a rather long one: * Added support for composite AEAD keys by Cristian Stoica. * Added support for sysctl to modify verbosity by Nikolaos Tsakalak

Re: [Cryptodev-linux-devel] Cryptodev-linux-devel Digest, Vol 44, Issue 3

2015-01-09 Thread Phil Sutter
Hi Sri, On Fri, Jan 09, 2015 at 11:22:10PM +0530, sri sowj wrote: > Thanks for the support and time,really appreciate it. > Great to have suggestion on the issue,but still not clear with respect > following. > > #1: "" There is /usr/include/crypto/cryptodev.h and it matches the > cryptodev-linux

Re: [Cryptodev-linux-devel] Any openssl Sample/examples using cryptodev-linux(/dev/crypto)

2015-01-08 Thread Phil Sutter
Hi, On Mon, Jan 05, 2015 at 11:29:48PM +0530, sri sowj wrote: > Can anyone help me to understand How openssl App's can interact with > linux kernel using cryptodev-linux interfaces. > I have tried the sample available in " > http://www.logix.cz/michal/devel/cryptodev/"; > CryptoDev with OpenSSL >

Re: [Cryptodev-linux-devel] [PATCH] fix tag and dst_len calculation for aead ciphers

2014-08-18 Thread Phil Sutter
Hi Christian, On Mon, Aug 18, 2014 at 04:17:42PM +0300, Cristian Stoica wrote: > Hi Phil, > > On 05.08.2014 01:36, Phil Sutter wrote: > > On Thu, Jul 10, 2014 at 01:32:59PM +0300, Cristian Stoica wrote: > >> Calculate tag and destination buffer length in a single

Re: [Cryptodev-linux-devel] [PATCH] fix tag and dst_len calculation for aead ciphers

2014-08-04 Thread Phil Sutter
On Thu, Jul 10, 2014 at 01:32:59PM +0300, Cristian Stoica wrote: > Calculate tag and destination buffer length in a single place to avoid > code duplication. The TLS case is fixed by rounding the destination > length to cipher block size. Applied, thanks. Again, sorry for the delay. Cheers, Phil

Re: [Cryptodev-linux-devel] [PATCH] fix dst_len for TLS mode with aead ciphers

2014-06-30 Thread Phil Sutter
Hi, On Mon, Jun 23, 2014 at 06:57:25PM +0300, Cristian Stoica wrote: > - destination length is rounded to multiple of blockcipher length > before encryption This means we write more data into the userspace-supplied buffer than requested without noticing it. Although this might be correct in reg

Re: [Cryptodev-linux-devel] [PATCH 1/3] use function-local storage for cipher and hmac keys

2014-06-02 Thread Phil Sutter
On Fri, May 30, 2014 at 01:59:02PM +0300, Cristian Stoica wrote: > Composite ciphers (cipher + hmac) use both keys at the same time. This > patch is the first in a series that adds support for composite ciphers > keys. > > Signed-off-by: Cristian Stoica All applied, thanks. Cheers, Phil __

Re: [Cryptodev-linux-devel] ? about cryptosession2

2014-03-05 Thread Phil Sutter
Hi, On Wed, Mar 05, 2014 at 10:01:16AM -0700, Brad Walker wrote: > I noticed that on FreeBSD 7 OpenBSD cryptodev.h defines an ioctl called: > CIOCGSESSION2 > > But, this is not defined in the cryptodev.h file for Linux. > > Curious to know why that is? Cryptodev-linux is meant to be compatible

Re: [Cryptodev-linux-devel] sha1 decrypt example needed..

2014-03-05 Thread Phil Sutter
Hi, On Tue, Mar 04, 2014 at 06:23:51PM -0700, Brad Walker wrote: > I'm trying to understand how to encrypt/decrypt data using SHA1. SHA1 is not a cipher, therefore you can't use it for en-/decryption. > I see there is an example for AES and I have it working. But, I can't seem > to find somethin

Re: [Cryptodev-linux-devel] [PATCH v2] clean-up allocated resources after a failed open

2014-02-14 Thread Phil Sutter
Hi Christian, On Fri, Feb 14, 2014 at 09:00:07AM +, cristian.sto...@freescale.com wrote: > > Nope, that's exactly it. But in this case probably a mistake happened > > when submitting your v2, as it contains the above change. > [] > The v2 patch does not touch the pcr part anymore > (https://g

Re: [Cryptodev-linux-devel] [PATCH v2] clean-up allocated resources after a failed open

2014-02-13 Thread Phil Sutter
Hi Christian, On Thu, Feb 13, 2014 at 07:33:32AM +, cristian.sto...@freescale.com wrote: > Hi Phil, > > > > for (i = 0; i < DEF_COP_RINGSIZE; i++) { > > > tmp = kzalloc(sizeof(struct todo_list_item), GFP_KERNEL); > > > if (!tmp) > > > - return -ENOMEM; >

Re: [Cryptodev-linux-devel] cryptodev & uCLinux..

2014-02-13 Thread Phil Sutter
Brad, On Wed, Feb 12, 2014 at 06:20:31PM -0700, Brad Walker wrote: > I am a Linux consultant working at a start-up over here in Boulder, CO. We > are using uCLinux (based on Linux 2.6.39) on a really powerful processor > (Freescale Kinetis) but it is resource limited. > > The chip has h/w acceler

Re: [Cryptodev-linux-devel] [PATCH v2] clean-up allocated resources after a failed open

2014-02-12 Thread Phil Sutter
Hi, On Wed, Feb 12, 2014 at 09:52:17AM +0200, Cristian Stoica wrote: > If 'open /dev/crypto' fails, all allocated resources must be freed > before "open" returns; "close" can't be called to clean-up since > there is no file descriptor after a failed "open". > > Signed-off-by: Cristian Stoica > -

Re: [Cryptodev-linux-devel] [PATCH] clean-up allocated resources after a failed open

2014-02-11 Thread Phil Sutter
Hi, Thanks for your patch, please see my comments below. On Tue, Feb 11, 2014 at 12:43:13PM +0200, Cristian Stoica wrote: > If 'open /dev/crypto' fails, all allocated resources must be freed > before "open" returns; "close" can't be called to clean-up since > there is no file descriptor after a f

Re: [Cryptodev-linux-devel] [RFC 1/9] fix private data memleak

2014-01-27 Thread Phil Sutter
Hey Christian, On Mon, Jan 27, 2014 at 07:53:56AM +, cristian.sto...@freescale.com wrote: > > Why should that be necessary? > The patch is concerned with 'close' being called with garbage input. > I'm not sure about the call chain here: is 'close' never called when 'open' > fails? What is the

Re: [Cryptodev-linux-devel] [RFC 1/9] fix private data memleak

2014-01-24 Thread Phil Sutter
Hi Christian, On Thu, Jan 23, 2014 at 07:29:06AM +, cristian.sto...@freescale.com wrote: > You may want to have a look at this patch since it addresses an incomplete > fix of mine. [snip] > > diff --git a/ioctl.c b/ioctl.c > > index 999fb31..7a69e5a 100644 > > --- a/ioctl.c > > +++ b/ioctl.

Re: [Cryptodev-linux-devel] [PATCH v2] Replace INIT_COMPLETION with reinit_completion.

2014-01-22 Thread Phil Sutter
On Thu, Jan 16, 2014 at 12:18:08PM +0200, Horia Geanta wrote: > From: Cosmin Paraschiv > > In the 3.13-rc1 Linux kernel, the INIT_COMPLETION macro has been replaced > with an inline function, reinit_completion [1][2]. We are currently > using the 3.13-rc3 Linux kernel, which leads to the followin

Re: [Cryptodev-linux-devel] [PATCH] Replace INIT_COMPLETION with reinit_completion.

2014-01-21 Thread Phil Sutter
Hi Christian, On Tue, Jan 21, 2014 at 08:26:35AM +, cristian.sto...@freescale.com wrote: > Hi Phil, > > > Wouldn't it be better to conditionally define INIT_COMPLETION to > > reinit_completion for newer kernels? Doesn't this break downwards > > compatibility? > > > > I could think of somethi

Re: [Cryptodev-linux-devel] [PATCH] Replace INIT_COMPLETION with reinit_completion.

2014-01-15 Thread Phil Sutter
On Wed, Jan 15, 2014 at 06:21:30PM +0200, Horia Geantă wrote: > On 1/15/2014 5:46 PM, Phil Sutter wrote: > > Hi, > > > > On Wed, Jan 15, 2014 at 05:22:18PM +0200, Horia Geanta wrote: > >> From: Cosmin Paraschiv > >> > >> In the 3.12 Linux ker

Re: [Cryptodev-linux-devel] [PATCH] Replace INIT_COMPLETION with reinit_completion.

2014-01-15 Thread Phil Sutter
Hi, On Wed, Jan 15, 2014 at 05:22:18PM +0200, Horia Geanta wrote: > From: Cosmin Paraschiv > > In the 3.12 Linux kernel, the INIT_COMPLETION macro has been replaced > with an inline function, reinit_completion [1][2]. We are currently > using the 3.13-rc3 Linux kernel, which leads to the followi

Re: [Cryptodev-linux-devel] Authenticated encryption

2013-09-15 Thread Phil Sutter
Hi, On Sun, Sep 15, 2013 at 06:56:14PM +0200, Nikos Mavrogiannopoulos wrote: > On Thu, 12 Sep 2013 13:42:05 + > Stoica Cristian-B18196 wrote: > > > Hi Nikos, > > > > I'm looking at a possibility to add support for composite algorithms > > in cryptodev. Basically this means support for algor

Re: [Cryptodev-linux-devel] [PATCH] allow user override for kernel and installation directory

2013-06-27 Thread Phil Sutter
Hi, On Thu, Jun 27, 2013 at 05:39:59PM -0600, Anthony Foiani wrote: > Cristian -- > > On Thu, Jun 27, 2013 at 7:42 AM, Cristian Stoica > wrote: > > - this is useful for cross-building for embedded systems > > This patch shouldn't be necessary: you can give variable assignments > as arguments on

Re: [Cryptodev-linux-devel] Asynchronous support in Cryptodev is buggy

2013-02-16 Thread Phil Sutter
Hello Yashpal, On Fri, Feb 15, 2013 at 03:22:54PM +, Dutta Yashpal-B05456 wrote: > This can break because copy_from/to_user() copies from the current user > process (which should be obvious, since > there's no way to tell it which user process to copy from). > > In a syscall invoked by your

Re: [Cryptodev-linux-devel] Asynchronous support in Cryptodev is buggy

2013-02-14 Thread Phil Sutter
Hi, On Thu, Feb 14, 2013 at 05:20:07PM +, Dutta Yashpal-B05456 wrote: > Looked at asynchronous support in Cryptodev-1.5 and found that it is getting > in following flow > cryptask_routine calling crypto_run. Now in crypto_run API, all the > user-space process provided > buffers are either b

Re: [Cryptodev-linux-devel] sha1 with CESA

2012-09-24 Thread Phil Sutter
Hi, On Mon, Sep 24, 2012 at 09:13:15PM +0200, Lluís Batlle i Rossell wrote: > On Mon, Sep 24, 2012 at 08:54:31PM +0200, Nikos Mavrogiannopoulos wrote: > > On 09/24/2012 08:46 PM, Lluís Batlle i Rossell wrote: > > memcpy? Do you see any error message "Error getting user pages. Falling > > back to n

[Cryptodev-linux-devel] [PATCH 2/4] zc.c: simplify code a bit by exiting early

2012-07-16 Thread Phil Sutter
Also, hiding expressions in one-liners is not worth the lines saved. Signed-off-by: Phil Sutter --- zc.c | 98 - 1 files changed, 48 insertions(+), 50 deletions(-) diff --git a/zc.c b/zc.c index 773dfb4..db28b58 100644 --- a

[Cryptodev-linux-devel] [PATCH 4/4] cryptlib: simplify cryptodev_cipher_auth()

2012-07-16 Thread Phil Sutter
Signed-off-by: Phil Sutter --- cryptlib.h |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cryptlib.h b/cryptlib.h index 729679c..1745d0f 100644 --- a/cryptlib.h +++ b/cryptlib.h @@ -36,10 +36,8 @@ ssize_t cryptodev_cipher_encrypt(struct cipher_data *cdata, inline

[Cryptodev-linux-devel] [PATCH 1/4] whitespace and indenting cleanup

2012-07-16 Thread Phil Sutter
Signed-off-by: Phil Sutter --- authenc.c | 28 ++-- cryptlib.c |2 +- cryptlib.h |2 +- cryptodev_int.h |2 +- ioctl.c |4 ++-- lib/benchmark.c |8 lib/combo.c | 22 +++--- lib/hash.c

[Cryptodev-linux-devel] [PATCH 3/4] no need to hold mm->mmap_sem in write lock

2012-07-16 Thread Phil Sutter
As other examples show, read lock suffices although pages are being written later on. Signed-off-by: Phil Sutter --- zc.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zc.c b/zc.c index db28b58..884dbab 100644 --- a/zc.c +++ b/zc.c @@ -58,10 +58,10 @@ int

Re: [Cryptodev-linux-devel] openssl patch state

2012-06-15 Thread Phil Sutter
Hey, On Fri, Jun 15, 2012 at 01:41:50PM +0200, Nikos Mavrogiannopoulos wrote: > On Fri, Jun 15, 2012 at 12:41 PM, Phil Sutter wrote: > > Hi, > > On Thu, Jun 14, 2012 at 04:38:03PM +0200, Nikos Mavrogiannopoulos wrote: > >>  Which changes do you refer to? If I remember

Re: [Cryptodev-linux-devel] openssl patch state

2012-06-15 Thread Phil Sutter
Hi, On Thu, Jun 14, 2012 at 04:38:03PM +0200, Nikos Mavrogiannopoulos wrote: > Which changes do you refer to? If I remember well this file is based > on the eng_cryptodev.c of 1.0.1. Particularly those: | } digests[] = { | +#if 0 | +/* HMAC is not supported */ | { CRYPTO_MD5_HM

[Cryptodev-linux-devel] openssl patch state

2012-06-14 Thread Phil Sutter
Hi, I am currently comparing eng_cryptodev.c in current cryptodev-linux git with the same file in openssl-1.0.0c, wondering about the differences. Why the commented out support for HMAC modes? I assume cryptodev-linux should still serve as drop-in replacement to OCF, so we should really keep this

Re: [Cryptodev-linux-devel] (no subject)

2012-02-29 Thread Phil Sutter
Hi, On Wed, Feb 29, 2012 at 01:19:43PM +0100, Nikos Mavrogiannopoulos wrote: > On Tue, Feb 28, 2012 at 11:56 PM, Phil Sutter wrote: > > Another thing I just noticed, these commit-mails are somehow broken. > > E.g. backslashes are missing completely, and worse they're som

Re: [Cryptodev-linux-devel] (no subject)

2012-02-28 Thread Phil Sutter
Hi, On Tue, Feb 28, 2012 at 10:37:59PM +0100, Nikos Mavrogiannopoulos wrote: > On 02/28/2012 06:27 PM, Phil Sutter wrote: > > > From Phil Sutter # This line is ignored. > > From: Phil Sutter > > Subject: Fixup of my initial patch series > > In-Reply-To: 133

[Cryptodev-linux-devel] [Patch v2 2/2] tests: add three compare tools using openssl_wrapper

2012-02-28 Thread Phil Sutter
Signed-off-by: Phil Sutter --- .gitignore |3 + tests/Makefile |8 ++- tests/cipher_comp.c | 159 + tests/hash_comp.c | 150 ++ tests/hmac_comp.c | 180

[Cryptodev-linux-devel] [Patch v2 1/2] tests: add cryptodev simulating openssl wrapper

2012-02-28 Thread Phil Sutter
Signed-off-by: Phil Sutter --- tests/openssl_wrapper.c | 267 +++ tests/openssl_wrapper.h |6 + 2 files changed, 273 insertions(+), 0 deletions(-) create mode 100644 tests/openssl_wrapper.c create mode 100644 tests/openssl_wrapper.h diff --git

[Cryptodev-linux-devel] (no subject)

2012-02-28 Thread Phil Sutter
>From Phil Sutter # This line is ignored. From: Phil Sutter Subject: Fixup of my initial patch series In-Reply-To: 1330443633-12558-1-git-send-email-phil.sut...@viprinet.com - forgot to add openssl_wrapper.h - aligned second patch's subject line with the first one Greetin

[Cryptodev-linux-devel] [PATCH 1/2] tests: add cryptodev simulating openssl wrapper

2012-02-28 Thread Phil Sutter
Signed-off-by: Phil Sutter --- tests/openssl_wrapper.c | 267 +++ 1 files changed, 267 insertions(+), 0 deletions(-) create mode 100644 tests/openssl_wrapper.c diff --git a/tests/openssl_wrapper.c b/tests/openssl_wrapper.c new file mode 100644

[Cryptodev-linux-devel] [PATCH 2/2] add three compare tools using openssl_wrapper

2012-02-28 Thread Phil Sutter
Signed-off-by: Phil Sutter --- .gitignore |3 + tests/Makefile |8 ++- tests/cipher_comp.c | 159 + tests/hash_comp.c | 150 ++ tests/hmac_comp.c | 180

Re: [Cryptodev-linux-devel] comparison of the AF_ALG interface with the /dev/crypto

2011-09-01 Thread Phil Sutter
Herbert, On Thu, Sep 01, 2011 at 10:14:45PM +0800, Herbert Xu wrote: > Phil Sutter wrote: > > > > chunksize af_alg cryptodev (100 * cryptodev / af_alg) > > -- > > 512

Re: [Cryptodev-linux-devel] comparison of the AF_ALG interface with the /dev/crypto

2011-09-01 Thread Phil Sutter
Herbert, On Thu, Sep 01, 2011 at 12:15:34PM +1000, Herbert Xu wrote: > Nikos Mavrogiannopoulos wrote: > > > > Given my benchmarks have no issues, it is not apparent to me why one > > should use AF_ALG instead of cryptodev. I do not know though why AF_ALG > > performs so poor. I'd speculate by bla

Re: [Cryptodev-linux-devel] comparison of the AF_ALG interface with the /dev/crypto

2011-08-30 Thread Phil Sutter
Hi, On Sun, Aug 28, 2011 at 03:17:00PM +0200, Nikos Mavrogiannopoulos wrote: > I've compared the cryptodev [0] and AF_ALG interfaces in terms of > performance [1]. I've put the results, as well as the benchmarks used > in: http://home.gna.org/cryptodev-linux/comparison.html Well done, Nikos! I

Re: [Cryptodev-linux-devel] [PATCH 4/5] add support for specifying the cpu to run on

2011-01-26 Thread Phil Sutter
Hi, On Tue, Jan 25, 2011 at 01:29:37PM +0100, Nikos Mavrogiannopoulos wrote: > >>  I have applied up to here... This is an interesting patch, but I'm > >> more curious on how you use it in practice? Is to load balance > >> across CPUs? If this is the purpose shouldn't it be implicit > >> and only

Re: [Cryptodev-linux-devel] [PATCH 4/5] add support for specifying the cpu to run on

2011-01-24 Thread Phil Sutter
Hey Nikos, On Sat, Jan 22, 2011 at 12:19:30PM +0100, Nikos Mavrogiannopoulos wrote: > On 01/18/2011 06:33 PM, Phil Sutter wrote: > > For simplicity's sake, this is a per-fd option, and therefore applies to > > all sessions opened over it. > > Hello Phil, > I have

[Cryptodev-linux-devel] [PATCH 2/5] alignment checks: prevent spurious warnings when ses->alignmask == 0

2011-01-18 Thread Phil Sutter
--- cryptodev_main.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptodev_main.c b/cryptodev_main.c index 0f93010..efd08c8 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -595,7 +595,7 @@ static int get_userbuf(struct csession *ses, struct kernel_crypt_op

[Cryptodev-linux-devel] [PATCH 5/5] set the cpu affinity in async_speed as an example

2011-01-18 Thread Phil Sutter
--- examples/async_speed.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/examples/async_speed.c b/examples/async_speed.c index 4aea5e3..1a5128c 100644 --- a/examples/async_speed.c +++ b/examples/async_speed.c @@ -162,6 +162,16 @@ int main(void)

[Cryptodev-linux-devel] [PATCH 1/5] enable CIOCGSESSINFO for compat-calls, too

2011-01-18 Thread Phil Sutter
--- cryptodev_main.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/cryptodev_main.c b/cryptodev_main.c index cb81107..0f93010 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -1267,6 +1267,7 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned

[Cryptodev-linux-devel] [PATCH 3/5] examples: add some additional speed testing tools

2011-01-18 Thread Phil Sutter
/hashcrypt_speed.c @@ -0,0 +1,201 @@ +/* hashcrypt_speed - simple SHA+AES benchmark tool for cryptodev + * + *Copyright (C) 2011 by Phil Sutter + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by

[Cryptodev-linux-devel] [PATCH 4/5] add support for specifying the cpu to run on

2011-01-18 Thread Phil Sutter
For simplicity's sake, this is a per-fd option, and therefore applies to all sessions opened over it. --- cryptodev.h |1 + cryptodev_main.c | 14 +- 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/cryptodev.h b/cryptodev.h index db4697c..8126bfc 100644 --- a

[Cryptodev-linux-devel] [PATCH] allow updating the IV in userspace

2011-01-18 Thread Phil Sutter
When the user has specified COP_FLAG_WRITE_IV in crypt_op.flags, the updated IV will be written back to userspace. This is useful for encryption of continuous data in several steps, without having to care for each cipher's inerna. Protecting this functionality by a flag allows for backwards compat

[Cryptodev-linux-devel] [PATCH] export the alignmask but stay compatible to OCF

2011-01-17 Thread Phil Sutter
--- cryptodev.h |4 ++-- cryptodev_int.h |2 -- cryptodev_main.c|4 +++- examples/async_cipher.c | 45 ++--- examples/async_speed.c | 25 ++--- examples/cipher.c | 28 ++

Re: [Cryptodev-linux-devel] [PATCH 4/4] export cra_name and cra_driver_name to userspace

2011-01-17 Thread Phil Sutter
Hi, On Sat, Jan 15, 2011 at 01:48:47PM +0100, Nikos Mavrogiannopoulos wrote: > On 01/03/2011 04:01 PM, Phil Sutter wrote: > > Hey Nikos, > > > > On Wed, Dec 15, 2010 at 02:26:50PM +0100, Nikos Mavrogiannopoulos wrote: > >> I've applied patches 1-3, but

  1   2   >