diff options
author | Igor Kirillov <i.kirillov@kryptonite.ru> | 2020-10-30 09:29:20 +0300 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@users.noreply.github.com> | 2020-11-12 20:26:16 +0300 |
commit | 798a847d840c42cc14e67bad882323b830aacab1 (patch) | |
tree | afa041a57f9bca60e8272e25c2c1b7039e1ace42 /gost89.h | |
parent | 4dc691d1177ad328f34bee01128b3a8aa23b2547 (diff) | |
download | gost-engine-798a847d840c42cc14e67bad882323b830aacab1.zip gost-engine-798a847d840c42cc14e67bad882323b830aacab1.tar.gz gost-engine-798a847d840c42cc14e67bad882323b830aacab1.tar.bz2 |
modernize ctrl function for magma & kuznechik TLS usage
modernize magma & kuznechik ctrl functions for EVP_CTRL_TLSTREE mode.
add some minor updates to store master key for using in magma TLSTREE mode.
Diffstat (limited to 'gost89.h')
-rw-r--r-- | gost89.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -33,6 +33,7 @@ typedef struct { /* Cipher context includes key and preprocessed substitution block */ typedef struct { + u4 master_key[8]; u4 key[8]; u4 mask[8]; /* Constant s-boxes -- set up in gost_init(). */ @@ -64,6 +65,8 @@ void gost_key(gost_ctx * c, const byte * k); void gost_key_nomask(gost_ctx * c, const byte * k); /* Set key into context */ void magma_key(gost_ctx * c, const byte * k); +/* Set master 256-bit key to be used in TLSTREE calculation into context */ +void magma_master_key(gost_ctx *c, const byte *k); /* Get key from context */ void gost_get_key(gost_ctx * c, byte * k); /* Set S-blocks into context */ |