All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Horia Geantă" <horia.geanta@freescale.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Marcelo Henrique Cerri <mhcerri@linux.vnet.ibm.com>,
	Fionnuala Gunter <fin@linux.vnet.ibm.com>,
	<ruchika.gupta@freescale.com>, <cristian.stoica@freescale.com>,
	<NiteshNarayanLal@freescale.com>, <jinyanjiang@gmail.com>,
	Tudor Ambarus <tudor.ambarus@freescale.com>
Subject: Re: [PATCH 6/8] crypto: caam - Convert GCM to new AEAD interface
Date: Mon, 15 Jun 2015 15:33:20 +0300	[thread overview]
Message-ID: <557EC610.9070309@freescale.com> (raw)
In-Reply-To: <E1Z4PSj-00084W-6B@gondolin.me.apana.org.au>

On 6/15/2015 11:09 AM, Herbert Xu wrote:
> This patch converts the caam GCM implementations to the new AEAD
> interface.  This is compile-tested only.
> 
> Note that all IV generation for GCM algorithms have been removed.
> The reason is that the current generation uses purely random IVs
> which is not appropriate for counter-based algorithms where we
> first and foremost require uniqueness.
> 
> Of course there is no reason why you couldn't implement seqiv or
> seqniv within caam since all they do is xor the sequence number
> with a salt, but since I can't test this on actual hardware I'll
> leave it alone for now.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> ---

Testing on P2041RDB I see the following failures:

caam_jr ffe301000.jr: 40000f10: DECO: desc idx 15: Invalid Sequence
Command. A SEQ IN PTR OR SEQ OUT PTR Command is invalid or a SEQ KEY,
SEQ LOAD, SEQ FIFO LOAD, or SEQ FIFO STORE decremented the input or
output sequence length below 0. This error may result if a built-in
PROTOCOL Command has encountered a malformed PDU.
alg: aead: encryption failed on test 1 for rfc4106-gcm-aes-caam:
ret=-1073745680

caam_jr ffe301000.jr: 40000e10: DECO: desc idx 14: Invalid Sequence
Command. A SEQ IN PTR OR SEQ OUT PTR Command is invalid or a SEQ KEY,
SEQ LOAD, SEQ FIFO LOAD, or SEQ FIFO STORE decremented the input or
output sequence length below 0. This error may result if a built-in
PROTOCOL Command has encountered a malformed PDU.
alg: aead: encryption failed on test 1 for rfc4543-gcm-aes-caam:
ret=-1073745424

alg: aead: Test 2 failed on encryption for gcm-aes-caam
00000000: ab 6e 47 d4 2c ec 13 bd f5 3a 67 b2 12 57 bd df
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I'll check why this is happening.

Regards,
Horia

  reply	other threads:[~2015-06-15 12:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15  8:07 [PATCH 0/8] crypto: aead - Convert gcm to new interface Herbert Xu
2015-06-15  8:09 ` [PATCH 1/8] crypto: testmgr - Disable rfc4543 test Herbert Xu
2015-06-15  8:09 ` [PATCH 2/8] crypto: gcm - Convert to new AEAD interface Herbert Xu
2015-06-15  8:09 ` [PATCH 3/8] crypto: testmgr - Update rfc4543 test vectors Herbert Xu
2015-06-15  8:09 ` [PATCH 4/8] crypto: nx - Convert GCM to new AEAD interface Herbert Xu
2015-06-15  8:09 ` [PATCH 5/8] crypto: caam - Handle errors in dma_map_sg_chained Herbert Xu
2015-06-15  8:09 ` [PATCH 6/8] crypto: caam - Convert GCM to new AEAD interface Herbert Xu
2015-06-15 12:33   ` Horia Geantă [this message]
2015-06-15 12:59     ` Herbert Xu
2015-06-15 13:21       ` Herbert Xu
2015-06-15 13:59       ` Herbert Xu
2015-06-15 14:05     ` Herbert Xu
2015-06-15  8:09 ` [PATCH 7/8] Revert "crypto: testmgr - Disable rfc4543 test" Herbert Xu
2015-06-15  8:09 ` [PATCH 8/8] crypto: testmgr - Add mcgrew test vectors for rfc4106 Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=557EC610.9070309@freescale.com \
    --to=horia.geanta@freescale.com \
    --cc=NiteshNarayanLal@freescale.com \
    --cc=cristian.stoica@freescale.com \
    --cc=fin@linux.vnet.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jinyanjiang@gmail.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=mhcerri@linux.vnet.ibm.com \
    --cc=ruchika.gupta@freescale.com \
    --cc=tudor.ambarus@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.