-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Problem
There might be several issues in jacobian_scalar_mul().
Details
current scalar is a uint
Jacobian jacobian_scalar_mul(
Jacobian point,
uint scalar
) {
///...
}The scalar used here is constrained by the default GPU word size, which is 32-bit. Note that this function is suitable for MSM use cases because the scalar fragments involved in MSM are relatively small. However, for larger scalars, this may produce incorrect results. Thus, for now we expect ppl to NOT send a large scalar (BigInt as input) in scalar_mul.
probably we should add a BigInt scalar as the input if there's necessary.
conditional lock in jacobian_scalar_mul
// Handle special cases first
if (scalar == 0 || is_bigint_zero(point.z)) {
return get_bn254_zero_mont();
}
if (scalar == 1) {
return point;
}Potential acceleration can be achieved by moving the condition checks directly into the MSM logic.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels