Hey everyone! It's been a while, and it has been a roller coaster ride indeed.
The past few weeks at EIF were the build phase, and it was all about implementing the different aspects of my project based on Wallet Security using MPC (multi-party computation) and ZKP (zero-knowledge proofs). It proposes a key recovery system using multi-party computation and zero-knowledge proofs to provide wallet security.
The past few weeks were all about implementing Lagrange Interpolation or Gaussian elimination in circom. Some of the things you need to know while working with circom is that it's restrictive, doesn't accept numbers beyond circom's range, it mods the negative values, and working with lots of constraints requires an understanding of how circuits work and of course how ZKP works. Overall, working with circom was a lot of fun and sleepless nights, but I wouldn't want it any other way.
The secret is split into shares in Shamir's Secret Sharing using polynomial interpolation. This polynomial interpolation can be accomplished using two methods: Lagrange interpolation and Gaussian elimination.
Lagrange interpolation is a method for constructing a polynomial of degree N-1 from a set of N elements. These N points correlate to N shares of the secret in Shamir's Secret Sharing. The Lagrange interpolation formula enables us to compute the value of the polynomial at any point, including zero, giving us the secret value. This is how the shares can be used to reconstruct the initial secret.
Gaussian elimination, on the other hand, is a method for resolving linear equation systems. In the setting of Shamir's Secret Sharing, we can represent each share as a linear equation and solve for the coefficients of the polynomial that corresponds to the secret using Gaussian elimination. We can reconstruct the secret using Lagrange interpolation once we have the polynomial values.
Both Lagrange interpolation and Gaussian elimination are used in Shamir's Secret Sharing to ensure that each share has an equal contribution to the reconstruction of the secret. These methods are also used to prevent any individual share from revealing any information about the secret, as each share only reveals information about a portion of the polynomial.
I got to integrate protocols like Push Protocol for notifications and Metamask Snaps for custom wallets.
The next few days were a deep dive into different cryptography algorithms, and I learned about different ways to implement MPC.
Secret Sharing is a method in which a secret value is divided into multiple shares and distributed among the parties. Only by combining their interests can the parties reconstruct the secret.
Garbled Circuits: In this method, a circuit is built with encrypted inputs and garbled gates, so that the output of each gate is determined solely by the inputs to that gate. The parties then evaluate the jumbled circuit together to acquire the final output.
Homomorphic Encryption: This method enables computation on encrypted data without the need to decrypt it. The parties encrypt their inputs before performing operations on the encrypted data jointly to acquire the final result.
Oblivious Transfer: This method enables one party to transfer a value to another party while remaining unaware of the value or the recipient. The recipient can choose from a number of values without revealing which one they selected.
Secure Function Evaluation: This method involves estimating a function on the private inputs of multiple parties while keeping those inputs hidden from each other. To acquire the final output, the parties jointly evaluate the function using their private inputs and a shared randomness.
The last few days have been about integrating the contract with the front end and setting everything up, as well as finding the right encryption method for passing my keys. Overall, this is still a work in progress, and I have many more features in mind.
Although this fellowship is coming to an end, the building never stops, and I will continue to blog about my journey. Keep building, folks! :)