mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-12 16:45:16 -04:00
Provide no info from entropy_func() on future entropy
This commit is contained in:
parent
1e9423704a
commit
ef3cf7088f
@ -185,11 +185,6 @@ int entropy_func( void *data, unsigned char *output, size_t len )
|
|||||||
|
|
||||||
sha4_finish( &ctx->accumulator, buf );
|
sha4_finish( &ctx->accumulator, buf );
|
||||||
|
|
||||||
/*
|
|
||||||
* Perform second SHA-512 on entropy
|
|
||||||
*/
|
|
||||||
sha4( buf, ENTROPY_BLOCK_SIZE, buf, 0 );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reset accumulator and counters and recycle existing entropy
|
* Reset accumulator and counters and recycle existing entropy
|
||||||
*/
|
*/
|
||||||
@ -197,6 +192,11 @@ int entropy_func( void *data, unsigned char *output, size_t len )
|
|||||||
sha4_starts( &ctx->accumulator, 0 );
|
sha4_starts( &ctx->accumulator, 0 );
|
||||||
sha4_update( &ctx->accumulator, buf, ENTROPY_BLOCK_SIZE );
|
sha4_update( &ctx->accumulator, buf, ENTROPY_BLOCK_SIZE );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Perform second SHA-512 on entropy
|
||||||
|
*/
|
||||||
|
sha4( buf, ENTROPY_BLOCK_SIZE, buf, 0 );
|
||||||
|
|
||||||
for( i = 0; i < ctx->source_count; i++ )
|
for( i = 0; i < ctx->source_count; i++ )
|
||||||
ctx->source[i].size = 0;
|
ctx->source[i].size = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user