* [PATCH v1] cryptodev: clarify usage of the block ciphers
[not found] <20230811174155.2550338-1-arkadiuszx.kusztal@intel.co>
@ 2023-10-06 13:06 ` Ciara Power
2023-10-06 13:20 ` Ji, Kai
2023-10-23 13:44 ` [EXT] " Akhil Goyal
0 siblings, 2 replies; 3+ messages in thread
From: Ciara Power @ 2023-10-06 13:06 UTC (permalink / raw)
To: dev; +Cc: kai.ji, Arkadiusz Kusztal, Ciara Power, Akhil Goyal, Fan Zhang
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Some of the API comments incorrectly limited the usage of symmetric
crypto fields to block ciphers.
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
lib/cryptodev/rte_crypto_sym.h | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
index 5be0f05397..53b18b9412 100644
--- a/lib/cryptodev/rte_crypto_sym.h
+++ b/lib/cryptodev/rte_crypto_sym.h
@@ -279,7 +279,7 @@ struct rte_crypto_cipher_xform {
*
* - For block ciphers in CTR mode, this is the length
* of the counter (which must be the same as the block
- * length of the cipher).
+ * length of the cipher) or a 12-byte nonce (AES only)
*
* - For CCM mode, this is the length of the nonce,
* which can be in the range 7 to 13 inclusive.
@@ -643,7 +643,7 @@ struct rte_crypto_sym_op {
uint32_t length;
/**< The message length, in bytes, of the source buffer
* on which the cryptographic operation will be
- * computed. This must be a multiple of the block size
+ * computed.
*/
} data; /**< Data offsets and length for AEAD */
struct {
@@ -685,22 +685,12 @@ struct rte_crypto_sym_op {
* and the length encoding in the first two bytes of the
* second block.
*
- * - the array should be big enough to hold the above
- * fields, plus any padding to round this up to the
- * nearest multiple of the block size (16 bytes).
- * Padding will be added by the implementation.
- *
* - Note that PMDs may modify the memory reserved
* (first 18 bytes and the final padding).
*
* Finally, for GCM (@ref RTE_CRYPTO_AEAD_AES_GCM), the
* caller should setup this field as follows:
*
- * - the AAD is written in starting at byte 0
- * - the array must be big enough to hold the AAD, plus
- * any space to round this up to the nearest multiple
- * of the block size (16 bytes).
- *
*/
rte_iova_t phys_addr; /**< physical address */
} aad;
@@ -731,8 +721,9 @@ struct rte_crypto_sym_op {
* source buffer on which the cryptographic
* operation will be computed.
* This is also the same as the result length.
- * This must be a multiple of the block size
- * or a multiple of data-unit length
+ * For block ciphers, this must be a
+ * multiple of the block size,
+ * or for the AES-XTS a multiple of the data-unit length
* as described in xform.
*
* @note
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] cryptodev: clarify usage of the block ciphers
2023-10-06 13:06 ` [PATCH v1] cryptodev: clarify usage of the block ciphers Ciara Power
@ 2023-10-06 13:20 ` Ji, Kai
2023-10-23 13:44 ` [EXT] " Akhil Goyal
1 sibling, 0 replies; 3+ messages in thread
From: Ji, Kai @ 2023-10-06 13:20 UTC (permalink / raw)
To: Power, Ciara, dev; +Cc: Kusztal, ArkadiuszX, Akhil Goyal, Fan Zhang
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
Acked-by: Kai Ji <kai.ji@intel.com<mailto:kai.ji@intel.com>>
________________________________
From: Power, Ciara <ciara.power@intel.com>
Sent: 06 October 2023 14:06
To: dev@dpdk.org <dev@dpdk.org>
Cc: Ji, Kai <kai.ji@intel.com>; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Power, Ciara <ciara.power@intel.com>; Akhil Goyal <gakhil@marvell.com>; Fan Zhang <fanzhang.oss@gmail.com>
Subject: [PATCH v1] cryptodev: clarify usage of the block ciphers
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Some of the API comments incorrectly limited the usage of symmetric
crypto fields to block ciphers.
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
--
2.25.1
[-- Attachment #2: Type: text/html, Size: 1859 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [EXT] [PATCH v1] cryptodev: clarify usage of the block ciphers
2023-10-06 13:06 ` [PATCH v1] cryptodev: clarify usage of the block ciphers Ciara Power
2023-10-06 13:20 ` Ji, Kai
@ 2023-10-23 13:44 ` Akhil Goyal
1 sibling, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2023-10-23 13:44 UTC (permalink / raw)
To: Ciara Power, dev; +Cc: kai.ji, Arkadiusz Kusztal, Fan Zhang
> Subject: [EXT] [PATCH v1] cryptodev: clarify usage of the block ciphers
>
> External Email
>
> ----------------------------------------------------------------------
> From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
>
> Some of the API comments incorrectly limited the usage of symmetric
> crypto fields to block ciphers.
>
> Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> Signed-off-by: Ciara Power <ciara.power@intel.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-23 13:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20230811174155.2550338-1-arkadiuszx.kusztal@intel.co>
2023-10-06 13:06 ` [PATCH v1] cryptodev: clarify usage of the block ciphers Ciara Power
2023-10-06 13:20 ` Ji, Kai
2023-10-23 13:44 ` [EXT] " Akhil Goyal
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).