]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost89.h
tcl_tests: ca.try: Ignore openssl crl exit status for 'corrupted CRL' test
[openssl-gost/engine.git] / gost89.h
index 9f36905e43903243f42b7a867118fa9470c4e568..f8a83bbb9d47a5a03eb0ea51ab3c5483a7cc88f9 100644 (file)
--- a/gost89.h
+++ b/gost89.h
@@ -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(). */
@@ -58,10 +59,18 @@ void gost_dec_cfb(gost_ctx * ctx, const byte * iv, const byte * cipher,
 void gostcrypt(gost_ctx * c, const byte * in, byte * out);
 /* Decrypt one  block */
 void gostdecrypt(gost_ctx * c, const byte * in, byte * out);
+/* Encrypt one  block */
+void magmacrypt(gost_ctx * c, const byte * in, byte * out);
+/* Decrypt one  block */
+void magmadecrypt(gost_ctx * c, const byte * in, byte * out);
 /* Set key into context */
 void gost_key(gost_ctx * c, const byte * k);
+/* Set key into context without key mask */
+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 */
@@ -78,7 +87,7 @@ int gost_mac(gost_ctx * ctx, int mac_len, const unsigned char *data,
  * 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 */