summarylogtreecommitdiffstats
path: root/gnupg-large-rsa.patch
blob: cd0a2f8c40f9280306208fe6445a646dfe4482a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
* Increase Secure Memory Size
* Increase Key Size for RSA

diff -aur a/configure b/configure
--- a/configure	2020-09-03 17:16:56.000000000 +0200
+++ b/configure	2020-11-04 00:05:58.165589557 +0100
@@ -5566,7 +5566,7 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $large_secmem" >&5
 $as_echo "$large_secmem" >&6; }
 if test "$large_secmem" = yes ; then
-   SECMEM_BUFFER_SIZE=65536
+   SECMEM_BUFFER_SIZE=100663296
 else
    SECMEM_BUFFER_SIZE=32768
 fi

diff -aur a/g10/keygen.c b/g10/keygen.c
--- a/g10/keygen.c	2020-08-25 13:05:44.000000000 +0200
+++ b/g10/keygen.c	2020-11-04 00:05:58.165589557 +0100
@@ -1643,7 +1643,7 @@
   int err;
   char *keyparms;
   char nbitsstr[35];
-  const unsigned maxsize = (opt.flags.large_rsa ? 8192 : 4096);
+  const unsigned maxsize = (opt.flags.large_rsa ? 16384 : 4096);
 
   log_assert (is_RSA(algo));
 
@@ -2260,6 +2260,12 @@
       def=255;
       break;
 
+    case PUBKEY_ALGO_RSA:
+      *min = opt.compliance == CO_DE_VS ? 2048 : 1024;
+      *max = (opt.flags.large_rsa ? 16384 : 4096);
+      def = 2048;
+      break;
+
     default:
       *min = opt.compliance == CO_DE_VS ? 2048: 1024;
       *max = 4096;