diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-10-28 10:11:21 +0300 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-10-28 10:49:38 +0300 |
commit | c3d1f9c3159416331c0c852739fb5fd2cf60f708 (patch) | |
tree | 26ed4c0cc940f284af358a2b90be6c2d9d41f885 /lib | |
parent | fd3a880a9b701e17047871d86281751837e5afcd (diff) | |
download | gnutls-c3d1f9c3159416331c0c852739fb5fd2cf60f708.tar.gz |
nettle: fix s-boxes selection for rare GOST 28147-89 variants
gost28147-89 code contained c&p error, which resulted in using S-BOX
CryptoPro-A instead of -B, -C, -D. Fix that.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nettle/cipher.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/nettle/cipher.c b/lib/nettle/cipher.c index eab1a03588..e28c39038c 100644 --- a/lib/nettle/cipher.c +++ b/lib/nettle/cipher.c @@ -176,21 +176,21 @@ static void _gost28147_set_key_cpb(void *ctx, const uint8_t *key) { gost28147_set_key(ctx, key); - gost28147_set_param(ctx, &gost28147_param_CryptoPro_A); + gost28147_set_param(ctx, &gost28147_param_CryptoPro_B); } static void _gost28147_set_key_cpc(void *ctx, const uint8_t *key) { gost28147_set_key(ctx, key); - gost28147_set_param(ctx, &gost28147_param_CryptoPro_A); + gost28147_set_param(ctx, &gost28147_param_CryptoPro_C); } static void _gost28147_set_key_cpd(void *ctx, const uint8_t *key) { gost28147_set_key(ctx, key); - gost28147_set_param(ctx, &gost28147_param_CryptoPro_A); + gost28147_set_param(ctx, &gost28147_param_CryptoPro_D); } #endif |