Skip to content

Feat : MSM black box implementation#310

Draft
ocdbytes wants to merge 6 commits intomainfrom
aj/black-box/msm
Draft

Feat : MSM black box implementation#310
ocdbytes wants to merge 6 commits intomainfrom
aj/black-box/msm

Conversation

@ocdbytes
Copy link
Collaborator

@ocdbytes ocdbytes commented Feb 26, 2026

Implementation of MSM black box function for noir.

  • Add Elliptical Curve operations for field <= Bn254.
  • Add multi limb EC operations for field > Bn254 (needed for ecdsa256r1 black box).
  • Added field agnostic, multi limb implementation.
  • Table and lookup construction.
  • windowed MSM final.
  • Gnark based optmisations with multi-limb arithmetic.
  • NOIR circuit tests.
  • Experiment with lazy overflow handling as used in gnark.

For MSM blackbox on grumpkin curve

Native noir implementation :

│ │ │  151 μs INFO ACIR: 43632 witnesses, 40844 opcodes.
│ │ │  193 ms INFO R1CS 38796 constraints, 38796 witnesses, A 36238 entries, B 36750 entries, C 91882 entries
│ │ │  289 ms INFO Witness split: w1 size = 38796, w2 size = 0

Black Box implementation :

│ │ │  101 μs INFO ACIR: 6 witnesses, 2 opcodes.
│ │ │ 33.4 ms INFO R1CS 14898 constraints, 16638 witnesses, A 24503 entries, B 14991 entries, C 16603 entries
│ │ │  112 ms INFO Witness split: w1 size = 2928, w2 size = 13710

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant