ZK Engine
Last updated
Last updated
DAuth uses ZKP to make the authentication decentralized and trustless. ZKP engine runs on the user client side, attested key information of user authentication results based on the JWT token signed by the identity providers by using algorithm.
DAuth is using third-party circuits and proven keys. The circuits are generated from the proof of the processes of OAuth and SMTP. Here is an example of a proof of Google OAuth.
function C(x, w) {
return ( sha256(w) == x )
&& ( sign( idtoken ) == s );
}
C is the circuit of a proof that x
is the hash of user's google account w
and s
is signature of the idtoken
.
DAuth also use third-party generator G and secret parameterlambda
to generate proving key and verification key.
After successfully authenticating with their social account, users will receive a JWT (JSON Web Token) from the DAuth . This will be transmitted via a secure, encrypted channel.
Once user login with Google through DAuth Network, a ZK proof will be calculated inside the secure enclave of a DAuth node.
The verification could be calculated on-chain or off-chain.
vf = V(vk, x, s, prf)
Using the zk-SNARKs in the auth contract would look something like this:
Once the ZK proof of social authentication has been verified in the contract, . Any wallet that provides social account authentication can confirm a user's contract wallet transactions by listening to this event, instead of relying on off-chain services for centralized user authentication.