Post
Topic
Board Development & Technical Discussion
Re: C# or C/C++ code to convert Bitcoin brainwallet to public address
by
PawGo
on 14/06/2023, 11:24:27 UTC
I'm just curious why I can't define a 256-bit or x-bit data type in C.
You can do that in any language by constructing something (ie. struct in c#) in that language that consists of multiple instances of primitive types that store the bits.
(...)
Ignoring the fixed length and the specialization of the implementation, the above code is essentially what the Biginteger class in dotnet (C#) does.

It is a bit complicated (https://stackoverflow.com/a/54815033) bit you may also use 128 bit type. Of course in terms of performance many depends on the CPU architecture and not always using 64 bit type could be faster than using 32 bit type - could be opposite if machine is 32bit.

And of course BigInteger could be the solution, in c# or java.