DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>,
	"Verma, Shally" <Shally.Verma@cavium.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>,
	Sunila Sahu <ssahu@marvell.com>,
	"Kotamarthy, Kanaka" <Kanaka.Kotamarthy@cavium.com>,
	"Sahu, Sunila" <Sunila.Sahu@cavium.com>,
	"Cel, TomaszX" <tomaszx.cel@intel.com>,
	"Jozwiak, TomaszX" <tomaszx.jozwiak@intel.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>
Subject: Re: [dpdk-dev] [RFC] cryptodev/asymm: propose changes to modexp and modinv API
Date: Mon, 17 Dec 2018 18:34:22 +0000	[thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B435896A3F62@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <06EE24DD0B19E248B53F6DC8657831551B110B2C@hasmsx109.ger.corp.intel.com>

Hi Shally, Arek,

> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Monday, December 17, 2018 7:25 AM
> To: Verma, Shally <Shally.Verma@cavium.com>
> Cc: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>; Sunila Sahu
> <ssahu@marvell.com>; Kotamarthy, Kanaka <Kanaka.Kotamarthy@cavium.com>; Sahu, Sunila
> <Sunila.Sahu@cavium.com>; Cel, TomaszX <tomaszx.cel@intel.com>; Jozwiak, TomaszX
> <tomaszx.jozwiak@intel.com>
> Subject: RE: [RFC] cryptodev/asymm: propose changes to modexp and modinv API
> 
> >               rte_crypto_asym.h:233
> >                              rte_crypto_param modulus;
> >                              /**< modulus
> >                              * Prime modulus of the modexp transform operation in
> > octet-string
> >                              * network byte order format.
> >                              */
> >                              [AK] - Why prime? RSA for example use semi-prime or "RSA
> > multi-prime".
> >                              It should be just any positive integer.
> > [Shally] Hmm.. yes you're right . by the purpose of it , it is a semi-prime
> > input.. so prime shouldn't be mentioned here.
> [AK-v2] I think it could be any nonzero number even composite, for DH, DSA it would be prime etc.
> >                              [AK] - If session API layer should check if it is non-zero and
> > set flag accordingly.
> > [Shally] Sorry I didn't get this.. which flag you mean here? if modulus value 0
> > is passed, it should be considered as INVALID_PARAM.
> [AK-v2] - INVALID_PARAM is perfectly fine for me :).
[Fiona] About where the error checking should be done. 
In symmetric crypto the API layer doesn't do param checking it's up to the PMD.
But it seems, for asymm at least, like a good idea that the API layer checks for valid session
params, that way all PMDs benefit, rather than having multiple implementations do the same checks.
@Arek, I think that's what you're suggesting?
For op params I'm not so sure, the API layer probably shouldn't open up the op and should just pass to the 
PMD, to enable performance optimisation. The PMD generally does very little checking on the data-path
 - but I think for asymm at least divide-by-zero cases should be checked by the PMDs. 

  reply	other threads:[~2018-12-17 18:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12 20:25 Kusztal, ArkadiuszX
2018-12-17  5:44 ` Verma, Shally
2018-12-17 14:24   ` Kusztal, ArkadiuszX
2018-12-17 18:34     ` Trahe, Fiona [this message]
2018-12-18 13:53     ` Verma, Shally
2018-12-18 15:53       ` Trahe, Fiona
2018-12-20 10:52         ` Verma, Shally
2018-12-20 11:07           ` 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=348A99DA5F5B7549AA880327E580B435896A3F62@IRSMSX101.ger.corp.intel.com \
    --to=fiona.trahe@intel.com \
    --cc=Kanaka.Kotamarthy@cavium.com \
    --cc=Shally.Verma@cavium.com \
    --cc=Sunila.Sahu@cavium.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=kkotamarthy@marvell.com \
    --cc=ssahu@marvell.com \
    --cc=tomaszx.cel@intel.com \
    --cc=tomaszx.jozwiak@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 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).