Hi,
I'm trying to implement the Solovoy-Strassen primality test for arbritrary large integers. I will also be writing a bignum (cannot use 3rd party implementation as this is an academic project). I have decided on the following structure for the bignum:
struct {
uint64_t *tab;
int size; // number of limbs
int sign;
}
I will be using base-32 for my digits (hence uint64_t, for partial products, at least I assume they will be partial products). This decision was based on a previous question asked.
I'm at a standstill. I cannot conceive how one can take a string represented as an arbitrary size decimal and convert it into the bignum structure above.
Could someone please enlighten me. Even a smaller example would be nice, such as converting maybe an arbitrary string into octal digits which would be stored in a uint16_t array.
Thanks.