Closed LINCKODE closed 6 months ago
Hi @LINCKODE what is the use case for this function? and usually, the operation kG+lP
is performed using a better algorithm than performing kG
, lP
, and then add these points.
Thanks for the reply! This function is required for verifying Schnorr signatures over FourQ. You can see how it is being used in FourQLib's SchnorrQ_Verify function. I see that FourQLib defines another way of performing this calculation, but that requires the use of endomorphisms, which I am not familiar with. If you know of another way of doing this, I'd be happy to give it a go.
See the implementation of CombinedMult
for the P384 curve.
https://github.com/cloudflare/circl/blob/main/ecc/p384/p384opt.go#L135
This method is generic and agnostic to the use of endomorphisms.
That looks interesting, doing both multiplications in one loop. Ill have to look at this a bit closer to fully understand how it works, then I'll try to replicate it for FourQ. Thanks for the hint!
I'm gonna close this PR to keep our list short, happy to review when you push a new PR with the other algorithm.
Implemented ecc_mul_double as DoubleScalarMult in curve.go . Please advise me if the code does not adhere to project standards, I'm somewhat new to Go. 😅