Home GnuPG

primes: Avoid leaking bits of the prime test to pageable memory.

Description

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 <wk@gnupg.org>

Details

Provenance
wernerAuthored on Oct 26 2018, 12:57 PM
Parents
rC99a5babfd1e7: build: Add release make target
Branches
Unknown
Tags
Unknown
Tasks
T3848: Use of secure memory when generating secret primes in libgcrypt