All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Azarewicz, PiotrX T" <piotrx.t.azarewicz@intel.com>
To: "Azarewicz, PiotrX T" <piotrx.t.azarewicz@intel.com>,
	"Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Trahe, Fiona" <fiona.trahe@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"Griffin, John" <john.griffin@intel.com>,
	"Jain, Deepak K" <deepak.k.jain@intel.com>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	"Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>
Subject: Re: [PATCH v2 2/3] crypto/aesni_gcm: fix iv size in	PMD	capabilities
Date: Mon, 2 Jan 2017 09:08:18 +0000	[thread overview]
Message-ID: <4837007523CC9A4B9414D20C13DE6E6413758F80@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <4837007523CC9A4B9414D20C13DE6E6413757B3D@IRSMSX102.ger.corp.intel.com>

> Subject: Re: [dpdk-dev] [PATCH v2 2/3] crypto/aesni_gcm: fix iv size in PMD
> capabilities
> 
> > Subject: [dpdk-dev] [PATCH v2 2/3] crypto/aesni_gcm: fix iv size in
> > PMD capabilities
> >
> > This patch sets iv size in aesni gcm PMD to 12 bytes to be conformant
> > with nist SP800-38D.
> >
> > Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto
> > operations")
> >
> > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > ---
> >  drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> > b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> > index e824d4b..c51f82a 100644
> > --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> > +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> > @@ -77,8 +77,8 @@ static const struct rte_cryptodev_capabilities
> > aesni_gcm_pmd_capabilities[] = {
> >  					.increment = 0
> >  				},
> >  				.iv_size = {
> > -					.min = 16,
> > -					.max = 16,
> > +					.min = 12,
> > +					.max = 12,
> >  					.increment = 0
> >  				}
> >  			}, }
> 
> I think that we should also remove 16 na 0 bytes allowed in
> process_gcm_crypto_op() function:
> 	if (op->cipher.iv.length != 16 && op->cipher.iv.length != 12 &&
> 			op->cipher.iv.length != 0) {
> 		GCM_LOG_ERR("iv");
> 		return -1;
> 	}

I found this notice about IV in rte_crypto_sym.h :
			 * - For GCM mode, this is either the IV (if the length
			 * is 96 bits) or J0 (for other sizes), where J0 is as
			 * defined by NIST SP800-38D. Regardless of the IV
			 * length, a full 16 bytes needs to be allocated.
So it is fine to leave unchanged above code.

Acked-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>

  reply	other threads:[~2017-01-02  9:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23  8:24 [PATCH v2 0/3] Fix iv sizes in crypto drivers capabilities Arek Kusztal
2016-12-23  8:24 ` [PATCH v2 1/3] crypto/aesni_gcm: fix J0 padding bytes for GCM Arek Kusztal
2016-12-29 13:08   ` Azarewicz, PiotrX T
2017-01-02  8:50     ` Azarewicz, PiotrX T
2017-01-06 10:17       ` De Lara Guarch, Pablo
2017-01-06 10:27   ` De Lara Guarch, Pablo
2016-12-23  8:24 ` [PATCH v2 2/3] crypto/aesni_gcm: fix iv size in PMD capabilities Arek Kusztal
2016-12-29 13:17   ` Azarewicz, PiotrX T
2017-01-02  9:08     ` Azarewicz, PiotrX T [this message]
2017-01-06 10:31   ` De Lara Guarch, Pablo
2016-12-23  8:24 ` [PATCH v2 3/3] crypto/qat: " Arek Kusztal
2016-12-23 11:03   ` Trahe, Fiona
2017-01-06 10:31   ` De Lara Guarch, Pablo
2017-01-06 10:35 ` [PATCH v2 0/3] Fix iv sizes in crypto drivers capabilities De Lara Guarch, Pablo

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=4837007523CC9A4B9414D20C13DE6E6413758F80@IRSMSX102.ger.corp.intel.com \
    --to=piotrx.t.azarewicz@intel.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=john.griffin@intel.com \
    --cc=pablo.de.lara.guarch@intel.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.