project screenshot 1
project screenshot 2
project screenshot 3

eZKclaim

Leveraging zero knowledge proofs to make on-chain payments using email as identifier for origin and destination

eZKclaim

Created At

Circuit Breaker

Project Description

This project explores token transfer via on-chain email verification. Depositor specifies the claimant's email, and then locks away an amount of native token that only the owner of the specified email can unlock. ZK is used to hide the sensitive information (claimant's email) so that privacy is preserved in this transaction flow.

How it's Made

We integrate with Auth0 for email authentication, Noir to build our ZK circuit, Sindri for proof generation.

The ZK flow works as follows: Claimant authenticates with Auth0 to obtain JWT on the client-side. The payload and signature are passed as private inputs to the ZK circuit, which outputs the proof and the matched hashed email. This is then used to authenticate the claimant on our custom contract to unlock the asset. To prevent the claimant from being identified with a unique hash, salt is added in computing the hash, and the depositor is expected to send the hash to the claimant off chain in order to be used in proof generation.

Since Noir circuits take in fixed length parameters, we ran into issue trying to pass the JWT obtained from Auth0 for ZK verification. Our workaround was to set up an additional rule on Auth0 to hash the claimant's email prior to performing RSA signing, and this allowed us to ensure that the JWT payload always has the same size.

We used the Base64, JSON Parser and RSA libraries on Awesome Noir to put together our circuit. However, due to breaking changes in v0.23.0 of Noir, we had to downgrade compiler version to v0.22.0. This unfortunately caused us to the 'Message: internal error: entered unreachable code: ICE: Cannot return slices' when trying to compile the circuit hence we have yet to verify the proper functionality of the circuit.

background image mobile

Join the mailing list

Get the latest news and updates