3 ms·
If you want to see a real implemention of arbitrary sized integer math, mbedTLS is a great example: https://github.com/ARMmbed/mbedtls/blob/development/library
by SavantIdiot 5y ago
If you want to see a real implemention of arbitrary sized integer math, mbedTLS is a great example:
https://github.com/ARMmbed/mbedtls/blob/development/library/bignum.c https://github.com/ARMmbed/mbedtls/blob/development/library/...
All of the ECC code in that library relies on this code, which can be accelerated by dedicated hardware.
Here is multi-precision multiplication:
https://github.com/ARMmbed/mbedtls/blob/f1eb4257823ae4c3b3ac4a0b0ae1876df4e8b643/library/bignum.c#L1652-L1688 https://github.com/ARMmbed/mbedtls/blob/f1eb4257823ae4c3b3ac...