From: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>
To: "gakhil@marvell.com" <gakhil@marvell.com>,
Anoob Joseph <anoobj@marvell.com>,
"Zhang, Roy Fan" <roy.fan.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: [RFC] Cryptodev: use rte_crypto_vec, group big-endian constraints
Date: Fri, 3 Dec 2021 10:01:37 +0000 [thread overview]
Message-ID: <PH0PR11MB5013EAB350241249E7E738079F6A9@PH0PR11MB5013.namprd11.prod.outlook.com> (raw)
[-- 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 --]
next reply other threads:[~2021-12-03 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 10:01 Kusztal, ArkadiuszX [this message]
2021-12-13 9:36 ` Akhil Goyal
2021-12-16 15:05 ` Zhang, Roy Fan
2021-12-17 15:58 ` Kusztal, ArkadiuszX
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=PH0PR11MB5013EAB350241249E7E738079F6A9@PH0PR11MB5013.namprd11.prod.outlook.com \
--to=arkadiuszx.kusztal@intel.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=roy.fan.zhang@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).