Im working on a project where i want to store encrypted data on-chain and later reveal that data. For this process im thinking of using a trusted off-chain worker to act as a "key-manager". This ocw should be able to generate RSA keypairs, store his public key on-chain and keep the private key in his local storage. A user would use the advertised public key to encrypt his message and store it on-chain. After "n" blocks the offchain worker would reveal that message to everyone.
Im having trouble in finding a substrate compatible crate to handle RSA keypair generation,encryption and decryption. I tried to use pure rust crates such as rsa(https://crates.io/crates/rsa) and ring (https://crates.io/crates/ring) but as soon as i tried to import anything from these crates, substrate panicks.
I saw that the sc_network pallet is capable of generating rsa keypairs. Is it also capable of encrypting/decrypting? Can i use it outside of runtime safely?