How Do I Find Out The Difference in Age Between Bob and Alice, Without Revealing Their Ages?

I have a function on a blockchain which determines the difference between the ages of two users. Let’s say they are Bob and Alice. We now need to create a function which will allow us to read encrypted values, and find the difference between the values, and return an encrypted answer.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store