Ethereum: Possibilities of homomorphic encryption
4 stars based on
A few months ago, the narrative in the cryptocurrency world changed from bitcoin to blockchain. Suddenly, bitcoin is old news and private blockchains are here to change the world.
Apparently, blockchain is turning the financial world upside down. OK, let's be serious - private blockchains are in the exploration phase.
Financial institutions, insurance firms and many others are finding out how they can use the technology, or at least some of its concepts.
One way to look at them is as a specialized database for specific use-cases. Projects like HyperLedger and Corda build infrastructures that will power some use-cases. Blockchain homomorphic encryption today I'd like to discuss something a bit different. For quite some time, I've been interested in privacy on the blockchain. How can we add some privacy properties to public transactions while still gaining benefit blockchain homomorphic encryption the underlying blockchain such as finality, limited auditing, etc?
There are a few interesting ideas, some of them are explored in Vitalik's blog post about Privacy on the Blockchain. One approach which I wanted to explore is homomorphic encryption. Homomorphic encryption is a form of encryption that allows computations to be carried out on ciphertext, thus generating an encrypted blockchain homomorphic encryption which, when decrypted, matches the result of blockchain homomorphic encryption performed on the plaintext.
The "holy grail" of homomorphic encryption is Fully Homomorphic Encryptionwith which you can get results of arbitrary computations on encrypted data, not just their sum or product. One cryptosystem which provides you with additive homomorphic encryption is the Paillier Cryptosystem. Additive here means that you can get the sum of two encrypted numbers. The Paillier Cryptosystem is an asymmetric encryption scheme, meaning that you encrypt with your public key and decrypt with your private key.
Leaving the key generation process aside, the parameters we need to use the cryptosystem are: What we're interested in now is the blockchain homomorphic encryption addition property: So what does that property give us? Let's look at a specific use case. Let's assume we have an Ethereum smart contract that manages the expenses of employees:. This would be a contract with my pre-generated parameters and an blockchain homomorphic encryption encrypted total expenses amount of The encryption and decryption would be client side, using a python paillier library.
That means that the company first encrypts the initial balance, and whenever the employees want to report the expense, they use the homomorphicAdd function.
This function uses the homomorphic addition property to store the result of the sum blockchain homomorphic encryption the previous balance and the new expense. In this manner, the contract has only one storage variable for the balance while employees can report an unlimited number of expenses. To summarize, this shows a method with which we can preserve privacy while still have some auditing properties. In this example, people can know that they can trust that the final encrypted balance represents the sum of all of the expenses reliably.
What kind of businesses would use methods like this? This is the blockchain homomorphic encryption that companies can be creative and find out new ways to architect their systems to work in a more transparent and efficient world. All in all, Blockchain homomorphic encryption feel there is a great potential in using this blockchain homomorphic encryption of methods and I would love to discuss ideas. Feel free to drop me an e-mail!
Menu Close Home Subscribe. So, what can we do? Let's assume we have an Ethereum smart contract that manages the expenses of employees: Every day, employees submit their expenses to the contract. They don't wan the other employees to know their expenses, blockchain homomorphic encryption they encrypt it and send it to the contract.
The contract adds the encrypted expense to the current total expenses amount. At the end of every month, the company wants to know the total expenses amount, but doesn't want anyone else to know it. They take the encrypted total expenses amount from the contract and decrypt it locally.
This would be a contract with my pre-generated parameters and an initial encrypted total expenses amount of 3: Conclusion To summarize, this shows a method with which we can preserve privacy while still have some auditing properties.