MPLib is a free system library for Palm OS. It contains functions to perform multiple-precision integer arithmetic operations. It also includes some other useful and related algorithms. There is no limit to the precision except the available dynamic memory implied by the memory manager of your Palm OS. MPLib has a rich set of functions, and the functions have a regular interface. A complete list of the functions currently provided by the latest version of MPLib can be found in the User's Manual. This library can be used in collaboration with my other cryptographic libraries to implement most of the well-known public-key cryptosystems on a Palm Pilot.
This library was written as a system library (not in GLib format) for benefiting the full support from the latest version of Palm OS and the developing tools. The system library is supported by the Palm OS SysLib* API calls and is officially described in Palm OS FAQ Shared Libraries and Other Advanced Project Types. It is a runtime shared library which allows Palm applications or other shared libraries using the MPLib functions dynamically. This in terms saves the applications from keeping copies of the same code in their own code resources. Another advantage of implementing those functions in the form of a shared library is to overcome two memory constraints of Palm OS namely the 32KB jump limit (CodeWarrior default model) and the code resource size limit.
Another type of shared libraries is called GLib, which is more user-friendly (or programmer-friendly) than the system library mentioned above and is also faster because no systraps are done when calling the GLib functions. However, as of this writing, neither CodeWarrior nor the latest version of PRC-Tools supports GLibs. Only PRC-Tools 0.5.0 and Michael Sokolov's 0.6.0 beta do so. This is also one of the reasons of implementing the library as a system library instead of a GLib.
MPLib is a side-product of my researches. I have written and collected some useful functions for experimenting cryptographic algorithms and protocols on Palm devices. The library is just a nicer collection of some of these functions. My intention is to continue enriching this library so to make it more useful to researches or any other applications you can think of.
If you just want to use the MPLib with your Palm programs, simply follow the steps below to download the files and learn how to use them.
I have only tested the library on my Palm V with Palm OS v3.3 so far. So your feedbacks of running the library on other Palm devices are welcome. This library is in the public domain. You can distribute, copy or modify the code as you will. I would also appreciate any comments, bug reports and enhancements.
Changes with MPLib v0.2 (Feb 11, 2001)
- Add Garner's algorithm for CRT on special case of two moduli:
MPLibMP_crt2
- Add primality test algorithm:
MPLibMP_probab_prime