Post
Topic
Board Development & Technical Discussion
Merits 2 from 2 users
Topic OP
How are you guys representing 256-bit ints in C/C++?
by
NotATether
on 17/11/2022, 21:49:39 UTC
⭐ Merited by ETFbitcoin (1) ,JayJuanGee (1)
long's 64-bit limitation on 64-bit platforms is proving to be a difficult obstacle. There aren't even hardware-accelerated types for it (the highest I've seen is for 128 bits).

Sure, there is libsecp256k1, but it looks very rudimentary - the private keys are hard-to-modify byte arrays, and modinverse is not possible.

I made https://github.com/ZenulAbidin/xFD but it grinds to a halt on 256-bit digits. It stores all the base-10 digits in an array.

I haven't found many other fixed-point or 256-bit classes. So what are you guys using?

It's a shame that all this works flawlessly in Python, but the runtime makes everything prohibitively slow.