diff options
Diffstat (limited to 'src/lib/crypto/yarrow/yarrow.c')
-rw-r--r-- | src/lib/crypto/yarrow/yarrow.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/crypto/yarrow/yarrow.c b/src/lib/crypto/yarrow/yarrow.c index 7d9e6bdcf..066a9c576 100644 --- a/src/lib/crypto/yarrow/yarrow.c +++ b/src/lib/crypto/yarrow/yarrow.c @@ -18,6 +18,8 @@ * See the accompanying LICENSE file for more information. */ +#include "k5-int.h" + #include <string.h> #include <limits.h> #if !defined(WIN32) @@ -175,7 +177,7 @@ int Yarrow_Init(Yarrow_CTX* y, const char *filename) mem_zero(y->K, sizeof(y->K)); - TRY (Krb5int_Yarrow_Cipher_Init(&y->cipher, y->K)); + TRY (krb5int_yarrow_cipher_init(&y->cipher, y->K)); y->out_left = 0; y->out_count = 0; y->gate_count = 0; @@ -402,7 +404,7 @@ static int Yarrow_Output_Block( Yarrow_CTX* y, void* out ) /* R <- E_k(C) */ - TRY ( krb5int_yarrow_cipher_encrypt_block ( &y->cipher, y->C, out )) + TRY ( krb5int_yarrow_cipher_encrypt_block ( &y->cipher, y->C, out )); #if defined(YARROW_DEBUG) printf("===\n"); @@ -526,7 +528,7 @@ int Yarrow_Gate(Yarrow_CTX* y) /* need to resetup the key schedule as the key has changed */ - TRY (Krb5int_Yarrow_Cipher_Init(&y->cipher, y->K)); + TRY (krb5int_yarrow_cipher_init(&y->cipher, y->K)); CATCH: TRACE( printf( "]," ); ); @@ -619,6 +621,7 @@ int Yarrow_Reseed(Yarrow_CTX* y, int pool) /* feed hash of slow pool into the fast pool */ + HASH_Final(slow_pool, digest); /* Each pool contains the running hash of all inputs fed into it @@ -637,7 +640,7 @@ int Yarrow_Reseed(Yarrow_CTX* y, int pool) /* step 1. v_0 <- hash of all inputs into fast pool */ - HASH_Final(fast_pool, v_0); + HASH_Final(fast_pool, &v_0); HASH_Init(fast_pool); /* reinitialize fast pool */ /* v_i <- v_0 */ @@ -657,7 +660,7 @@ int Yarrow_Reseed(Yarrow_CTX* y, int pool) HASH_Update(&hash, &big_endian_int32, sizeof(krb5_ui_4)); big_endian_int32 = make_big_endian32(i & 0xFFFFFFFF); /* LS word */ HASH_Update(&hash, &big_endian_int32, sizeof(krb5_ui_4)); - HASH_Final(&hash, v_i); + HASH_Final(&hash, &v_i); } /* step3. K = h'(h(v_Pt|K)) */ @@ -678,7 +681,7 @@ int Yarrow_Reseed(Yarrow_CTX* y, int pool) /* need to resetup the key schedule as the key has changed */ - TRY(Krb5int_Yarrow_Cipher_Init(&y->cipher, y->K)); + TRY(krb5int_yarrow_cipher_init(&y->cipher, y->K)); #if defined(YARROW_DEBUG) hex_print(stdout, "new K", y->K, sizeof(y->K)); @@ -689,7 +692,7 @@ int Yarrow_Reseed(Yarrow_CTX* y, int pool) #if defined(YARROW_DEBUG) hex_print(stdout, "old C", y->C, sizeof(y->C)); #endif - TRY (krb5int_yarrow_cipher_encrypt_block (&y->cipher, zero_block, y->C)) + TRY (krb5int_yarrow_cipher_encrypt_block (&y->cipher, zero_block, y->C)); #if defined(YARROW_DEBUG) hex_print(stdout, "new C", y->C, sizeof(y->C)); #endif |