primes: Avoid leaking bits of the prime test to pageable memory.
* cipher/primegen.c (gen_prime): Allocate MODS in secure memory.
This increases the pressure on the secure memory by about 1400 byte
but given that we can meanwhile increase the size of the secmem area,
this is acceptable.
(cherry picked from commit 2e2e68ad4874a4678cfbe452b70ae987e0402eca)
- GnuPG-bug-id: T3848
- Signed-off-by: Werner Koch <firstname.lastname@example.org>