Parameters/gcryctl to digest algorithms?

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Tue Mar 25 08:20:44 CET 2014


Hello,

On Mon, Mar 24, 2014 at 1:31 PM, Werner Koch <wk at gnupg.org> wrote:
> On Sun, 23 Mar 2014 21:18, dbaryshkov at gmail.com said:
>
>> digest calculation. I can add another algo for that s-box, however I fear
>> that it would be an overkill. I was also thinking about reusing
>
> Please use a new algorithm number.  In case you expect that you need
> several of them in the uture, it is probably useful to reserve a range
> of algorithm ids like:
>
> GCRY_MD_GOSTR3411_94  = 308, /* GOST R 34.11-94.  */
> GCRY_MD_STRIBOG256    = 309, /* GOST R 34.11-2012, 256 bit.  */
> GCRY_MD_STRIBOG512    = 310  /* GOST R 34.11-2012, 512 bit.  */
>
> GCRY_MD_GOSTR3411_XX  = 401  /* 402 to 4xx reserved for other variants. */

Thanks. For GOST symmetric cipher I already had 8 s-boxes and now
I'm adding 10 more, and there might be even more in future. I planned
to use gcry_cipher_ctl to select s-box for the symmetric cipher.
Is it a suitable solution?

Would it be fine to use the same ctl value in gcry_mac_ctl and
gcry_md_ctl to select s-box? I'm particularly concerned about
MAC algorithms, because there I would need one algo number
for each 34.11-94 S-BOX (there are 2 currently, 1 being
added from Ukrainian s-box space, maybe more in future)
and one for each 28147-89 S-BOX, being used in "imitovstavka"
mode of GOST 28147-89 (MAC generation). That is probably too
much to clobber algo space, thus I'd like to use
gcry_mac_ctl at least for "imitiovstavka" MAC algo.

-- 
With best wishes
Dmitry



More information about the Gcrypt-devel mailing list