GPG random data gathering

Werner Koch wk at gnupg.org
Wed Apr 7 14:36:11 CEST 2004


On Wed, 07 Apr 2004 23:22:09 +1200, Peter Gutmann said:

> close look at it and was unable to get VirtualLock()'ed memory paged out no
> matter what he did.  He also checked with someone who had worked on
> VirtualLock who said that it did indeed prevent the memory from being paged.

That is interesting.  Given that this is a standard Win32 API
function, it is an easy way to add this to gpg.  There is 30 pages
limit per process which is far more than gpg requires.

> page.  My code goes to some lengths to ensure that it never VirtualUnlock()'s
> anything on the same page, although if your keys happen to share a page with
> data that something else VirtualUnlock()'s then that guarantee is gone.  To in

For gpg it is easier because we set a block of memory aside right at
startup and thus we don't need to unlock anything. 

> You can also get nonpageable memory using AWE (Address Windowing Extensions),
> but the interface to that is clunky to say the least.

That's what I had in mind when mentioning a possible new API.


Thanks,

  Werner




More information about the Gnupg-devel mailing list