Help understanding usage of G1_multiscalar_mul_gadget

31 views
Skip to first unread message

lovesh harchandani

unread,
Dec 20, 2018, 6:21:10 AM12/20/18
to libsnark
Hello,

I am trying to use libsnark for proving opening of pedersen commitment. For that i need point addition and scalar multiplication gadgets. I found the gadget G1_multiscalar_mul_gadget but confused by its API and implementation (I am not a cryptographer but understand the basic math of elliptic curves). From what i understand this gadget is used for a equation of this form 
s1*P1 + s2*P2 + s3*P3 + ..  (1)
where si is scalar and Pi is a point on the curve. 
But the API of the gadget takes the base (generator??) argument which i don't understand the need for? Secondly the number of scalars (as argument scalars) it takes is not equal to the number of points (points) but instead is far greater than the number of points, its a product of the number of bits of the field multiplied by the number of points .
(num_points * elt_size == scalar_size) (2)

How do i use this gadget to do multi-scalar multiplication if i have say 2 FieldT elements as scalars and 4 FieldT elements as 2 points?
Secondly what is the algorithm of the multiplication in the gadget?

Thanks  
 
Reply all
Reply to author
Forward
0 new messages