PGP encrypted document not recognising correct password to decrypt

I encrypted a document with my PGP key - now it won’t recognise the correct PGP key password to decrypt.
Is this a bug?

Edit your question (= modify it; contrary to forum, on this site topics are editable) to provide minimal technical information: OS name, LO version, type of document (file extension).
How did you create your PGP key? Have you given the correct key when encrypting (e.g. private vs. public key in the pair)?
Have you upgraded your computer since you encrypted the document? If you didn’t save your previous key, a new one has been created, therefore different.

I encrypted the document using my public key on Ubuntu 22.04
I then replaced Ubuntu 22.04 with MX Linux because I was having some issues with Ubuntu.
My Private and Public keys are stored securely in the cloud (MEGA) so I imported the keys into my new installation of MX Linux.They are there in the Key manager.
The only password there is seems to be for the Private Key. Should there be a password for the public key?
Would it matter if the version of LO on MX Linux is different to that on Ubuntu?

This is the event causing reinitialisation of the keys.

Double-check you stored them where the various libraries expect them.

I am not sure this is the expected location. IMHO, they should be stored somewhere in /etc (/etc/ssl?) or in your home directory in ~/.gnupg.
I am more familiar with SSL keys though I validate some of them for document signature.

No. The crypto library has a stable API.

Thanks. I think I’ll bin the file (I can easily recreate it) because on the LO Encryption page it implies that PGP encryption is for sending a document to a recipient, not for encrypting a document in local storage.
It’s not clear when selecting that option in the “Save As” dialog box…

PGP keys are never stored under /etc/ssl and personal user keys are stored nowhere under /etc either.

Yes.

No. The feature of public/private key pairs is, that encrypting to a public key is always possible without needing or ever asking for a passphrase. Only to decrypt you need the corresponding private key, and if it is passphrase secured that passphrase as well.

It’s perfectly fine to encrypt a document for whatever storage using a public key. If for that key you happen to have the corresponding private key (and know its passphrase) you should be able to decrypt it again. But given your vague confuse description of what you actually did, I think you made a mistake somewhere or are making a mistake in thinking what should work.

Thanks for your help - I’ve come across another issue so I’ll start a new thread.