[pkg-gnupg-maint] Bug#850708: gpg: decryption failed: No secret key

Vincent Lefevre vincent at vinc17.net
Mon Jan 9 15:13:23 UTC 2017


On 2017-01-09 16:02:20 +0100, Vincent Lefevre wrote:
> Since the latest upgrade:
> 
> * When I open a .gpg file with Emacs:
> 
> Error while decrypting with "gpg2":
> 
> gpg: AES encrypted data
> gpg: cancelled by user
> gpg: encrypted with 1 passphrase
> gpg: decryption failed: No secret key
> 
> * With "gpg -d note.gpg", same errors:
> 
> gpg: AES encrypted data
> gpg: cancelled by user
> gpg: encrypted with 1 passphrase
> gpg: decryption failed: No secret key
> 
> The errors are immediate and 100% reproducible.

Well, in some uncommon occasions, a pinentry window appears.

Here are debug messages (when the problem occurs):

$ gpg --debug-level guru -d note.gpg
gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat trust hashing ipc clock lookup extprog
gpg: DBG: [not enabled in the source] start
gpg: DBG: fd_cache_open (note.gpg) not cached
gpg: DBG: iobuf-1.0: open 'note.gpg' desc=file_filter(fd) fd=3
gpg: DBG: iobuf-1.0: underflow: buffer size: 8192; still buffered: 0 => space for 8192 bytes
gpg: DBG: iobuf-1.0: underflow: A->FILTER (8192 bytes)
gpg: DBG: iobuf-1.0: A->FILTER() returned rc=0 (ok), read 1822 bytes
gpg: DBG: parse_packet(iob=1): type=3 length=13 (parse.../../g10/mainproc.c.1344)
gpg: AES encrypted data
gpg: DBG: chan_4 <- OK Pleased to meet you, process 12055
gpg: DBG: connection to agent established
gpg: DBG: chan_4 -> RESET
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION ttyname=/dev/pts/5
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION ttytype=xterm-debian
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION display=:0
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION xauthority=/home/vlefevre/.Xauthority
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION putenv=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION lc-ctype=en_US.UTF-8
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION lc-messages=C
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> GETINFO version
gpg: DBG: chan_4 <- D 2.1.17
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION allow-pinentry-notify
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> OPTION agent-awareness=2.1.0
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> GETINFO cmd_has_option GET_PASSPHRASE repeat
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> GET_PASSPHRASE --data --repeat=0 -- SD6AFFD52F250E76A X X Enter+passphrase%0A
gpg: DBG: chan_4 <- INQUIRE PINENTRY_LAUNCHED 12057 gtk2 1.0.0
gpg: DBG: chan_4 -> END
gpg: DBG: chan_4 <- ERR 83886179 Operation cancelled <Pinentry>
gpg: cancelled by user
gpg: DBG: free_packet() type=3
gpg: DBG: iobuf-1.1: push 'block_filter'
gpg: DBG: iobuf chain: 1.1 'block_filter' filter_eof=0 start=0 len=0
gpg: DBG: iobuf chain: 1.0 'file_filter(fd)' filter_eof=0 start=17 len=1822
gpg: DBG: init block_filter 0x000055c09c2f67c0
gpg: DBG: parse_packet(iob=1): type=18 length=0 (new_ctb) (parse.../../g10/mainproc.c.1344)
gpg: DBG: iobuf-1.1: underflow: buffer size: 8192; still buffered: 0 => space for 8192 bytes
gpg: DBG: iobuf-1.1: underflow: A->FILTER (8192 bytes)
gpg: DBG: iobuf-1.1: A->FILTER() returned rc=0 (ok), read 1802 bytes
gpg: encrypted with 1 passphrase
gpg: decryption failed: No secret key
gpg: DBG: free_packet() type=18
gpg: DBG: iobuf-1.1: underflow: buffer size: 8192; still buffered: 0 => space for 8192 bytes
gpg: DBG: iobuf-1.1: underflow: A->FILTER (8192 bytes)
gpg: DBG: iobuf-1.1: A->FILTER() returned rc=-1 (EOF), read 0 bytes
gpg: DBG: free block_filter 0x000055c09c2f67c0
gpg: DBG: iobuf-1.1: pop in underflow (nothing buffered, got EOF)
gpg: DBG: iobuf chain: 1.0 'file_filter(fd)' filter_eof=0 start=1822 len=1822
gpg: DBG: iobuf-1.0: underflow: buffer size: 8192; still buffered: 0 => space for 8192 bytes
gpg: DBG: iobuf-1.0: underflow: A->FILTER (8192 bytes)
gpg: DBG: iobuf-1.0: A->FILTER() returned rc=-1 (EOF), read 0 bytes
gpg: DBG: note.gpg: close fd/handle 3
gpg: DBG: fd_cache_close (note.gpg) new slot created
gpg: DBG: iobuf-1.0: underflow: buffer size: 8192; still buffered: 0 => space for 8192 bytes
gpg: DBG: iobuf-1.0: underflow: eof (pending eof)
gpg: DBG: iobuf-1.0: close '?'
gpg: DBG: [not enabled in the source] stop
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: secmem usage: 0/65536 bytes in 0 blocks
zsh: exit 2     gpg --debug-level guru -d note.gpg

Perhaps a pinentry-gtk2 bug?

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the pkg-gnupg-maint mailing list