paolostivanin / OTPClient

Highly secure and easy to use OTP client written in C/GTK3 that supports both TOTP and HOTP
GNU General Public License v3.0
458 stars 47 forks source link

common: ask gcrypt to use the system RNG as source of entropy #339

Closed crrodriguez closed 5 months ago

crrodriguez commented 5 months ago

By default gcrypt uses an userspace RNG, that simply cannot have all the information it needs to be correct on suspend/resume and other special cases, the kernel does not expose this information to userspace. Switch to GCRY_RNG_TYPE_SYSTEM, that simple wraps getrandom() on linux.

call to gcry_control must be issued before gcry_check_version.

paolostivanin commented 5 months ago

thanks!