-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to get G1::zero() and G1::one()? #30
Comments
the class EcT only has two parameters constructor, so now I wrote the code like:
Hope you can check if it is right. |
Could you use (1, 2) is not on G1, so G1(1, 2) throws an exception.
You can change "abc" to any message. |
I use bn-zksnark curve, in libsnark, it uses point (1,2) as one. Another question, now I use the following code to implement G1::rand():
Am I right? And, the last question: Could you please implment function multiexp? |
Yes.
Does it return prod_i g[i]^f[i]? How about implementing it yourself? |
It is not two multi scalar (aP + bQ), but multi scalar for many base points? |
the basic implement about multiexp(vector const& g, vector const& f) is like:
But the above implementation is not optimized, I heard there are exist some optimize algorithms (I do not understand that) which can do it much faster. For example: |
Okay, I'll see it later. |
I think it's a stupid question...
How can I get the zero and one element in G?
Should I use G1 zero(Fp(0), Fp(0))?
And, as my understanding, the one is the generator of the G, but how to get it?
The text was updated successfully, but these errors were encountered: