From 084a85eeddfe1ab84b861971b6efd976d2ae3d1f Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 10 Feb 2016 17:07:42 +0000 Subject: crypto: add support for the cast5-128 cipher algorithm A new cipher algorithm 'cast-5-128' is defined for the Cast-5 algorithm with 128 bit key size. Smaller key sizes are supported by Cast-5, but nothing in QEMU should use them, so only 128 bit keys are permitted. The nettle and gcrypt cipher backends are updated to support the new cipher and a test vector added to the cipher test suite. The new algorithm is enabled in the LUKS block encryption driver. Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Signed-off-by: Daniel P. Berrange --- crypto/cipher.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crypto/cipher.c') diff --git a/crypto/cipher.c b/crypto/cipher.c index 076dff023c..9e0a226d3c 100644 --- a/crypto/cipher.c +++ b/crypto/cipher.c @@ -27,6 +27,7 @@ static size_t alg_key_len[QCRYPTO_CIPHER_ALG__MAX] = { [QCRYPTO_CIPHER_ALG_AES_192] = 24, [QCRYPTO_CIPHER_ALG_AES_256] = 32, [QCRYPTO_CIPHER_ALG_DES_RFB] = 8, + [QCRYPTO_CIPHER_ALG_CAST5_128] = 16, }; static size_t alg_block_len[QCRYPTO_CIPHER_ALG__MAX] = { @@ -34,6 +35,7 @@ static size_t alg_block_len[QCRYPTO_CIPHER_ALG__MAX] = { [QCRYPTO_CIPHER_ALG_AES_192] = 16, [QCRYPTO_CIPHER_ALG_AES_256] = 16, [QCRYPTO_CIPHER_ALG_DES_RFB] = 8, + [QCRYPTO_CIPHER_ALG_CAST5_128] = 8, }; static bool mode_need_iv[QCRYPTO_CIPHER_MODE__MAX] = { -- cgit v1.2.3