/* 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(). */
void gost_key(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 */
* Compute MAC of given length in bits from data, using non-zero 8-byte IV
* (non-standard, for use in CryptoPro key transport only
*/
-int gost_mac_iv(gost_ctx * c, int mac_len, const unsigned char *iv,
+int gost_mac_iv(gost_ctx * ctx, int mac_len, const unsigned char *iv,
const unsigned char *data, unsigned int data_len,
unsigned char *mac);
/* Perform one step of MAC calculation like gostcrypt */