Card fails to decrypt using 4096-bit key

Marcos Aurelio Lenharo lenharo at gmail.com
Wed Jun 27 04:36:59 CEST 2012


Hi,
the problem seems to be on libassuan ASSUAN_LINELENGTH define (today is
1002).

On g10/call-agent.c:998 (agent_scd_pksign)  there is the following line:
if (indatalen*2 + 50 > DIM(line))
    return gpg_error (GPG_ERR_GENERAL);

and indatalen happens to be 512 for a 4096-bit key, which leads to a
value greater then 1002 (1074 on this case).

Applying the following patch solved the problem to me:

diff -Nru libassuan-2.0.3.orig/src/assuan.h.in
libassuan-2.0.3/src/assuan.h.in
--- libassuan-2.0.3.orig/src/assuan.h.in        2011-12-20
08:17:53.000000000 -0200
+++ libassuan-2.0.3/src/assuan.h.in     2012-06-26 22:58:47.483626831 -0300
@@ -67,7 +67,7 @@
 #endif
 
 
-#define ASSUAN_LINELENGTH 1002 /* 1000 + [CR,]LF */
+#define ASSUAN_LINELENGTH 1076 /* 1074 + [CR,]LF */
 
 struct assuan_context_s;
 typedef struct assuan_context_s *assuan_context_t;

@Werner: any comments on this change?

Best Regards,

-- 
Marcos A. Lenharo




More information about the Gnupg-users mailing list