From: Marek Vasut <marex@denx.de>
To: Horia Geanta <horia.geanta@freescale.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, linux-crypto@vger.kernel.org
Subject: Re: [PATCH cryptodev 3/4] crypto: testmgr - add aead null encryption test vectors
Date: Mon, 17 Mar 2014 19:27:31 +0100 [thread overview]
Message-ID: <201403171927.31955.marex@denx.de> (raw)
In-Reply-To: <1394812012-13714-3-git-send-email-horia.geanta@freescale.com>
On Friday, March 14, 2014 at 04:46:51 PM, Horia Geanta wrote:
> Add test vectors for aead with null encryption and md5,
> respectively sha1 authentication.
> Input data is taken from test vectors listed in RFC2410.
>
> Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
[...]
> --- a/crypto/testmgr.h
> +++ b/crypto/testmgr.h
> @@ -12821,6 +12821,10 @@ static struct cipher_testvec
> cast6_xts_dec_tv_template[] = { #define AES_DEC_TEST_VECTORS 4
> #define AES_CBC_ENC_TEST_VECTORS 5
> #define AES_CBC_DEC_TEST_VECTORS 5
> +#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
> +#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
> +#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
> +#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
> #define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
> #define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
> #define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
> @@ -13627,6 +13631,90 @@ static struct cipher_testvec
> aes_cbc_dec_tv_template[] = { },
> };
>
> +static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
> + { /* Input data from RFC 2410 Case 1 */
> +#ifdef __LITTLE_ENDIAN
> + .key = "\x08\x00" /* rta length */
> + "\x01\x00" /* rta type */
> +#else
> + .key = "\x00\x08" /* rta length */
> + "\x00\x01" /* rta type */
> +#endif
This endianness thing looks a bit unhealthy. Is this really needed or is this a
hack for some driver casting this field to u32 and then accessing it as such ?
> + "\x00\x00\x00\x00" /* enc key length */
> + "\x00\x00\x00\x00\x00\x00\x00\x00"
> + "\x00\x00\x00\x00\x00\x00\x00\x00",
> + .klen = 8 + 16 + 0,
> + .iv = "",
> + .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
> + .ilen = 8,
> + .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
> + "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
> + "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
> + .rlen = 8 + 16,
[...]
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-03-17 18:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 15:46 [PATCH cryptodev 1/4] crypto: caam - remove error propagation handling Horia Geanta
2014-03-14 15:46 ` [PATCH cryptodev 2/4] crypto: export NULL algorithms defines Horia Geanta
2014-03-14 15:46 ` [PATCH cryptodev 3/4] crypto: testmgr - add aead null encryption test vectors Horia Geanta
2014-03-17 18:27 ` Marek Vasut [this message]
2014-03-19 18:10 ` Horia Geantă
2014-03-14 15:46 ` [PATCH cryptodev 4/4] crypto: caam - add support for aead null encryption Horia Geanta
2014-03-17 18:23 ` [PATCH cryptodev 1/4] crypto: caam - remove error propagation handling Marek Vasut
2014-03-19 17:25 ` Horia Geantă
2014-03-19 19:01 ` Marek Vasut
2014-03-20 9:44 ` Horia Geantă
2014-03-21 14:40 ` Herbert Xu
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=201403171927.31955.marex@denx.de \
--to=marex@denx.de \
--cc=herbert@gondor.apana.org.au \
--cc=horia.geanta@freescale.com \
--cc=linux-crypto@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.