summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/gost/gost89_keywrap.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/gost/gost89_keywrap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/gost/gost89_keywrap.c b/src/lib/libcrypto/gost/gost89_keywrap.c
index fa7698d3f7..a754c4d56e 100644
--- a/src/lib/libcrypto/gost/gost89_keywrap.c
+++ b/src/lib/libcrypto/gost/gost89_keywrap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gost89_keywrap.c,v 1.2 2014/11/09 19:27:29 miod Exp $ */ 1/* $OpenBSD: gost89_keywrap.c,v 1.3 2014/11/09 19:28:44 miod Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> 3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
4 * Copyright (c) 2005-2006 Cryptocom LTD 4 * Copyright (c) 2005-2006 Cryptocom LTD
@@ -129,10 +129,9 @@ gost_key_unwrap_crypto_pro(int nid, const unsigned char *keyExchangeKey,
129 Gost2814789_decrypt(wrappedKey + 8 + 24, sessionKey + 24, &ctx); 129 Gost2814789_decrypt(wrappedKey + 8 + 24, sessionKey + 24, &ctx);
130 130
131 GOST2814789IMIT(sessionKey, 32, cek_mac, nid, kek_ukm, wrappedKey); 131 GOST2814789IMIT(sessionKey, 32, cek_mac, nid, kek_ukm, wrappedKey);
132 if (memcmp(cek_mac, wrappedKey + 40, 4)) { 132 if (memcmp(cek_mac, wrappedKey + 40, 4))
133 printf("IMIT Missmatch!\n");
134 return 0; 133 return 0;
135 } 134
136 return 1; 135 return 1;
137} 136}
138 137