-
Notifications
You must be signed in to change notification settings - Fork 36
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
Optimizations in bn254 ECMUL #207
Optimizations in bn254 ECMUL #207
Conversation
…doing multiplication Signed-off-by: garyschulte <garyschulte@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
waiting on fuzz testing results before merging |
@@ -128,6 +127,11 @@ func eip196altbn128G1Mul(javaInputBuf, javaOutputBuf, javaErrorBuf *C.char, cInp | |||
// Convert input C pointers to Go slice | |||
input := (*[EIP196PreallocateForG1 + EIP196PreallocateForScalar]byte)(unsafe.Pointer(javaInputBuf))[:inputLen:inputLen] | |||
|
|||
// inifinity check: | |||
if isAllZeroEIP196(input, 0, 64) { | |||
return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add *outputLen = EIP196PreallocateForG1
gnark/gnark-jni/gnark-eip-196.go
Outdated
@@ -128,6 +127,11 @@ func eip196altbn128G1Mul(javaInputBuf, javaOutputBuf, javaErrorBuf *C.char, cInp | |||
// Convert input C pointers to Go slice | |||
input := (*[EIP196PreallocateForG1 + EIP196PreallocateForScalar]byte)(unsafe.Pointer(javaInputBuf))[:inputLen:inputLen] | |||
|
|||
// inifinity check: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
Signed-off-by: garyschulte <garyschulte@gmail.com>
Optimizations for ecmul in gnark-crypto eip196 imple for ECMUL: