diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2018-07-26 12:07:11 +0300 |
---|---|---|
committer | Vitaly Chikunov <vt@altlinux.org> | 2018-07-26 18:52:32 +0300 |
commit | 07c957df13588802781cb36d1539e22fba7e071e (patch) | |
tree | 675b2e0543da797a0e07c8dd22eb51f694653cc2 /gost_grasshopper_cipher.c | |
parent | 488f3da97f0833c1608bffb6ea510be4314cef7f (diff) | |
download | gost-engine-07c957df13588802781cb36d1539e22fba7e071e.zip gost-engine-07c957df13588802781cb36d1539e22fba7e071e.tar.gz gost-engine-07c957df13588802781cb36d1539e22fba7e071e.tar.bz2 |
Set default value for CTR ACPKM limit
Default limit for Kuznyechik is 4KiB, from TLS 1.2 recommendations. As
a consequence it does not need to be configured via EVP_CTRL_KEY_MESH.
Also, explicitly set ACPKM limit in tests.
Diffstat (limited to 'gost_grasshopper_cipher.c')
-rw-r--r-- | gost_grasshopper_cipher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gost_grasshopper_cipher.c b/gost_grasshopper_cipher.c index a3f34d6..07dfd91 100644 --- a/gost_grasshopper_cipher.c +++ b/gost_grasshopper_cipher.c @@ -264,8 +264,8 @@ GRASSHOPPER_INLINE int gost_grasshopper_cipher_init_ctracpkm(EVP_CIPHER_CTX *ctx /* NB: setting type makes EVP do_cipher callback useless */ c->c.type = GRASSHOPPER_CIPHER_CTRACPKM; EVP_CIPHER_CTX_set_num(ctx, 0); - c->section_size = 0; /* by default meshing is turned off */ - c->skip_sections = 0; /* will be set to 1 on EVP_CTRL_KEY_MESH */ + c->section_size = 4096; + c->skip_sections = 1; return gost_grasshopper_cipher_init(ctx, key, iv, enc); } |