Skip to content

impl SIMD-0529: big_int_mod_exp syscall api refactoring#710

Open
zz-sol wants to merge 10 commits into
anza-xyz:masterfrom
zz-sol:zz/big_int
Open

impl SIMD-0529: big_int_mod_exp syscall api refactoring#710
zz-sol wants to merge 10 commits into
anza-xyz:masterfrom
zz-sol:zz/big_int

Conversation

@zz-sol

@zz-sol zz-sol commented May 6, 2026

Copy link
Copy Markdown
Contributor
  • this PR refactors the API to allow for both big and little endian.
  • i also thought about the backend changes. we have the following options
library 2048-bit 4096-bit
crypto-bigint 3.34 ms 27.6 ms
num-bigint 2.15 ms 18.4 ms
rug 1.25 ms 8.49 ms
  • crypto-bigint is constant time but prob not required
  • num-bigint is currently being used
  • rug is the fastest -- but it depends on gmp and cc (wrapped by rust) so there maybe some additional system requirement.

follow up: rug requires LGPL-3.0+ license. we prob don't want to use it. so we stick with num-bigint.

@zz-sol zz-sol marked this pull request as ready for review May 7, 2026 16:45
@zz-sol zz-sol requested a review from samkim-crypto May 11, 2026 22:15

@samkim-crypto samkim-crypto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah in this case, let's stick with num-bigint. The changes looks good to me overall. Let's wait on merging this until solana-foundation/solana-improvement-documents#529 is merged. I do have some comments regarding the syscall function signature, but I commented on the SIMD side.

@zz-sol zz-sol changed the title big_int_mod_exp syscall api refactoring impl SIMD-0529: big_int_mod_exp syscall api refactoring May 27, 2026
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.

2 participants