]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Make grasshopper OMAC result size 8 instead of 4
authorVitaly Chikunov <vt@altlinux.org>
Wed, 25 Jul 2018 07:39:50 +0000 (10:39 +0300)
committerVitaly Chikunov <vt@altlinux.org>
Wed, 25 Jul 2018 08:00:00 +0000 (11:00 +0300)
Two reasons: to match GOST R test vector size, just make it bigger.

gost_omac.c

index fa7ab746ba5119a485003521324f17803f47ab33..c4e81113d348039f687ec6829ff7a7c3e84bfad1 100644 (file)
@@ -252,7 +252,7 @@ EVP_MD *grasshopper_omac(void)
         EVP_MD *md;
 
         if ((md = EVP_MD_meth_new(NID_grasshopper_mac, NID_undef)) == NULL
-            || !EVP_MD_meth_set_result_size(md, 4)
+            || !EVP_MD_meth_set_result_size(md, 8)
             || !EVP_MD_meth_set_input_blocksize(md, 8)
             || !EVP_MD_meth_set_app_datasize(md, sizeof(OMAC_CTX))
             || !EVP_MD_meth_set_flags(md, 0)