i’m working on a project, where we want verify some data programatically. The idea is to encrypt the data with a private key and decrypt it in our software, where the public key is provided (e.g. hard-coded). So i followed the process of generating a rsa-key pair and stored the private keys on a Nitrokey Pro Stick.
Now the question is, how the encryption can be done? What i need is a method, where i can put data in, which encrypts the data with the stored private key. Then this method would return the encrypted data. Can this be done with the libnitrokey or is this done via another library like OpenSSL or is this the wrong workflow? I looked into the nitrokey-lib, but could not find a suitable method.