Feat: Bandersnatch 4D-GLV (GLV + fake GLV) #1499
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Using a twofold half-GCD, one in ℤ and one in$ℤ[\sqrt{-2}]$ , it is possible to turn a $n$ -bit scalar multiplication $[s]P$ on Bandersnatch curve into a $(n/4+9)$ -bit MSM of size 4. However the total number of constraints is worse than simple GLV or fake GLV ($n/2$ -bit MSM of size 2). This is due to 2 reasons:
Lookup2
while a 4-MSM needs 16-to-1Mux
. In native arithmetic point arithmetic (dbl/add) has a similar cost toLookup2
whileMux
is way costlier. We can uselogderiv
lookup argument (at the expense of increasing verifier cost) but it's still costlier.N.B. This PR is to show the inefficiency of "GLV + fake GLV" in native circuits (e.g. Bandersnatch) compared to the (systematic) "fake GLV" which works for any curve.
When the circuit is non-native (e.g. bn254 in bn254) the "GLV + fake GLV" method is better because then the cost of the
Mux
is small compared to the (non-native) point arithmetic.This PR needs Consensys/gnark-crypto#688.
Type of change
How has this been tested?
Tests in
std/algebra/native/twistededwards/curve_test.go
.How has this been benchmarked?
Mux
)logderiv
)Checklist:
golangci-lint
does not output errors locally