DPDK patches and discussions
 help / color / mirror / Atom feed
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
To: dev@dpdk.org
Cc: gakhil@marvell.com, roy.fan.zhang@intel.com,
	Arek Kusztal <arkadiuszx.kusztal@intel.com>
Subject: [PATCH v2 2/2] cryptodev: add dh padding options
Date: Wed, 13 Apr 2022 15:03:27 +0100	[thread overview]
Message-ID: <20220413140327.12915-3-arkadiuszx.kusztal@intel.com> (raw)
In-Reply-To: <20220413140327.12915-1-arkadiuszx.kusztal@intel.com>

Diffie-Hellman padding is used in certain protocols,
in others, leading zero bytes need to be stripped.
Even same protocol may use a different approach - most
glaring example is TLS1.2 - TLS1.3.
To make the user life easier, and to avoid additional copy
on certain occasions, driver should be able to return both.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 lib/cryptodev/rte_crypto_asym.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index c4f4afa07f..e757663e8e 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -440,7 +440,15 @@ struct rte_crypto_dh_op_param {
 	  * Full verification   |    0    | steps of point verification (full validation),
 	  *                     |         | otherwise three (partial validation - default).
 	  *--------------------------------------------------------------------------------
-	  * Reserved            |   1-15  | Reserved
+	  *                     |         | If set to 1 - public key will be returned
+	  * Public key padding  |    1    | without leading zero bytes, otherwise it will be
+	  *                     |         | padded to the left with zero bytes (default)
+	  *--------------------------------------------------------------------------------
+	  *                     |         | If set to 1 - shared key will be returned
+	  * Shared key padding  |    2    | without leading zero bytes, otherwise it will be
+	  *                     |         | padded to the left with zero bytes (default)
+	  *--------------------------------------------------------------------------------
+	  * Reserved            |   3-15  | Reserved
 	  */
 
 };
-- 
2.13.6


  parent reply	other threads:[~2022-04-13 14:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13 14:03 [PATCH v2 0/2] cryptodev: add dh verify option Arek Kusztal
2022-04-13 14:03 ` [PATCH v2 1/2] " Arek Kusztal
2022-05-16 18:50   ` [EXT] " Akhil Goyal
2022-04-13 14:03 ` Arek Kusztal [this message]
2022-05-16 18:51   ` [EXT] [PATCH v2 2/2] cryptodev: add dh padding options 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=20220413140327.12915-3-arkadiuszx.kusztal@intel.com \
    --to=arkadiuszx.kusztal@intel.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).