Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:branches:openSUSE:Factory:Rings:1-MinimalX
libgcrypt
libgcrypt-FIPS-jitter-whole-entropy.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libgcrypt-FIPS-jitter-whole-entropy.patch of Package libgcrypt
Index: libgcrypt-1.10.3/random/rndgetentropy.c =================================================================== --- libgcrypt-1.10.3.orig/random/rndgetentropy.c +++ libgcrypt-1.10.3/random/rndgetentropy.c @@ -53,16 +53,30 @@ _gcry_rndgetentropy_gather_random (void /* When using a blocking random generator try to get some entropy * from the jitter based RNG. In this case we take up to 50% of the - * remaining requested bytes. */ + * remaining requested bytes. In FIPS mode, we get all the entropy + * from the jitter RNG. */ if (level >= GCRY_VERY_STRONG_RANDOM) { size_t n; - n = _gcry_rndjent_poll (add, origin, length/2); - if (n > length/2) - n = length/2; - if (length > 1) - length -= n; + /* In FIPS mode, use the whole length of the entropy buffer from + * Jitter RNG */ + if (fips_mode ()) + { + n = _gcry_rndjent_poll (add, origin, length); + if (n != length) + fips_signal_error ("jitter entropy failed"); + else + length = 0; + } + else + { + n = _gcry_rndjent_poll (add, origin, length/2); + if (n > length/2) + n = length/2; + if (length > 1) + length -= n; + } } /* Enter the loop. */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor