-
Notifications
You must be signed in to change notification settings - Fork 485
CIP-0133: Add BLS12-381 multi scalar #7151
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
base: master
Are you sure you want to change the base?
Conversation
@@ -170,3 +171,10 @@ memSizeBytes = BlstBindings.Internal.sizePoint (Proxy @BlstBindings.Curve1) | |||
-- | Compressed size of a G1 point (48 bytes) | |||
compressedSizeBytes :: Int | |||
compressedSizeBytes = BlstBindings.Internal.compressedSizePoint (Proxy @BlstBindings.Curve1) | |||
|
|||
-- | Multi-scalar multiplication of G1 points. | |||
-- Uses MSM when the number of pairs exceeds a threshold (currently 10). |
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.
@kwxm when costing, we should run the bench against different thresholds here. This 10 is an arbitrary value I randomly picked, I remember from the initial rust benchmarking @dkaidalov did, this threshold was 30, but I am unsure. Do you remember Dmytro?
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.
not sure what threshold do you mean? From my benchmarks the blst MSM is more efficient than naive impl already from the size of 3. There is indeed a threshold at 30, when the blst lib becomes suddenly several times more efficient (if I remember correctly there is some MSM mechanism switching at 30, programmed in rust bindings)
…n output with MSM
Pre-submit checklist: