My goal is to store private key in USB Dongle and then sign csr using this private key.
I can follow 2 ways: Firstly, i can generate key pair and store them in mac's keychain. Then I will export the private key to Dongle. Meanwhile, I can also generate csr using keypair generated in Mac's keychain. So, I don't need to retrieve private key as SecKey? from dongle.
Another way is to generate key pair in Dongle and while signing csr using private key, we need to retrieve private key from Dongle as SecKey? format. which seem's critical.
Which way I should go forward. If i can go using first approach, can you suggest any way to export private key to Safenet Dongle?
Note: I am using Swift to implement this functionality