DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: Umesh Kartha <Umesh.Kartha@caviumnetworks.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Jerin Jacob <Jerin.JacobKollanukkaran@cavium.com>,
	Balasubramanian Manoharan <Balasubramanian.Manoharan@cavium.com>,
	Ram Kumar <Ram.Kumar@cavium.com>,
	Murthy Nidadavolu <Nidadavolu.Murthy@cavium.com>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>
Subject: Re: [dpdk-dev] [RFC PATCH v2 1/3] cryptodev: added asymmetric algorithms
Date: Mon, 29 May 2017 14:51:11 +0000	[thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B4358920B3C5@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <20170526071822.GA28794@ukw0rk.in.caveonetworks.com>

Hi Umesh,

> -----Original Message-----
> From: Umesh Kartha [mailto:Umesh.Kartha@caviumnetworks.com]
> Sent: Friday, May 26, 2017 8:18 AM
> To: Trahe, Fiona <fiona.trahe@intel.com>
> Cc: dev@dpdk.org; Jerin Jacob <Jerin.JacobKollanukkaran@cavium.com>; Balasubramanian Manoharan
> <Balasubramanian.Manoharan@cavium.com>; Ram Kumar <Ram.Kumar@cavium.com>; Murthy
> Nidadavolu <Nidadavolu.Murthy@cavium.com>; Doherty, Declan <declan.doherty@intel.com>; De Lara
> Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: Re: [RFC PATCH v2 1/3] cryptodev: added asymmetric algorithms
> 
> Hi Fiona,
> 
> 
> On Thu, May 25, 2017 at 04:00:42PM +0000, Trahe, Fiona wrote:
> > Hi Umesh,
> >
> >
> > > -----Original Message-----
> > > From: Umesh Kartha [mailto:Umesh.Kartha@caviumnetworks.com]
> > > Sent: Thursday, May 11, 2017 1:36 PM
> > > To: dev@dpdk.org
> > > Cc: Jerin Jacob <Jerin.JacobKollanukkaran@cavium.com>; Balasubramanian Manoharan
> > > <Balasubramanian.Manoharan@cavium.com>; Ram Kumar <Ram.Kumar@cavium.com>; Murthy
> > > Nidadavolu <Nidadavolu.Murthy@cavium.com>; Doherty, Declan <declan.doherty@intel.com>; De
> Lara
> > > Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>
> > > Subject: [RFC PATCH v2 1/3] cryptodev: added asymmetric algorithms
> > >
> > > Added asymmetric xform structures, operation definitions, operation
> > > parameters. Added asymmetric algorithms RSA, DH, ECDH, DSA, ECDSA,
> > > MODEXP, FECC, MOD-INVERSE. Added curves (all curves supported by
> > > libcrypto as of now).
> > >
> > > Signed-off-by: Umesh Kartha <Umesh.Kartha@caviumnetworks.com>
> > > ---
> > >  lib/librte_cryptodev/rte_crypto_asym.h | 1124 ++++++++++++++++++++++++++++++++
> > >  1 file changed, 1124 insertions(+)
> > >  create mode 100644 lib/librte_cryptodev/rte_crypto_asym.h
> > >
> > > diff --git lib/librte_cryptodev/rte_crypto_asym.h lib/librte_cryptodev/rte_crypto_asym.h
> > > new file mode 100644
> > > index 0000000..36a8b4f
> > > --- /dev/null
> > > +++ lib/librte_cryptodev/rte_crypto_asym.h
> > > @@ -0,0 +1,1124 @@
> > > +/*
> > > + *   BSD LICENSE
> > > + *
> > > + *   Copyright (C) Cavium networks Ltd. 2017.
> > > + *
> > > + *   Redistribution and use in source and binary forms, with or without
> > > + *   modification, are permitted provided that the following conditions
> > > + *   are met:
> > > + *
> > > + *     * Redistributions of source code must retain the above copyright
> > > + *       notice, this list of conditions and the following disclaimer.
> > > + *     * Redistributions in binary form must reproduce the above copyright
> > > + *       notice, this list of conditions and the following disclaimer in
> > > + *       the documentation and/or other materials provided with the
> > > + *       distribution.
> > > + *     * Neither the name of Cavium Networks nor the names of its
> > > + *       contributors may be used to endorse or promote products derived
> > > + *       from this software without specific prior written permission.
> > > + *
> > > + *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> > > + *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> > > + *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> > > + *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> > > + *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> > > + *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> > > + *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> > > + *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> > > + *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > > + *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> > > + *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > > + */
> > > +
> > > +#ifndef _RTE_CRYPTO_ASYM_H_
> > > +#define _RTE_CRYPTO_ASYM_H_
> > > +
> > > +/**
> > > + * @file rte_crypto_asym.h
> > > + *
> > > + * RTE Definitions for Asymmetric Cryptography
> > > + *
> > > + * Defines asymmetric algorithms and modes, as well as supported
> > > + * asymmetric crypto operations.
> > > + */
> > > +
> > > +#ifdef __cplusplus
> > > +extern "C" {
> > > +#endif
> > > +
> > > +#include <string.h>
> > > +#include <stdint.h>
> > > +#include <rte_mbuf.h>
> > > +#include <rte_memory.h>
> > > +#include <rte_mempool.h>
> > > +#include <rte_common.h>
> > > +#include "rte_crypto_sym.h"
> > > +
> > > +typedef struct rte_crypto_xform_param_t {
> > > +	uint8_t *data;
> > > +	size_t length;
> > > +} rte_crypto_xform_param;
> > > +
> > > +typedef struct rte_crypto_op_param_t {
> > > +	uint8_t *data;
> > > +	phys_addr_t phys_addr;
> > > +	size_t length;
> > > +} rte_crypto_op_param;
> > [Fiona] Are both above lengths in bytes ?
> >
> >
> [Umesh] Yes, they are in bytes. Will add note for this to avoid any
> confusion.
[Fiona] Thanks.
Re your v1 question re sessionless, I don't see a strong need to support sessions
in Asymm crypto and we would probably initially just implement the SESSIONLESS case.
For that case, the rte_crypto_xform_param_t would be used to provide data to
the op. So providing a phys_addr would save an internal alloc and copy and 
be necessary to optimise performance. 
What do you think of adding this?
In that case the structs are identical, so can be combined. 

Regards,
Fiona

  reply	other threads:[~2017-05-29 14:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 10:16 [dpdk-dev] [RFC] specifications for asymmetric crypto algorithms Umesh Kartha
2017-03-27 12:58 ` Declan Doherty
     [not found] ` <348A99DA5F5B7549AA880327E580B435891DBCED@IRSMSX101.ger.corp.intel.com>
2017-04-06 11:39   ` Trahe, Fiona
2017-04-27  7:26     ` Umesh Kartha
2017-05-11 12:35 ` [dpdk-dev] [RFC PATCH v2 0/3] " Umesh Kartha
2017-05-11 12:35   ` [dpdk-dev] [RFC PATCH v2 1/3] cryptodev: added asymmetric algorithms Umesh Kartha
2017-05-25 16:00     ` Trahe, Fiona
2017-05-26  7:18       ` Umesh Kartha
2017-05-29 14:51         ` Trahe, Fiona [this message]
2017-06-02 11:01           ` Umesh Kartha
2017-05-11 12:35   ` [dpdk-dev] [RFC PATCH v2 2/3] cryptodev: asymmetric algorithm capability definitions Umesh Kartha
2017-05-11 12:35   ` [dpdk-dev] [RFC PATCH v2 3/3] cryptodev: added asym queue pair and session apis Umesh Kartha
2017-05-24 11:48     ` Trahe, Fiona
2017-05-12 12:15   ` [dpdk-dev] [RFC PATCH v2 0/3] specifications for asymmetric crypto algorithms Neil Horman
2017-05-12 14:35     ` Umesh Kartha

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=348A99DA5F5B7549AA880327E580B4358920B3C5@IRSMSX101.ger.corp.intel.com \
    --to=fiona.trahe@intel.com \
    --cc=Balasubramanian.Manoharan@cavium.com \
    --cc=Jerin.JacobKollanukkaran@cavium.com \
    --cc=Nidadavolu.Murthy@cavium.com \
    --cc=Ram.Kumar@cavium.com \
    --cc=Umesh.Kartha@caviumnetworks.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --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 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).