From: Vitaly Chikunov Date: Sat, 9 May 2020 03:15:32 +0000 (+0300) Subject: gost_crypt: Fix IV length for Magma CTR mode X-Git-Tag: v3.0.0~134 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=a3cee1c0660285f5669a9bfd85a494e18b970a67;p=openssl-gost%2Fengine.git gost_crypt: Fix IV length for Magma CTR mode It's 4, half of block size. --- diff --git a/gost_crypt.c b/gost_crypt.c index 4e22145..268e311 100644 --- a/gost_crypt.c +++ b/gost_crypt.c @@ -201,7 +201,7 @@ const EVP_CIPHER *cipher_magma_ctr(void) && ((_hidden_magma_ctr = EVP_CIPHER_meth_new(NID_magma_ctr, 1 /* block_size */ , 32 /* key_size */ )) == NULL - || !EVP_CIPHER_meth_set_iv_length(_hidden_magma_ctr, 8) + || !EVP_CIPHER_meth_set_iv_length(_hidden_magma_ctr, 4) || !EVP_CIPHER_meth_set_flags(_hidden_magma_ctr, EVP_CIPH_CTR_MODE | EVP_CIPH_NO_PADDING |