gpg and secret function