Suppose I have a script that contains my PGP private key in plain text and requires me to manually type in the key passphrase to decrypt some data. Later, I decide that my passphrase is compromised and use gpg to change the passphrase. Would someone that has my old PGP private key and captured somehow my old passphrase be still able to decrypt data?
In other words I am thinking if regularly changing the passphrase would do any good in terms of securing the data or not. As far as I understand, changing the PGP private key passphrase only affects the private key, and public key is unaffected. This leads me to thinking that if someone is in possession of my old PGP private key and old passphrase, he may still be able to decrypt messages, even after I change my passphrase.
I hope that makes sense :) Thanks