I want to encrypt 2 numbers using a public key and have the reader know the correlation between those 2 numbers. I can also share the public key. Example:
22 => 785F3EC7EB32F30B90CD0FCF3657D388B5FF4297F2F9716FF66E9B69C05DDD09
95 => AD48FF99415B2F007DC35B7EB553FD1EB35EBFA2F2F308ACD9488EEB86F71FA8
AD48FF99415B2F007DC35B7EB553FD1EB35EBFA2F2F308ACD9488EEB86F71FA8 - 785F3EC7EB32F30B90CD0FCF3657D388B5FF4297F2F9716FF66E9B69C05DDD09 = 73
Is there any hashing or encryption algorithm that give me the chance to do something like that?
Would be ok also a one way hash.
Edit: I'll try to be clear here You have a table (list) of those hashes and you have to be able to calculate the difference without knowing the actual numbers. Also you have to be able to hash your number. It's made so that you never reveal your number but you can understand how big is your number compared to one on the list. So maybe a hashing function would be better than encrypt using keys.