Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(solved) gpg suddenly very slow
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mf2
n00b
n00b


Joined: 14 Jun 2007
Posts: 48

PostPosted: Fri Oct 18, 2024 5:56 am    Post subject: (solved) gpg suddenly very slow Reply with quote

I have been using pass together with gpg for years and everything was fine. However, since yesterday, for some reason gpg takes 12 seconds to decrypt a small password file - it used to be less than 1 second, and it is indeed very fast on my other machine.
When I kill gpg-agent it sometimes decrypts immediately, so it might have to do something with that. Running gpg under strace confirms, in fact, that it waits for gpg-agent.
I tried to change the pinentry program, but that did nothing. What else can I do to debug this?


Last edited by mf2 on Fri Oct 18, 2024 8:04 am; edited 1 time in total
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1960
Location: 127.0.0.1

PostPosted: Fri Oct 18, 2024 6:07 am    Post subject: Reply with quote

Hi,

What is your desktop ? See this link for potential explanations.
Back to top
View user's profile Send private message
mf2
n00b
n00b


Joined: 14 Jun 2007
Posts: 48

PostPosted: Fri Oct 18, 2024 6:49 am    Post subject: Reply with quote

I am using dwm, so no desktop. That link you posted I have found earlier before, but sadly that did not help me. I even recompiled my system with USE=-keyring, but no changes.
Back to top
View user's profile Send private message
mf2
n00b
n00b


Joined: 14 Jun 2007
Posts: 48

PostPosted: Fri Oct 18, 2024 8:04 am    Post subject: Reply with quote

I fixed it by disabling the "smartcard" useflag on app-crypt/gnupg.

To find this out, I set the following in ~/.gnupg/gpg-agent.conf:

Code:

log-file /home/philipp/.gnupg/agent.log
debug-level guru


That showed me that for some reason gpg-agent was waiting on the smartcard daemon:

Code:

2024-10-18 09:58:08 gpg-agent[384615] DBG: chan_10 <- SCD SERIALNO
2024-10-18 09:58:08 gpg-agent[384615] new connection to /usr/libexec/scdaemon daemon established (reusing)
2024-10-18 09:58:08 gpg-agent[384615] DBG: chan_11 -> SERIALNO
2024-10-18 09:58:40 gpg-agent[384615] DBG: chan_11 <- ERR 100696144 No such device <SCD>
2024-10-18 09:58:40 gpg-agent[384615] DBG: chan_10 -> ERR 100696144 No such device <SCD>


So I figured removing scddaemon could help, and indeed it did.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20521

PostPosted: Sat Oct 19, 2024 2:12 am    Post subject: Reply with quote

For some reason the smartcard USE flag was enabled on some package recently. I don't know why, but perhaps that was the package.

I added -smartcard to make.conf because it's 2024 and I've never seen one, never mind used one. That it suddenly needed to be a default seems strange (presuming that this package didn't have it enabled previously).
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 407

PostPosted: Sat Oct 19, 2024 2:50 am    Post subject: Reply with quote

pjp wrote:
For some reason the smartcard USE flag was enabled on some package recently. I don't know why, but perhaps that was the package.


+smartcard on gnupg has been there for years.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20521

PostPosted: Sat Oct 19, 2024 3:03 am    Post subject: Reply with quote

Interesting.

I removed -smartcard and checked updates with --newuse:
Code:
[ebuild   R    ] net-libs/libpsl-0.21.5::gentoo  USE="icu idn -static-libs% -test" ABI_X86="-32 (64) (-x32)" 0 KiB
[ebuild   R    ] app-crypt/gnupg-2.4.5-r2::gentoo  USE="bzip2 -doc -ldap nls readline (-selinux) smartcard* ssl -test tofu -tools -tpm usb -user-socket -verify-sig -wks-server" 0 KiB

Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB
So for me at least, it does appear to have been that package. A profile change? Since I disabled it globally, I have no way of knowing for certain, but I would expect at least whatever package wanted it the other day to be there.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum