please help me to understand how yubikey works with GPG.
I have a key, and i moved it to yubikey. But before that i made a backup my .gnupg
folder.
After that, i removed yubikey to use it on another PC.
On the PC i removed .gnupg
folder and restored .gnupg
folder and restored .gnupg
folder from backup.
So, i expect that i have the same keys on my PC and on yubikey.
But if i encrypt something with yubikey, like gpg -e -r 'mykey' 123.txt
I can't decrypt it on my PC with the same key.
It says:
gpg: encrypted with RSA key, ID 3435KSLDKJFLKSJF234
gpg: decryption failed: No secret key"
But i have secret key. What happens?