Im wrting a dapp which holds / manages sensitive data which might need to be encrypted and decrypted and push again into chain.
I know it is not safe to encrypt data in smart contract,which is why Im thinking of off-chain encryption mechanism . I thought to encrypt data using public key and then decrypt using private key . However I found that popular wallet s/w like metamask doesnt allow this.
1.What are the possible ways to acheive this or any other better ways? (I thought managing users eth keys is not so safe)
2.If using custom keys for encryption, Is it ok using a keymanagement tool like Google KMS or Amazon Kms to manage keys and encrypt data?