diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2015-07-07 21:49:57 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2015-07-27 11:47:16 +0300 |
commit | bb088c6b1620504fdc79e89af27c2bf3fb02b4b4 (patch) | |
tree | 96e9dca658f564df73fc095d16432875f8599faa /tests | |
parent | 620e1e0300c79943a1846a49563b04386dc60546 (diff) | |
download | libgcrypt-bb088c6b1620504fdc79e89af27c2bf3fb02b4b4.tar.gz |
Add bulk OCB for Camellia AES-NI/AVX and AES-NI/AVX2 implementations
* cipher/camellia-aesni-avx-amd64.S: Add OCB assembly functions.
* cipher/camellia-aesni-avx2-amd64.S: Add OCB assembly functions.
* cipher/camellia-glue.c (_gcry_camellia_aesni_avx_ocb_enc)
(_gcry_camellia_aesni_avx_ocb_dec, _gcry_camellia_aesni_avx_ocb_auth)
(_gcry_camellia_aesni_avx2_ocb_enc, _gcry_camellia_aesni_avx2_ocb_dec)
(_gcry_camellia_aesni_avx2_ocb_auth): New prototypes.
(get_l, _gcry_camellia_ocb_crypt, _gcry_camellia_ocb_auth): New.
* cipher/cipher.c (_gcry_cipher_open_internal): Setup OCB bulk
functions for Camellia.
* src/cipher.h (_gcry_camellia_ocb_crypt)
(_gcry_camellia_ocb_auth): New.
* tests/basic.c (check_ocb_cipher): Add test-vector for Camellia.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basic.c b/tests/basic.c index 2c664c0d..e3f4bfd9 100644 --- a/tests/basic.c +++ b/tests/basic.c @@ -3335,6 +3335,15 @@ check_ocb_cipher (void) check_ocb_cipher_largebuf(GCRY_CIPHER_AES256, 32, "\xfa\x26\xa5\xbf\xf6\x7d\x3a\x8d" "\xfe\x96\x67\xc9\xc8\x41\x03\x51"); + check_ocb_cipher_largebuf(GCRY_CIPHER_CAMELLIA128, 16, + "\x28\x23\x38\x45\x2b\xfd\x42\x45" + "\x43\x64\x7e\x67\x7f\xf4\x8b\xcd"); + check_ocb_cipher_largebuf(GCRY_CIPHER_CAMELLIA192, 24, + "\xee\xca\xe5\x39\x27\x2d\x33\xe7" + "\x79\x74\xb0\x1d\x37\x12\xd5\x6c"); + check_ocb_cipher_largebuf(GCRY_CIPHER_CAMELLIA256, 32, + "\x39\x39\xd0\x2d\x05\x68\x74\xee" + "\x18\x6b\xea\x3d\x0b\xd3\x58\xae"); } |