From: Gagandeep Singh <g.singh@nxp.com>
To: gakhil@marvell.com, dev@dpdk.org
Cc: thomas@monjalon.net, Gagandeep Singh <g.singh@nxp.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 1/5] common/dpaax: fix IV value for shortMAC-I for SNOW algo
Date: Thu, 26 Aug 2021 16:53:11 +0530 [thread overview]
Message-ID: <20210826112315.1375237-2-g.singh@nxp.com> (raw)
In-Reply-To: <20210826112315.1375237-1-g.singh@nxp.com>
The logic was incorecly doing conditional swap. It need to
be bit swap always.
Fixes: 73a24060cd70 ("crypto/dpaa2_sec: add sample PDCP descriptor APIs")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/common/dpaax/caamflib/desc/pdcp.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 659e289a45..041c66cfba 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0+
* Copyright 2008-2013 Freescale Semiconductor, Inc.
- * Copyright 2019-2020 NXP
+ * Copyright 2019-2021 NXP
*/
#ifndef __DESC_PDCP_H__
@@ -3710,9 +3710,10 @@ cnstr_shdsc_pdcp_short_mac(uint32_t *descbuf,
break;
case PDCP_AUTH_TYPE_SNOW:
+ /* IV calculation based on 3GPP specs. 36331, section:5.3.7.4 */
iv[0] = 0xFFFFFFFF;
- iv[1] = swap ? swab32(0x04000000) : 0x04000000;
- iv[2] = swap ? swab32(0xF8000000) : 0xF8000000;
+ iv[1] = swab32(0x04000000);
+ iv[2] = swab32(0xF8000000);
KEY(p, KEY2, authdata->key_enc_flags, authdata->key,
authdata->keylen, INLINE_KEY(authdata));
--
2.25.1
next prev parent reply other threads:[~2021-08-26 11:23 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 11:23 [dpdk-dev] [PATCH 0/5] support of MAC-I Gagandeep Singh
2021-08-26 11:23 ` Gagandeep Singh [this message]
2021-09-02 11:38 ` [dpdk-dev] [EXT] [PATCH 1/5] common/dpaax: fix IV value for shortMAC-I for SNOW algo Akhil Goyal
2021-08-26 11:23 ` [dpdk-dev] [PATCH 2/5] security: add pdcp short MAC-I support Gagandeep Singh
2021-09-02 11:34 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-08-26 11:23 ` [dpdk-dev] [PATCH 3/5] test/crypto: add pdcp security " Gagandeep Singh
2021-08-26 11:23 ` [dpdk-dev] [PATCH 4/5] crypto/dpaa2_sec: add PDCP " Gagandeep Singh
2021-08-26 11:23 ` [dpdk-dev] [PATCH 5/5] crypto/dpaa_sec: add pdcp " Gagandeep Singh
2021-09-07 8:56 ` [dpdk-dev] [PATCH v2 0/5] support of MAC-I Gagandeep Singh
2021-09-07 8:56 ` [dpdk-dev] [PATCH v2 1/5] common/dpaax: fix IV value for shortMAC-I for SNOW algo Gagandeep Singh
2021-09-08 12:01 ` [dpdk-dev] [PATCH v3 0/4] support of MAC-I Gagandeep Singh
2021-09-08 12:01 ` [dpdk-dev] [PATCH v3 1/4] security: support PDCP short MAC-I Gagandeep Singh
2021-09-08 12:15 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-09-08 12:33 ` Gagandeep Singh
2021-09-08 12:51 ` [dpdk-dev] [PATCH v4 0/5] support of MAC-I Gagandeep Singh
2021-09-08 12:51 ` [dpdk-dev] [PATCH v4 1/5] crypto/dpaa2_sec: support integrity only case for PDCP Gagandeep Singh
2021-09-08 12:51 ` [dpdk-dev] [PATCH v4 2/5] security: add pdcp short MAC-I support Gagandeep Singh
2021-09-08 12:51 ` [dpdk-dev] [PATCH v4 3/5] test/crypto: add pdcp security " Gagandeep Singh
2021-09-08 12:51 ` [dpdk-dev] [PATCH v4 4/5] crypto/dpaa2_sec: add PDCP " Gagandeep Singh
2021-09-08 12:51 ` [dpdk-dev] [PATCH v4 5/5] crypto/dpaa_sec: add pdcp " Gagandeep Singh
2021-09-08 15:21 ` [dpdk-dev] [EXT] [PATCH v4 0/5] support of MAC-I Akhil Goyal
2021-09-08 12:01 ` [dpdk-dev] [PATCH v3 2/4] test/crypto: add pdcp security short MAC-I support Gagandeep Singh
2021-09-08 12:01 ` [dpdk-dev] [PATCH v3 3/4] crypto/dpaa2_sec: add PDCP " Gagandeep Singh
2021-09-08 12:01 ` [dpdk-dev] [PATCH v3 4/4] crypto/dpaa_sec: add pdcp " Gagandeep Singh
2021-09-07 8:56 ` [dpdk-dev] [PATCH v2 2/5] security: support PDCP short MAC-I Gagandeep Singh
2021-09-07 8:56 ` [dpdk-dev] [PATCH v2 3/5] test/crypto: add pdcp security short MAC-I support Gagandeep Singh
2021-09-07 8:56 ` [dpdk-dev] [PATCH v2 4/5] crypto/dpaa2_sec: add PDCP " Gagandeep Singh
2021-09-07 8:56 ` [dpdk-dev] [PATCH v2 5/5] crypto/dpaa_sec: add pdcp " Gagandeep Singh
2021-09-07 11:46 ` [dpdk-dev] [EXT] [PATCH v2 0/5] support of MAC-I Akhil Goyal
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=20210826112315.1375237-2-g.singh@nxp.com \
--to=g.singh@nxp.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).