DPDK patches and discussions
 help / color / mirror / Atom feed
* [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints
@ 2021-12-03 10:01 Kusztal, ArkadiuszX
  2021-12-13  9:36 ` Akhil Goyal
  0 siblings, 1 reply; 4+ messages in thread
From: Kusztal, ArkadiuszX @ 2021-12-03 10:01 UTC (permalink / raw)
  To: gakhil, Anoob Joseph, Zhang, Roy Fan; +Cc: dev

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]

Hi,
since DPDK 21.11 is out, we should start discussion to make asymmetric API stable.

-              Struct rte_crypto_vec vs struct rte_crypto_param_t

We have two almost identical functionally structs, one in _sym.h another in asym.h so we probably should pick one of them.
"rte_crypto_vec" additionally contains total length which will be useful information as PMD will overwrite "len" in many cases.
Unfortunately as "rte_crypto.h" includes "_sym.h" and "_asym.h" not other way around we cannot move it to "rte_crypto.h" but asymmetric will include symmetric anyway so it probably will not be that big of an issue.

-              Network byte order

               rte_crypto_param dP; /**<
               /**< dP - Private CRT component
               * Private CRT component of RSA parameter  required for CRT method
               * RSA private key operations in Octet-string network byte order
               * format.
               * dP = d mod ( p - 1 )
               */
We have plenty of these (sometimes in places where should not be, and not in places where should). Every member that contains this comment here is a big integer in big-endian format.
We could simplify it to:

/** Big integer in big-endian format */
typedef struct rte_crypto_vec rte_crypto_bigint;

               rte_crypto_bigint dP; /**< d mod ( p - 1 ) */

ED related algorithms like (EDDSA) will use little-endian bit integers so it will have to use different approach.

[-- Attachment #2: Type: text/html, Size: 4687 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints
  2021-12-03 10:01 [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints Kusztal, ArkadiuszX
@ 2021-12-13  9:36 ` Akhil Goyal
  2021-12-16 15:05   ` Zhang, Roy Fan
  0 siblings, 1 reply; 4+ messages in thread
From: Akhil Goyal @ 2021-12-13  9:36 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, Anoob Joseph, Zhang, Roy Fan; +Cc: dev, Ramkumar Balu

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]


Hi,
since DPDK 21.11 is out, we should start discussion to make asymmetric API stable.

-              Struct rte_crypto_vec vs struct rte_crypto_param_t

We have two almost identical functionally structs, one in _sym.h another in asym.h so we probably should pick one of them.
"rte_crypto_vec" additionally contains total length which will be useful information as PMD will overwrite "len" in many cases.
Unfortunately as "rte_crypto.h" includes "_sym.h" and "_asym.h" not other way around we cannot move it to "rte_crypto.h" but asymmetric will include symmetric anyway so it probably will not be that big of an issue.
[Akhil ] +1

-              Network byte order

               rte_crypto_param dP; /**<
               /**< dP - Private CRT component
               * Private CRT component of RSA parameter  required for CRT method
               * RSA private key operations in Octet-string network byte order
               * format.
               * dP = d mod ( p - 1 )
               */
We have plenty of these (sometimes in places where should not be, and not in places where should). Every member that contains this comment here is a big integer in big-endian format.
We could simplify it to:

/** Big integer in big-endian format */
typedef struct rte_crypto_vec rte_crypto_bigint;

               rte_crypto_bigint dP; /**< d mod ( p - 1 ) */

ED related algorithms like (EDDSA) will use little-endian bit integers so it will have to use different approach.

[Akhil] Using different approaches for endianness may not be a good idea. Why can't we use rte_crypto_vec for LE? It has a void * data. Right?


[-- Attachment #2: Type: text/html, Size: 5140 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints
  2021-12-13  9:36 ` Akhil Goyal
@ 2021-12-16 15:05   ` Zhang, Roy Fan
  2021-12-17 15:58     ` Kusztal, ArkadiuszX
  0 siblings, 1 reply; 4+ messages in thread
From: Zhang, Roy Fan @ 2021-12-16 15:05 UTC (permalink / raw)
  To: Akhil Goyal, Kusztal, ArkadiuszX, Anoob Joseph; +Cc: dev, Ramkumar Balu

[-- Attachment #1: Type: text/plain, Size: 2082 bytes --]

Hi,

From: Akhil Goyal <gakhil@marvell.com>
Sent: Monday, December 13, 2021 9:36 AM
To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Anoob Joseph <anoobj@marvell.com>; Zhang, Roy Fan <roy.fan.zhang@intel.com>
Cc: dev@dpdk.org; Ramkumar Balu <rbalu@marvell.com>
Subject: RE: [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints


Hi,
since DPDK 21.11 is out, we should start discussion to make asymmetric API stable.

-              Struct rte_crypto_vec vs struct rte_crypto_param_t

We have two almost identical functionally structs, one in _sym.h another in asym.h so we probably should pick one of them.
“rte_crypto_vec” additionally contains total length which will be useful information as PMD will overwrite “len” in many cases.
Unfortunately as “rte_crypto.h” includes “_sym.h” and “_asym.h” not other way around we cannot move it to “rte_crypto.h” but asymmetric will include symmetric anyway so it probably will not be that big of an issue.
[Akhil ] +1
[Fan] +1

-              Network byte order

               rte_crypto_param dP; /**<
               /**< dP - Private CRT component
               * Private CRT component of RSA parameter  required for CRT method
               * RSA private key operations in Octet-string network byte order
               * format.
               * dP = d mod ( p - 1 )
               */
We have plenty of these (sometimes in places where should not be, and not in places where should). Every member that contains this comment here is a big integer in big-endian format.
We could simplify it to:

/** Big integer in big-endian format */
typedef struct rte_crypto_vec rte_crypto_bigint;

               rte_crypto_bigint dP; /**< d mod ( p - 1 ) */

ED related algorithms like (EDDSA) will use little-endian bit integers so it will have to use different approach.

[Akhil] Using different approaches for endianness may not be a good idea. Why can’t we use rte_crypto_vec for LE? It has a void * data. Right?
[Fan] Akhil, do you believe a comment before the param is enough?

[-- Attachment #2: Type: text/html, Size: 7107 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints
  2021-12-16 15:05   ` Zhang, Roy Fan
@ 2021-12-17 15:58     ` Kusztal, ArkadiuszX
  0 siblings, 0 replies; 4+ messages in thread
From: Kusztal, ArkadiuszX @ 2021-12-17 15:58 UTC (permalink / raw)
  To: Zhang, Roy Fan, Akhil Goyal, Anoob Joseph; +Cc: dev, Ramkumar Balu

[-- Attachment #1: Type: text/plain, Size: 2756 bytes --]



From: Zhang, Roy Fan <roy.fan.zhang@intel.com>
Sent: Thursday, December 16, 2021 4:05 PM
To: Akhil Goyal <gakhil@marvell.com>; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Anoob Joseph <anoobj@marvell.com>
Cc: dev@dpdk.org; Ramkumar Balu <rbalu@marvell.com>
Subject: RE: [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints

Hi,

From: Akhil Goyal <gakhil@marvell.com<mailto:gakhil@marvell.com>>
Sent: Monday, December 13, 2021 9:36 AM
To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com<mailto:arkadiuszx.kusztal@intel.com>>; Anoob Joseph <anoobj@marvell.com<mailto:anoobj@marvell.com>>; Zhang, Roy Fan <roy.fan.zhang@intel.com<mailto:roy.fan.zhang@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org>; Ramkumar Balu <rbalu@marvell.com<mailto:rbalu@marvell.com>>
Subject: RE: [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints


Hi,
since DPDK 21.11 is out, we should start discussion to make asymmetric API stable.

-              Struct rte_crypto_vec vs struct rte_crypto_param_t

We have two almost identical functionally structs, one in _sym.h another in asym.h so we probably should pick one of them.
"rte_crypto_vec" additionally contains total length which will be useful information as PMD will overwrite "len" in many cases.
Unfortunately as "rte_crypto.h" includes "_sym.h" and "_asym.h" not other way around we cannot move it to "rte_crypto.h" but asymmetric will include symmetric anyway so it probably will not be that big of an issue.
[Akhil ] +1
[Fan] +1

-              Network byte order

               rte_crypto_param dP; /**<
               /**< dP - Private CRT component
               * Private CRT component of RSA parameter  required for CRT method
               * RSA private key operations in Octet-string network byte order
               * format.
               * dP = d mod ( p - 1 )
               */
We have plenty of these (sometimes in places where should not be, and not in places where should). Every member that contains this comment here is a big integer in big-endian format.
We could simplify it to:

/** Big integer in big-endian format */
typedef struct rte_crypto_vec rte_crypto_bigint;

               rte_crypto_bigint dP; /**< d mod ( p - 1 ) */

ED related algorithms like (EDDSA) will use little-endian bit integers so it will have to use different approach.

[Akhil] Using different approaches for endianness may not be a good idea. Why can't we use rte_crypto_vec for LE? It has a void * data. Right?
[Fan] Akhil, do you believe a comment before the param is enough?
[Arek] - Yes, for me it would be rte_crypto_vec for LE and rte_crypto_bigint for BE, which would correspond to what other crypto libraries propose.

[-- Attachment #2: Type: text/html, Size: 7413 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-17 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03 10:01 [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints Kusztal, ArkadiuszX
2021-12-13  9:36 ` Akhil Goyal
2021-12-16 15:05   ` Zhang, Roy Fan
2021-12-17 15:58     ` Kusztal, ArkadiuszX

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).