From ab5b6c0b1369e2ed5e9ac26eb17d6dbf4ca3e0c6 Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Wed, 24 Aug 2016 17:25:57 +0200 Subject: [PATCH] display number of recipients with -D -d, see: http://www.daemon.de/blog/2017/08/24/436/how-backdoor-store-and-forward-public-key-crypto/ for details --- libpcp/crypto.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libpcp/crypto.c b/libpcp/crypto.c index d28aa69..65a43ea 100644 --- a/libpcp/crypto.c +++ b/libpcp/crypto.c @@ -22,7 +22,7 @@ #include "crypto.h" - +extern int debug; /* asym encr */ @@ -200,6 +200,10 @@ size_t pcp_decrypt_stream(PCPCTX *ptx, Pcpstream *in, Pcpstream* out, pcp_key_t } lenrec = be32toh(lenrec); + if (debug) { + fprintf(stderr, "DEBUG: input is encrypted for %ld recipients\n", (long int)lenrec); + } + if(verify) { reccipher = ucmalloc(lenrec * PCP_ASYM_RECIPIENT_SIZE); }