tornado-nova/circuits/keypair.circom

11 lines
323 B
Plaintext
Raw Normal View History

2021-06-06 19:31:32 +02:00
include "../node_modules/circomlib/circuits/poseidon.circom";
2020-04-08 11:41:12 +02:00
// Since we don't use signatures, the keypair can be based on a simple hash
2020-04-08 11:41:12 +02:00
template Keypair() {
signal input privateKey;
signal output publicKey;
2021-06-06 19:31:32 +02:00
component hasher = Poseidon(1);
hasher.inputs[0] <== privateKey;
publicKey <== hasher.out;
}