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.kusz...@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