* Re: [dpdk-stable] [PATCH v2 1/3] crypto/aesni_gcm: fix J0 padding bytes for GCM
[not found] ` <1482481493-4369-2-git-send-email-arkadiuszx.kusztal@intel.com>
@ 2017-01-06 10:27 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2017-01-06 10:27 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, dev, stable
Cc: Trahe, Fiona, Griffin, John, Jain, Deepak K, Doherty, Declan
CC'ing stable mailing list.
> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, December 23, 2016 8:25 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona; De Lara Guarch, Pablo; Griffin, John; Jain, Deepak K;
> Doherty, Declan; Kusztal, ArkadiuszX
> Subject: [PATCH v2 1/3] crypto/aesni_gcm: fix J0 padding bytes for GCM
>
> This commit fixes pre-counter block (J0) padding by clearing
> four most significant bytes before setting initial counter value.
>
> Fixes: b2bb3597470c ("crypto/aesni_gcm: move pre-counter block to
> driver")
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> index dba5e15..af3d60f 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> @@ -40,6 +40,7 @@
> #include <rte_vdev.h>
> #include <rte_malloc.h>
> #include <rte_cpuflags.h>
> +#include <rte_byteorder.h>
>
> #include "aesni_gcm_pmd_private.h"
>
> @@ -241,7 +242,8 @@ process_gcm_crypto_op(struct aesni_gcm_qp *qp,
> struct rte_crypto_sym_op *op,
> * to set BE LSB to 1, driver expects that 16B is allocated
> */
> if (op->cipher.iv.length == 12) {
> - op->cipher.iv.data[15] = 1;
> + uint32_t *iv_padd = (uint32_t *)&op->cipher.iv.data[12];
> + *iv_padd = rte_bswap32(1);
> }
>
> if (op->auth.aad.length != 12 && op->auth.aad.length != 8 &&
> --
> 2.1.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH v2 3/3] crypto/qat: fix iv size in PMD capabilities
[not found] ` <1482481493-4369-4-git-send-email-arkadiuszx.kusztal@intel.com>
@ 2017-01-06 10:31 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2017-01-06 10:31 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, dev
Cc: Trahe, Fiona, Griffin, John, Jain, Deepak K, Doherty, Declan, stable
CC'ing stable mailing list.
> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, December 23, 2016 8:25 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona; De Lara Guarch, Pablo; Griffin, John; Jain, Deepak K;
> Doherty, Declan; Kusztal, ArkadiuszX
> Subject: [PATCH v2 3/3] crypto/qat: fix iv size in PMD capabilities
>
> This patch sets iv size in qat PMD to 12 bytes to be
> conformant with nist SP800-38D.
>
> Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery")
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> drivers/crypto/qat/qat_crypto.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/qat/qat_crypto.c
> b/drivers/crypto/qat/qat_crypto.c
> index fa78c60..0b714ad 100644
> --- a/drivers/crypto/qat/qat_crypto.c
> +++ b/drivers/crypto/qat/qat_crypto.c
> @@ -303,8 +303,8 @@ static const struct rte_cryptodev_capabilities
> qat_pmd_capabilities[] = {
> .increment = 8
> },
> .iv_size = {
> - .min = 16,
> - .max = 16,
> + .min = 12,
> + .max = 12,
> .increment = 0
> }
> }, }
> --
> 2.1.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH v2 2/3] crypto/aesni_gcm: fix iv size in PMD capabilities
[not found] ` <1482481493-4369-3-git-send-email-arkadiuszx.kusztal@intel.com>
@ 2017-01-06 10:31 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2017-01-06 10:31 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, dev
Cc: Trahe, Fiona, Griffin, John, Jain, Deepak K, Doherty, Declan, stable
CC'ing stable mailing list.
> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Friday, December 23, 2016 8:25 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona; De Lara Guarch, Pablo; Griffin, John; Jain, Deepak K;
> Doherty, Declan; Kusztal, ArkadiuszX
> Subject: [PATCH v2 2/3] crypto/aesni_gcm: fix iv size in PMD capabilities
>
> This patch sets iv size in aesni gcm PMD to 12 bytes to be
> conformant with nist SP800-38D.
>
> Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto
> operations")
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> index e824d4b..c51f82a 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> @@ -77,8 +77,8 @@ static const struct rte_cryptodev_capabilities
> aesni_gcm_pmd_capabilities[] = {
> .increment = 0
> },
> .iv_size = {
> - .min = 16,
> - .max = 16,
> + .min = 12,
> + .max = 12,
> .increment = 0
> }
> }, }
> --
> 2.1.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-06 10:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1482481493-4369-1-git-send-email-arkadiuszx.kusztal@intel.com>
[not found] ` <1482481493-4369-2-git-send-email-arkadiuszx.kusztal@intel.com>
2017-01-06 10:27 ` [dpdk-stable] [PATCH v2 1/3] crypto/aesni_gcm: fix J0 padding bytes for GCM De Lara Guarch, Pablo
[not found] ` <1482481493-4369-4-git-send-email-arkadiuszx.kusztal@intel.com>
2017-01-06 10:31 ` [dpdk-stable] [PATCH v2 3/3] crypto/qat: fix iv size in PMD capabilities De Lara Guarch, Pablo
[not found] ` <1482481493-4369-3-git-send-email-arkadiuszx.kusztal@intel.com>
2017-01-06 10:31 ` [dpdk-stable] [PATCH v2 2/3] crypto/aesni_gcm: " De Lara Guarch, Pablo
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).