* [dpdk-stable] [PATCH 1/5] common/dpaax: fix IV value for shortMAC-I for SNOW algo
[not found] <20210826112315.1375237-1-g.singh@nxp.com>
@ 2021-08-26 11:23 ` Gagandeep Singh
2021-09-02 11:38 ` [dpdk-stable] [EXT] " Akhil Goyal
[not found] ` <20210907085605.3010882-1-g.singh@nxp.com>
1 sibling, 1 reply; 3+ messages in thread
From: Gagandeep Singh @ 2021-08-26 11:23 UTC (permalink / raw)
To: gakhil, dev; +Cc: thomas, Gagandeep Singh, stable
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [EXT] [PATCH 1/5] common/dpaax: fix IV value for shortMAC-I for SNOW algo
2021-08-26 11:23 ` [dpdk-stable] [PATCH 1/5] common/dpaax: fix IV value for shortMAC-I for SNOW algo Gagandeep Singh
@ 2021-09-02 11:38 ` Akhil Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2021-09-02 11:38 UTC (permalink / raw)
To: Gagandeep Singh, dev; +Cc: thomas, stable
> The logic was incorecly doing conditional swap. It need to
> be bit swap always.
Spell check " incorrectly"
>
> Fixes: 73a24060cd70 ("crypto/dpaa2_sec: add sample PDCP descriptor APIs")
> Cc: stable@dpdk.org
>
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---
Move this patch as 3rd patch of your series.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-stable] [PATCH v2 1/5] common/dpaax: fix IV value for shortMAC-I for SNOW algo
[not found] ` <20210907085605.3010882-1-g.singh@nxp.com>
@ 2021-09-07 8:56 ` Gagandeep Singh
0 siblings, 0 replies; 3+ messages in thread
From: Gagandeep Singh @ 2021-09-07 8:56 UTC (permalink / raw)
To: gakhil, dev; +Cc: thomas, Gagandeep Singh, stable
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-07 8:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210826112315.1375237-1-g.singh@nxp.com>
2021-08-26 11:23 ` [dpdk-stable] [PATCH 1/5] common/dpaax: fix IV value for shortMAC-I for SNOW algo Gagandeep Singh
2021-09-02 11:38 ` [dpdk-stable] [EXT] " Akhil Goyal
[not found] ` <20210907085605.3010882-1-g.singh@nxp.com>
2021-09-07 8:56 ` [dpdk-stable] [PATCH v2 " Gagandeep Singh
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).