DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dybkowski, AdamX" <adamx.dybkowski@intel.com>
To: Anoob Joseph <anoobj@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"Trahe,  Fiona" <fiona.trahe@intel.com>,
	"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] cryptodev: fix SHA-1 digest enum comment
Date: Tue, 19 May 2020 09:31:19 +0000	[thread overview]
Message-ID: <BY5PR11MB3910C4FAC51FAF35F1541F6EEDB90@BY5PR11MB3910.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MN2PR18MB2877E0866CE96368EBFF5C45DFB90@MN2PR18MB2877.namprd18.prod.outlook.com>

Hi.
My answer below.

Adam

> -----Original Message-----
> From: Anoob Joseph <anoobj@marvell.com>
> Sent: Tuesday, 19 May, 2020 07:54
> To: Dybkowski, AdamX <adamx.dybkowski@intel.com>; dev@dpdk.org;
> Trahe, Fiona <fiona.trahe@intel.com>; akhil.goyal@nxp.com
> Cc: stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] cryptodev: fix SHA-1 digest enum comment
> 
> Hi Adam, Akhil,
> 
> Please see inline.
> 
> Thanks,
> Anoob
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Adam Dybkowski
> > Sent: Monday, May 18, 2020 7:54 PM
> > To: dev@dpdk.org; fiona.trahe@intel.com; akhil.goyal@nxp.com
> > Cc: Adam Dybkowski <adamx.dybkowski@intel.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] cryptodev: fix SHA-1 digest enum comment
> >
> > This patch fixes improper SHA-1 digest size in the enum comment.
> >
> > Fixes: 1bd407fac80b ("cryptodev: extract symmetric operations")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> > ---
> >  lib/librte_cryptodev/rte_crypto_sym.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/librte_cryptodev/rte_crypto_sym.h
> > b/lib/librte_cryptodev/rte_crypto_sym.h
> > index d9585ecd6..9cea4e5f0 100644
> > --- a/lib/librte_cryptodev/rte_crypto_sym.h
> > +++ b/lib/librte_cryptodev/rte_crypto_sym.h
> > @@ -269,9 +269,9 @@ enum rte_crypto_auth_algorithm {
> >  	/**< HMAC using MD5 algorithm */
> >
> >  	RTE_CRYPTO_AUTH_SHA1,
> > -	/**< 128 bit SHA algorithm. */
> > +	/**< 160 bit SHA algorithm. */
> >  	RTE_CRYPTO_AUTH_SHA1_HMAC,
> > -	/**< HMAC using 128 bit SHA algorithm. */
> > +	/**< HMAC using 160 bit SHA algorithm. */
> 
> [Anoob] This raises one interesting question. Is HMAC-SHA-1-96
> (https://tools.ietf.org/html/rfc2404) treated as a separate algorithm or is it a
> digest size variant of RTE_CRYPTO_AUTH_SHA1_HMAC? I assume the later.

[Adam] DPDK doesn't have separate enums for such variations. According to RFC 2104, chapter "5. Truncated output", the calculation of HMAC-SHA-1-96 is done using ordinary HMAC-SHA-1, but the calculation result is then truncated to 96 bits, or any other digest size provided in auth xform.

> 
> >  	RTE_CRYPTO_AUTH_SHA224,
> >  	/**< 224 bit SHA algorithm. */
> >  	RTE_CRYPTO_AUTH_SHA224_HMAC,
> > --
> > 2.17.1


  reply	other threads:[~2020-05-19  9:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 14:23 Adam Dybkowski
2020-05-19  5:54 ` Anoob Joseph
2020-05-19  9:31   ` Dybkowski, AdamX [this message]
2020-05-19  9:40     ` Anoob Joseph
2020-05-19 10:11       ` Dybkowski, AdamX
2020-05-19 10:29         ` Trahe, Fiona
2020-05-19 10:47           ` Anoob Joseph
2020-05-19 12:19           ` Dybkowski, AdamX

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=BY5PR11MB3910C4FAC51FAF35F1541F6EEDB90@BY5PR11MB3910.namprd11.prod.outlook.com \
    --to=adamx.dybkowski@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=stable@dpdk.org \
    /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).