DPDK patches and discussions
 help / color / mirror / Atom feed
From: Liron Himi <lironh@marvell.com>
To: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Trahe, Fiona" <fiona.trahe@intel.com>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	Michael Shamis <michaelsh@marvell.com>,
	"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
	"ravi1.kumar@amd.com" <ravi1.kumar@amd.com>,
	"tdu@semihalf.com" <tdu@semihalf.com>,
	Alan Winkowski <walan@marvell.com>
Cc: Liron Himi <lironh@marvell.com>
Subject: Re: [dpdk-dev] [RFC] cryptodev/sym: GCM IV len != 12 byte case
Date: Wed, 20 Mar 2019 18:50:54 +0000	[thread overview]
Message-ID: <MN2PR18MB239837456B4C1F8BEA9200C6C6410@MN2PR18MB2398.namprd18.prod.outlook.com> (raw)
Message-ID: <20190320185054.5Tv867VM3RMzKGgVSrRugSR36_EF6kFWSAhnMJ6USys@z> (raw)
In-Reply-To: <06EE24DD0B19E248B53F6DC8657831551B14CD9F@hasmsx109.ger.corp.intel.com>

+ Michael

From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
Sent: Wednesday, March 20, 2019 20:47
To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; akhil.goyal@nxp.com; ravi1.kumar@amd.com; tdu@semihalf.com; Liron Himi <lironh@marvell.com>; Alan Winkowski <walan@marvell.com>
Subject: [EXT] [RFC] cryptodev/sym: GCM IV len != 12 byte case

External Email
________________________________
Hi all,

There is a proposition to amend a bit API due to the following lines:

* - For GCM mode, this is either 12 (for 96-bit IVs)

 * or 16, in which case data points to J0.

...

} iv;   /**< Initialisation vector parameters */


Problem arise when driver cannot support J0 input, right now we know that OPENSSL PMD works with IV instead of J0 when iv_len != 12.
So it may be that we have to somehow support both. There are two options, and I am very curious about community opinion.


  1.  Add a flag to aead_xform.iv to supports IV or J0 like this:

uint8_t IV_used;

And this could be reflected in capabilities. Of course for 96bits IV this field would not be used, so it would had to be set only for iv.length != 12

  1.  Change API comments to something like:

* - For GCM mode, this is either 12 (for 96-bit IVs),

* - for IV length different than 96 bits it is or J0 or IV,

* - refer to specific driver rst or capabilities which one

* - is supported, etc. (J0 by definition is of 16 bytes len)

I cc'ing maintainers of drivers that support iv_len != 16 bytes.
Cannot check how it works as I have no hw.

Regards,
Arek

  parent reply	other threads:[~2019-03-20 18:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 18:47 Kusztal, ArkadiuszX
2019-03-20 18:47 ` Kusztal, ArkadiuszX
2019-03-20 18:50 ` Liron Himi [this message]
2019-03-20 18:50   ` Liron Himi
2019-03-29 18:02 ` Trahe, Fiona
2019-03-29 18:02   ` Trahe, Fiona
2019-04-01 13:53   ` Kusztal, ArkadiuszX
2019-04-01 13:53     ` Kusztal, ArkadiuszX

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=MN2PR18MB239837456B4C1F8BEA9200C6C6410@MN2PR18MB2398.namprd18.prod.outlook.com \
    --to=lironh@marvell.com \
    --cc=akhil.goyal@nxp.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=michaelsh@marvell.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=ravi1.kumar@amd.com \
    --cc=tdu@semihalf.com \
    --cc=walan@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).