I mentioned last time that I was working on a big integer library.
After some work, I have managed get 512-bit arithmetic kinda working!!!!
Credits to /u/benjaminion for the modSmall function.
Some issues I am currently facing and would like some help for:
- The modulo function is really slow for small modulus & large dividend
- The modular multiplication function is slow
- No division yet, should follow closely to modulo
- Gas costs are really high!
I am looking into other algorithms for modulo and modular arithmetic. I am not too knowledgeable in this area so help would be much appreciated!
Also, I was wondering how to get gas costs from Testrpc. The emulated VM in Remix(online compiler) tells me the gas costs, but it's too slow.
I may also have also messed up something when I was prettying up the code for Reddit or missed a few edge cases. Any feedback is welcome!
P.S. I posted this in Reddit too