Skip to content

Instantly share code, notes, and snippets.

@nabe33
Last active July 26, 2024 23:33
Show Gist options
  • Save nabe33/ddc78741dbc873e5d11dde9f39c331fa to your computer and use it in GitHub Desktop.
Save nabe33/ddc78741dbc873e5d11dde9f39c331fa to your computer and use it in GitHub Desktop.
Circom練習:3つの数の乗算
pragma circom 2.1.6;
template Mul3numProof() {
// declaration of signals
signal input a;
signal input b;
signal input c;
signal output result;
// constraint
tmp = a * b;
result <== tmp * c;
}
component main = Mul3numProof();
/* INPUT = {
"a": 3,
"b": 5,
"c": 2
} */

Open this in zkREPL →

This file can be included into other zkREPLs with include "gist:ddc78741dbc873e5d11dde9f39c331fa";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment