#big #svm #exp #fixed #solana #no-std #mod

solana-nostd-big-mod-exp

A more efficient implementation of Big Mod Exp for SVM

3 releases

0.1.3 Nov 15, 2024
0.1.1 Nov 6, 2024
0.1.0 Oct 21, 2024

#8 in #exp

Download history 147/week @ 2024-10-19 15/week @ 2024-10-26 106/week @ 2024-11-02 60/week @ 2024-11-09 81/week @ 2024-11-16 10/week @ 2024-11-23 11/week @ 2024-11-30

167 downloads per month
Used in solana-secp256k1

MIT license

10KB
125 lines

Solana NoStd BigModExp

A more efficient implementation of Big Number Modular Exponentiation for SVM.

Installation

cargo add solana-nostd-big-mod-exp

Features

  • Makes use of MaybeUninit to skip zero allocations
  • Implements a fixed size big_mod_exp_fixed function to avoid heap allocations

Performance

library function CU cost
nostd-big-mod-exp big_mod_exp_fixed 2102
nostd-big-mod-exp big_mod_exp 2122
solana-program big_mod_exp 2151

Dependencies

~1.5MB
~28K SLoC