You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Idea: Potentially allowing to "export" and "import" proofs and their coressponding verification key to allow verification and proofing of code outside of the Mina blockchain, inside of web2.0.
Reason: It would open up SnarkyJS to more developers, allowing many web 2.0 devs and other developers to utilize the power of zero knowledge proofs to some extend in normal web applications.
Possible usage: What it could look like
// example from ex00_preimage.tsclassMainextendsCircuit{
@circuitMainstaticmain(preimage: Field, @public_hash: Field){Poseidon.hash([preimage]).assertEquals(hash);}}// ... letproof=Main.prove(/* .. */);// returns the proofletencodedProof=proof.toBase58())// potentially encoded in base58 for easy use eg 'RJcTKtswS9xgY4FDfxCq4ZaLRfQwGME8GYPFGpxieWZXJMGUuqN1zdKYEM6dLZER' letverificationKey=Main.getVerificationKey();// returns the verification key; potentially also encoded for easy use// usage in a different applicationclassMyVerifierextendsVerifier{constructor(key: VerificationKey){// ...}}letverificationKey='someVerificationKeyEncoded';letmyVerifier=newVerifier(VerificationKey.fromString(verificationKey))letproof='someProofEncoded';letisValid=myVerifier.verify(Proof.fromString(proof));// returns true if proof matches verification key
Is something like that feasible and makes sense?
Or is something like that potentially even planned already?
Thanks!
The text was updated successfully, but these errors were encountered:
@Trivo25 is it implemented? It would be nice to have both compiled circuits and keys to be exportable for off-chain applications
Yes, proofs can be serialized as well as verification keys (of smart contract as well as the ZkProgram API). The prover key can't be currently serialized but there's a separate issue for that #87
Thins idea was also mentioned in Discord.
Idea: Potentially allowing to "export" and "import" proofs and their coressponding verification key to allow verification and proofing of code outside of the Mina blockchain, inside of web2.0.
Reason: It would open up SnarkyJS to more developers, allowing many web 2.0 devs and other developers to utilize the power of zero knowledge proofs to some extend in normal web applications.
Possible usage: What it could look like
Is something like that feasible and makes sense?
Or is something like that potentially even planned already?
Thanks!
The text was updated successfully, but these errors were encountered: