Extend the Alt-BN128 syscalls to add G2 Arithmetic #293
Replies: 5 comments 7 replies
-
|
concept ack cc/ @samkim-crypto for review |
Beta Was this translation helpful? Give feedback.
-
|
I wonder if it would also make sense to make syscalls for |
Beta Was this translation helpful? Give feedback.
-
|
I'm not against G2 for alt-bn-128, but how about we just build a full API for BLS12-381, including G1, G2 and pairing? Both Agave and Firedancer have https://github.com/supranational/blst as their dependencies (because of Alpenglow), so it should be an easy addition. Is there any need specifically for bn128? It feels a bit low security to me. |
Beta Was this translation helpful? Give feedback.
-
|
Yeah I am not against this if @0x0ece is in support. We would need to maintain the existing alt-bn128 syscalls for the current projects that use it, so I think it makes sense to add the g2 functionality to the existing alt-bn128 syscalls. For future curves like bls12-381, we can build on top of the more general curve-group-op syscalls. |
Beta Was this translation helpful? Give feedback.
-
|
Would love to see this get more attention, or bls12381 :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
simd: 'XXXX'
title: G2 Arithmetic Syscalls
authors:
category: Standard
type: Core
status: Draft
created: 2025-05-30
Summary
Extend the existing
sol_alt_bn128_group_opsyscall to support native G2 curve point arithmetic (addition, subtraction, and scalar multiplication) on the BN254 curve.Motivation
Solana today provides syscalls for Alt‑BN128 G1 group operations (
ALT_BN128_ADD,ALT_BN128_SUB,ALT_BN128_MUL) and for pairing checks, as well as compression/decompression for G2 points. However, there is no direct support for arithmetic on G2 points themselves, as they were not included in the Ethereum Precompile on which the syscalls were based.Adding native G2 syscalls will enable:
New Terminology
Detailed Design
New Constants
Alternatives Considered
Impact
Security Considerations
None
Beta Was this translation helpful? Give feedback.
All reactions