implement gpg interaction