Is there a way to do multiprecision arithmetic (with integers over 64 bits) in msp430?

  • I would like to know if there is any way, if possible, any simple way to do arithmetic with integers larger than 64 bits in size on the MSP430?

I ask specifically about this because I'm trying to implement encryption algorithms (RSA, AES, hash functions, digital signatures, etc.) on the msp430g2553 platform.

I searched over the Internet, and through mistaken despair, I installed Linux distributions to use GMP , but failed. I installed Kali and then Lubuntu on a USB stick (2.0) to suffer unbearable freezes, without a hint if this would work or not. Later they tried the magic of VMBox, and after that everything became easier, although unconvincing. In the end, I came to a point with mps430-gcc and mspdebug so that I could debug some code examples and see that they worked, but were still unable to perform GMP operations due mainly to library errors (undefined link to mpz_t init .. . etc..).

As far as I understand, GMP is a multidimensional arithmetic library for working with specific processor architectures, and the MSP430 is not one of them, although at the moment I will not be surprised if this is one of them. The best answer I received is that some TI employees are not familiar with it. Thus,

  • Can I use GMP on the MSP430, or more specifically on the msp430g2553?

I saw almost nothing on google that has a cross reference of msp430 with gmp, and I am at the point that I am trying to implement a miserable 64-bit RSA size, the size of which hardly works, if at all. Therefore, I hope this post and its answers will help someone, and I hope I will also like it later.

I also forgot to mention that I read about the relic toolkit (but did not waste time implementing it, since GMP was more like a standard in this area), and I would like to know:

  • Is there a relic for mannequins that you can tie, and again, if you can work with it on the MSP430?

Thanks to everyone.

+7
c gcc gmp msp430 relic
source share
1 answer

It is unlikely that any of these libraries can be compiled for the embedded 16-bit architecture.

The MSP430 processor has add and carry instructions and similar instructions, and that is how the compiler implements 32- and 64-bit integers. Therefore, theoretically, one could write these algorithms independently, with a large number of (built-in) assemblies. But I doubt that the G2553 has enough memory for this.

(There is a reason some of the larger MSP430s have an AES hardware accelerator and no one has RSA.)

+2
source share

All Articles