[PATCH] crypto: caam - fix dbg_dump_sg() style issues

2016-09-22 Thread Catalin Vasile
Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 43 --- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index eb97562..c8ebddb 100644 --- a/drivers/crypto/caam

[PATCH v2] crypto: caam - fix sg dump

2016-09-22 Thread Catalin Vasile
Ensure scatterlists have a virtual memory mapping before dumping. Signed-off-by: Catalin Vasile --- Changes: V2: * resolved issue of sleeping in atomic contexts --- --- drivers/crypto/caam/caamalg.c | 79 +-- 1 file changed, 61

[PATCH] crypto: caam - fix sg dump

2016-09-16 Thread Catalin Vasile
Ensure scatterlists have a virtual memory mapping before dumping. Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 65 +-- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam

[PATCH] crypto: caam - fix rfc3686(ctr(aes)) IV load

2016-08-31 Thread Catalin Vasile
-nonce is being loaded using append_load_imm_u32() instead of append_load_as_imm() (nonce is a byte array / stream, not a 4-byte variable) -counter is not being added in big endian format, as mandatated by RFC3686 and expected by the crypto engine Signed-off-by: Catalin Vasile Reviewed-by: Horia

Re: IV generation in cryptographic driver in AEAD

2016-05-19 Thread Catalin Vasile
Inline comments From: Denis B Sent: Wednesday, May 18, 2016 5:21 PM To: Catalin Vasile Cc: linux-crypto@vger.kernel.org Subject: Re: IV generation in cryptographic driver in AEAD Forgive my dumbness, but in: .cra_type = &crypto_aead_

Re: IV generation in cryptographic driver in AEAD

2016-05-18 Thread Catalin Vasile
ESP IPv4 – esp4.c), in kernel versions prior to 4.2 the cryptographic driver is expected to generate an IV. What if my driver is unable to generate an IV? [Catalin Vasile] Simple: You do not implement the givcrypt() primitive. The kernel will generate the IV in software and then call your encrypt

Re: Decrypting data in RX path

2016-05-18 Thread Catalin Vasile
e deferred decryption checked. I see esp_input_done2 as well. How is the flow and call of these callbacks happening. [Catalin Vasile] "aead_request_set_callback(req, 0, esp_output_done_esn, skb);" This piece of code sets into the request structure a callback. After the job is queued,

Re: Decrypting data in RX path

2016-05-16 Thread Catalin Vasile
g raw sockets or after socket recv). What precautions should be taken in terms of locking while using crypto api's in kernel space in RX path (Softirq context) --> Can someone point to existing sample in kernel where decryption is done in RX path. [Catalin Vasile] Look into net/ipv6/esp6.c. It

Re: [PATCH] crypto: caam: add backlogging support

2016-05-13 Thread Catalin Vasile
> > From: Herbert Xu > Sent: Wednesday, May 11, 2016 1:54 PM > To: Catalin Vasile > Cc: linux-crypto@vger.kernel.org; linux-crypto-ow...@vger.kernel.org; Horia > Ioan Geanta Neag; Alexandru Porosanu; Scott Wood > Subject: Re: [PAT

Re: [PATCH] crypto: caam: add backlogging support

2016-05-11 Thread Catalin Vasile
> > > From: Herbert Xu > Sent: Tuesday, May 10, 2016 12:46 PM > To: Catalin Vasile > Cc: linux-crypto@vger.kernel.org; linux-crypto-ow...@vger.kernel.org; Horia > Ioan Geanta Neag; Alexandru Porosanu; Scott Wood; Catalin Vasile

[PATCH] crypto: caam: fix caam_jr_alloc() ret code

2016-05-06 Thread Catalin Vasile
continued to think it had allocated a valid JR dev instance to the session and at some point it tries to do a caam_jr_free() on a NULL JR dev pointer. This patch is a fix for this issue. Signed-off-by: Catalin Vasile --- drivers/crypto/caam/jr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] crypto: caam: add backlogging support

2016-05-06 Thread Catalin Vasile
full, the job is enqueued. Signed-off-by: Alexandru Porosanu Tested-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 88 -- drivers/crypto/caam/caamhash.c | 101 +++-- drivers/crypto/caam/intern.h | 7 ++ drivers/crypto/caam/jr.c

Re: [RFC 1/2] crypto: tcrypt - Add acipher bandwidth tests support

2016-02-02 Thread Catalin Vasile
>From: Herbert Xu >Sent: Monday, February 1, 2016 4:21 PM >To: Catalin Vasile >Cc: linux-crypto@vger.kernel.org; linux-crypto-ow...@vger.kernel.org; Horia >Ioan Geanta Neag; Cristian Stoica; Alexandru Porosanu; Catalin Vasile >Sub

[RFC 2/2] crypto: tcrypt - Add ahash digest bandwidth tests support

2016-01-29 Thread Catalin Vasile
Signed-off-by: Catalin Vasile --- crypto/tcrypt.c | 190 1 file changed, 190 insertions(+) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index f56419d..02a3856 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1316,6 +1316,176

[RFC 1/2] crypto: tcrypt - Add acipher bandwidth tests support

2016-01-29 Thread Catalin Vasile
Signed-off-by: Catalin Vasile --- crypto/tcrypt.c | 501 1 file changed, 501 insertions(+) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 270bc4b..f56419d 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -35,6 +35,7

tcrypt bandwidth tests

2016-01-29 Thread Catalin Vasile
I have attached to this e-mail a set of patches that introduce bandwitdth tests for tcrypt. The mindset of these patches is to send as much asynchronous jobs as possible and, after a set period of time, to count how many of them have actually been done. These patches are at the stage of POC (proof

[PATCH] crypto: caam - add support for acipher xts(aes)

2015-10-02 Thread Catalin Vasile
Tera of possible values for sector index. Signed-off-by: Cristian Hristea Signed-off-by: Horia Geanta Signed-off-by: Alex Porosanu Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 138 +- 1 file changed, 137 insertions(+), 1 deletion

[PATCH] crypto: caam - add support for givencrypt cbc(des) and cbc(des3_ede)

2014-11-11 Thread Catalin Vasile
Merge DES Cipher Block Chaining mode (CBC) and Triple DES Cipher Block Chaining mode (CBC) algorithms from ablkcipher to givencrypt. Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam

[PATCH 4/4] crypto: caam - add support for givencrypt cbc(aes) and rfc3686(ctr(aes))

2014-10-31 Thread Catalin Vasile
Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 285 +- 1 file changed, 281 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index cdcc6cb..3e0492c 100644 --- a/drivers/crypto/caam

[PATCH 1/4] crypto: caam - add support for ctr(aes)

2014-10-31 Thread Catalin Vasile
Add support for AES working in Counter Mode Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 40 ++- drivers/crypto/caam/desc_constr.h | 2 ++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c

[PATCH 2/4] crypto: caam - add support for rfc3686(ctr(aes))

2014-10-31 Thread Catalin Vasile
descriptor. Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 83 --- drivers/crypto/caam/compat.h | 1 + 2 files changed, 79 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 859ebe8

[PATCH 3/4] crypto: caam - add support for rfc3686 with authenc md5, sha1 and sha2

2014-10-31 Thread Catalin Vasile
Add support for AES Counter Mode (CTR) compliant with RFC3686 to be used along with authenc algorithms (md5, sha1, sha224, sha256, sha384, sha512) as one-shot aead algorithms. Signed-off-by: Catalin Vasile --- drivers/crypto/caam/caamalg.c | 262 +- 1