I’m working on a project where all data is stored encrypted on a blockchain. There are some off-chain compute nodes that have the key to decrypt the data and perform some computation and return results. I’d like to design a scheme where one can verify that computation is correct using smart contract. So, I’m thinking to have a smart contract that implements the verification function. Verification function would have two arguments: a key for decryption and the expected result. The function is constant, so private key should not be written to blockchain, hence remain hidden from all. The function returns true or false and signs this result. This function can be called only by the entity that knows the key. In order to implement the above, I need a function for decryption and for signing in Solidity, but I was not able to find any.
Any advice if decryption, signing function exist in Solidity? Any libraries? Any advice on alternative designs for my problem