Actually, Wei Dai's Crypto++ library contains a fairly good BigNum package (actually, the MPI code from PGP 2.6.2, I believe ;) wrapped in C++. So, there is no need to do any work, just grab Wei's library and use the bignums out of there. -derek