I am trying to use openpgp with the secret key stored inside a luna hsm.
Reading the hsm provider docs, it is possible to use this hsm to store the private pgp keys.
But all their examples use Symantec Encryption Desktop.
So far I have looked at the bouncycastle examples on GitHub and I've been able to modify the existing KeyBasedFileProcessor example so that I can encrypt and sign a file using GPG Suite, and then decrypt and verify the file using bouncycastle by reading
the public and private keys from files (exported from GPG Suite).
I saw in the api docs that there is a jcajce package containing JcaPGPSecretKeyRingCollection.
But I can't figure out out how to create an instance of that which will read from the hsm.