I'm writting DApp on Ethereum (Solidity) and I need to find a solution how to store a private data on blockchain, when I also need to proceed them somehow. If it is only about storing, I can use some normal encrypting, but the problem is that I need to read the data IN the smart contract and proceed it somehow too.
Let's say:
1) I want to send some private number to a blockchain.
2) I need to check if the privete number is bigger than the last stored private number and smaller than the second last stored number.
if (storage[n] < y < storage[n-1]) storage.push(y);
3) If yes, I want to store it privately.
Any ideas? Thank you.