circom-ecdsa icon indicating copy to clipboard operation
circom-ecdsa copied to clipboard

Few questions for pubkeygen

Open Vap0RSh4wN opened this issue 1 year ago • 1 comments

Hi, I'm a circom beginner and I have a few questions.

  1. for pubkeygen, if I have a test private key as: 2e1e48c14716af93ca8294875f23285ca7e3bf5804087a981480bdfc4f703a93, how do I change it in input.json when n=64, k=4?

  2. When I write in input.js :"0x2e1e48c14716af93", "0xca8294875f23285c", "0xa7e3bf5804087a98", "0x1480bdfc4f703a93" I get in public.json when n=64, k=4: "10774290833407669026", "9342151812079227025", "12927457736662185437", "28562608038875422", "8791524470153019700", "14993995613883526844", "10767226978053538038", "3669898547168484177". How do I know what public key I end up with?

Thank you very much for your answer!

Vap0RSh4wN avatar Aug 14 '23 11:08 Vap0RSh4wN

Have you found out the anwser? I confuse to use this template too.

valerietram88 avatar Sep 06 '23 01:09 valerietram88

Have you found out the anwser? I confuse to use this template too.

sry for reply late, I just saw it. you can check this test: https://github.com/0xPARC/circom-ecdsa/blob/master/test/ecdsa.test.ts

they use bigint_to_tuple function, so you need to change your priv key into bigint, then as a input to bigint_to_tuple function. then you can verify your result: firstly get the pub key, then you put the pubkey.x into bigint_to_tuple function, and compare the result with the circuit-result's first 4 lines.

Vap0RSh4wN avatar May 09 '24 03:05 Vap0RSh4wN