I am using Solidity to write an Ethereum smart contract.
I have a specific use case that requires a piece of data to be encrypted on the chain, despite the fact that both the plaintext and the ciphertext will be visible to everyone.
So far all the answers I have read have simply pointed out, correctly, that encryption on the chain is not a good idea. As mentioned, this is a very specific use case.
Are there any libaries or functions that could make this work?