"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "random/jitterentropy-base.c" between
libgcrypt-1.9.1.tar.bz2 and libgcrypt-1.9.2.tar.bz2

About: Libgcrypt is a general purpose library of cryptographic building blocks (originally based on GnuPG code).

jitterentropy-base.c  (libgcrypt-1.9.1.tar.bz2):jitterentropy-base.c  (libgcrypt-1.9.2.tar.bz2)
skipping to change at line 309 skipping to change at line 309
* @ec Reference to entropy collector * @ec Reference to entropy collector
* @current_delta Jitter time delta * @current_delta Jitter time delta
* *
* @return * @return
* 0 jitter measurement not stuck (good bit) * 0 jitter measurement not stuck (good bit)
* 1 jitter measurement stuck (reject bit) * 1 jitter measurement stuck (reject bit)
*/ */
static int jent_stuck(struct rand_data *ec, uint64_t current_delta) static int jent_stuck(struct rand_data *ec, uint64_t current_delta)
{ {
int64_t delta2 = ec->last_delta - current_delta; int64_t delta2 = ec->last_delta - current_delta;
int64_t delta3 = delta2 - ec->last_delta2; int64_t delta3 = (uint64_t)delta2 - (uint64_t)ec->last_delta2;
ec->last_delta = current_delta; ec->last_delta = current_delta;
ec->last_delta2 = delta2; ec->last_delta2 = delta2;
if (!current_delta || !delta2 || !delta3) if (!current_delta || !delta2 || !delta3)
return 1; return 1;
return 0; return 0;
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)