cryptodev: clarify wireless inputs in digest-encrypted cases
PATCH 1/1 cryptodev: clarify wireless inputs in digest-encrypted cases
Clarify constraints on fields specified in bits for wireless algorithms in digest-encrypted case.
--- lib/librte_cryptodev/rte_crypto_sym.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
lib/librte_cryptodev/rte_crypto_sym.h +7 -0
@@ -703,6 +703,13 @@ struct rte_crypto_sym_op {* auth.data.length and is typically * equal to auth.data.offset + * auth.data.length + digest_length. +* - for wireless algorithms, i.e. +* SNOW 3G, KASUMI and ZUC, as the +* cipher.data.length, +* cipher.data.offset, +* auth.data.length and +* auth.data.offset are in bits, they +* must be 8-bit multiples. * * Note, that for security reasons, it * is PMDs' responsibility to not
Signature · 1 line
1.7.0.7
Hi Fiona,
Quoted 15 lines
Clarify constraints on fields specified in bits for wireless algorithms in digest-encrypted case.
Signed-off-by Fiona Trahe <[email protected]>--- lib/librte_cryptodev/rte_crypto_sym.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)lib/librte_cryptodev/rte_crypto_sym.h +0
-0
lib/librte_cryptodev/rte_crypto_sym.h struct rte_crypto_sym_op { · line 712
Quoted 10 lines
lib/librte_cryptodev/rte_crypto_sym.h +7
-0@@ -703,6 +703,13 @@ struct rte_crypto_sym_op {* auth.data.length and is typically * equal to auth.data.offset + * auth.data.length + digest_length. +* - for wireless algorithms, i.e. +* SNOW 3G, KASUMI and ZUC, as the +* cipher.data.length, +* cipher.data.offset, +* auth.data.length and +* auth.data.offset are in bits, they +* must be 8-bit multiples.
What is the meaning of 'they' here?
cipher.data.length, cipher.data.offset, auth.data.length and auth.data.offset are in bits and may or may not be multiple of 8bits. This is documented in their comments.
Quoted 5 lines
lib/librte_cryptodev/rte_crypto_sym.h +0
-1* * Note, that for security reasons, it * is PMDs' responsibility to not -- 1.7.0.7
Hi Akhil,
Quoted 31 lines
-----Original Message-----
From: Akhil Goyal [mailto:[email protected]]
Sent: Tuesday, October 22, 2019 12:49 PM
To: Trahe, Fiona <[email protected]>; [email protected]
Cc: Kusztal, ArkadiuszX <[email protected]>; Dybkowski, AdamX <[email protected]>
Subject: RE: [PATCH] cryptodev: clarify wireless inputs in digest-encrypted casesHi Fiona,
Quoted 21 lines
Clarify constraints on fields specified in bits for wireless algorithms in digest-encrypted case.
Signed-off-by Fiona Trahe <[email protected]>--- lib/librte_cryptodev/rte_crypto_sym.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)lib/librte_cryptodev/rte_crypto_sym.h +3
-0@@ -703,6 +703,13 @@ struct rte_crypto_sym_op {* auth.data.length and is typically * equal to auth.data.offset + * auth.data.length + digest_length. +* - for wireless algorithms, i.e. +* SNOW 3G, KASUMI and ZUC, as the +* cipher.data.length,
Quoted 9 lines
lib/librte_cryptodev/rte_crypto_sym.h struct rte_crypto_sym_op { · line 712
Quoted 4 lines
lib/librte_cryptodev/rte_crypto_sym.h +4
-0+* cipher.data.offset, +* auth.data.length and +* auth.data.offset are in bits, they +* must be 8-bit multiples. What is the meaning of 'they' here?
cipher.data.length, cipher.data.offset, auth.data.length and auth.data.offset are in bits and may or may not be multiple of 8bits. This is documented in their comments.
[Fiona] This added note is an extra bullet under the explanation for Digest-encrypted cases. In these cases only those fields listed MUST be 8-bit multiples.
Can you suggest a change that would make that clearer?
Quoted 6 lines
Quoted 6 lines
lib/librte_cryptodev/rte_crypto_sym.h +0
-1* * Note, that for security reasons, it * is PMDs' responsibility to not -- 1.7.0.7
Quoted 36 lines
Hi Akhil,
Quoted 23 lines
Hi Fiona,
Quoted 20 lines
Clarify constraints on fields specified in bits for wireless algorithms in digest-encrypted case.
Signed-off-by Fiona Trahe <[email protected]>--- lib/librte_cryptodev/rte_crypto_sym.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)lib/librte_cryptodev/rte_crypto_sym.h +2
-0@@ -703,6 +703,13 @@ struct rte_crypto_sym_op {* auth.data.length and is typically * equal to auth.data.offset + * auth.data.length + digest_length. +* - for wireless algorithms, i.e. +* SNOW 3G, KASUMI and ZUC, as the Quoted 8 lines
lib/librte_cryptodev/rte_crypto_sym.h struct rte_crypto_sym_op { · line 712
Quoted 5 lines
lib/librte_cryptodev/rte_crypto_sym.h +5
-0+* cipher.data.length, +* cipher.data.offset, +* auth.data.length and +* auth.data.offset are in bits, they +* must be 8-bit multiples. What is the meaning of 'they' here?
cipher.data.length, cipher.data.offset, auth.data.length and auth.data.offset
Quoted 7 lines
are in bits
Quoted 2 lines
and may or may not be multiple of 8bits. This is documented in their comments.
[Fiona] This added note is an extra bullet under the explanation for Digest- encrypted cases.
In these cases only those fields listed MUST be 8-bit multiples. Can you suggest a change that would make that clearer?
@@ -590,7 +590,9 @@ struct rte_crypto_sym_op {
* For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
* KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8
* and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3,
- * this field should be in bits.
+ * this field should be in bits and must be
+ * 8-bit multiples in cases of encrypted
+ * digest.
*/Same change may be done in other 3 fields.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
lib/librte_cryptodev/rte_crypto_sym.h +0
-1* * Note, that for security reasons, it * is PMDs' responsibility to not -- 1.7.0.7
Quoted 23 lines
-----Original Message-----
From: Akhil Goyal [mailto:[email protected]]
Sent: Tuesday, October 22, 2019 1:08 PM
To: Trahe, Fiona <[email protected]>; [email protected]
Cc: Kusztal, ArkadiuszX <[email protected]>; Dybkowski, AdamX <[email protected]>
Subject: RE: [PATCH] cryptodev: clarify wireless inputs in digest-encrypted cases(quoted diff) +3
-1@@ -590,7 +590,9 @@ struct rte_crypto_sym_op { * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, - * this field should be in bits. + * this field should be in bits and must be + * 8-bit multiples in cases of encrypted + * digest. */
Quoted 1 line
Same change may be done in other 3 fields.
Ok, thanks, I'll send v2
PATCH v2 1/1 cryptodev: clarify wireless inputs in digest-encrypted cases
In reply to Fiona TraheClarify constraints on fields specified in bits for wireless algorithms in digest-encrypted case.
v2 changes:
- added note on each of the affected parameter fields
--- lib/librte_cryptodev/rte_crypto_sym.h | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-)
lib/librte_cryptodev/rte_crypto_sym.h +19 -4
@@ -590,7 +590,9 @@ struct rte_crypto_sym_op {* For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2, * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, -* this field should be in bits. +* this field should be in bits. For +* digest-encrypted cases this must be +* an 8-bit multiple. */ uint32_t length;/**< The message length, in bytes, of the
@@ -604,7 +606,9 @@ struct rte_crypto_sym_op {* For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2, * KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8 * and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3, -* this field should be in bits. +* this field should be in bits. For +* digest-encrypted cases this must be +* an 8-bit multiple. */ } data;/**< Data offsets and length for ciphering */ } cipher;
@@ -620,7 +624,9 @@ struct rte_crypto_sym_op {* For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, -* this field should be in bits. +* this field should be in bits. For +* digest-encrypted cases this must be +* an 8-bit multiple. * * @note * For KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
@@ -635,7 +641,9 @@ struct rte_crypto_sym_op {* For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2, * KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9 * and ZUC @ RTE_CRYPTO_AUTH_ZUC_EIA3, -* this field should be in bits. +* this field should be in bits. For +* digest-encrypted cases this must be +* an 8-bit multiple. * * @note * For KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
@@ -703,6 +711,13 @@ struct rte_crypto_sym_op {* auth.data.length and is typically * equal to auth.data.offset + * auth.data.length + digest_length. +* - for wireless algorithms, i.e. +* SNOW 3G, KASUMI and ZUC, as the +* cipher.data.length, +* cipher.data.offset, +* auth.data.length and +* auth.data.offset are in bits, they +* must be 8-bit multiples. * * Note, that for security reasons, it * is PMDs' responsibility to not
Signature · 1 line
1.7.0.7
Quoted 6 lines
Clarify constraints on fields specified in bits for wireless algorithms in digest-encrypted case.
Quoted 8 lines
v2 changes:
- added note on each of the affected parameter fieldsSigned-off-by Fiona Trahe <[email protected]>--- lib/librte_cryptodev/rte_crypto_sym.h | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-)
//snip//
lib/librte_cryptodev/rte_crypto_sym.h struct rte_crypto_sym_op { · line 720
Quoted 11 lines
lib/librte_cryptodev/rte_crypto_sym.h +7
-0@@ -703,6 +711,13 @@ struct rte_crypto_sym_op {* auth.data.length and is typically * equal to auth.data.offset + * auth.data.length + digest_length. +* - for wireless algorithms, i.e. +* SNOW 3G, KASUMI and ZUC, as the +* cipher.data.length, +* cipher.data.offset, +* auth.data.length and +* auth.data.offset are in bits, they +* must be 8-bit multiples.
Why do you need this change? This is redundant information.
Quoted 5 lines
lib/librte_cryptodev/rte_crypto_sym.h +0
-1* * Note, that for security reasons, it * is PMDs' responsibility to not -- 1.7.0.7
Quoted 26 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Tuesday, October 22, 2019 2:24 PM
To: Trahe, Fiona <[email protected]>; [email protected]
Cc: Kusztal, ArkadiuszX <[email protected]>; Dybkowski, AdamX <[email protected]>
Subject: RE: [PATCH v2] cryptodev: clarify wireless inputs in digest-encrypted casesQuoted 4 lines
Clarify constraints on fields specified in bits for wireless algorithms in digest-encrypted case.
Quoted 8 lines
v2 changes:
- added note on each of the affected parameter fieldsSigned-off-by Fiona Trahe <[email protected]>--- lib/librte_cryptodev/rte_crypto_sym.h | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-)//snip//
Quoted 13 lines
lib/librte_cryptodev/rte_crypto_sym.h struct rte_crypto_sym_op { · line 720
Quoted 11 lines
lib/librte_cryptodev/rte_crypto_sym.h +7
-0@@ -703,6 +711,13 @@ struct rte_crypto_sym_op {* auth.data.length and is typically * equal to auth.data.offset + * auth.data.length + digest_length. +* - for wireless algorithms, i.e. +* SNOW 3G, KASUMI and ZUC, as the +* cipher.data.length, +* cipher.data.offset, +* auth.data.length and +* auth.data.offset are in bits, they +* must be 8-bit multiples. Why do you need this change? This is redundant information.
[Fiona] I think it's useful that it's under the digest-encrypted case notes.
So ok as is and is good to have info in both places people may look.
However if we want to avoid duplication, then I'd prefer to keep here and add a note
under the specific params to direct to check here. Like:
* and ZUC @ RTE_CRYPTO_CIPHER_ZUC_EEA3,
- * this field should be in bits. + * this field should be in bits. See also + * notes about digest-encrypted case.
*/
Quoted 37 lines
Quoted 17 lines
Quoted 7 lines
Clarify constraints on fields specified in bits for wireless algorithms in digest-encrypted case.
Quoted 8 lines
v2 changes:
- added note on each of the affected parameter fieldsSigned-off-by Fiona Trahe <[email protected]>--- lib/librte_cryptodev/rte_crypto_sym.h | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-)//snip//
Quoted 13 lines
lib/librte_cryptodev/rte_crypto_sym.h struct rte_crypto_sym_op { · line 720
Quoted 11 lines
lib/librte_cryptodev/rte_crypto_sym.h +7
-0@@ -703,6 +711,13 @@ struct rte_crypto_sym_op {* auth.data.length and is typically * equal to auth.data.offset + * auth.data.length + digest_length. +* - for wireless algorithms, i.e. +* SNOW 3G, KASUMI and ZUC, as the +* cipher.data.length, +* cipher.data.offset, +* auth.data.length and +* auth.data.offset are in bits, they +* must be 8-bit multiples. Why do you need this change? This is redundant information.
[Fiona] I think it's useful that it's under the digest-encrypted case notes. So ok as is and is good to have info in both places people may look. However if we want to avoid duplication, then I'd prefer to keep here and add a note
under the specific params to direct to check here. Like:
* and ZUC @RTE_CRYPTO_CIPHER_ZUC_EEA3,
lib/librte_cryptodev/rte_crypto_sym.h struct rte_crypto_sym_op { · line 596
Quoted 4 lines
lib/librte_cryptodev/rte_crypto_sym.h +2
-1-* this field should be in bits. +* this field should be in bits. See also +* notes about digest-encrypted case. */
OK
Applied to dpdk-next-crypto
Thanks.