using alternate sources of entropy

Charles Swiger cswiger at
Tue May 7 20:00:00 CEST 2013


On May 7, 2013, at 9:19 AM, Abel Luck <abel at> wrote:
> For various reasons we're exploring alternatives to /dev/random on
> Android. Primarily because it doesn't fill fast enough, and we do not
> have root access so we cannot write to it.
> We've one good source of entropy, the accelerometer, that we would like
> gpg-agent to use. Looking through the docs it appears gnupg supports EGD.
> EGD would work well, but it is written in perl, which would be a royal
> PITA to get working on Android.
> The options I've come up with are:
> 1) Write an EGD in C or Java
> 2) Hack gnupg source and add our own thing
> Neither are particularly attractive. Is there another way to supply
> gnupg with entropy?

There's an EGD-compatible, non-blocking C implementation here:

However, I suspect that you'd obtain better results if you looked into replacing the Android aka Linux-derived /dev/random implementation which blocks with a Yarrow-based /dev/random which will not block.


More information about the Gnupg-devel mailing list