(no subject)

Erik Johnson erik_johnson1980@hotmail.com
Mon, 18 Nov 2002 15:29:20 -0600


I'm using the GMP library for a demonstration of various cryptographic 
algorithms for an independent study project. I seem to have a problem, 
however, with the integer import and export functions. Basically, I am 
reading in binary data, using the import function to convert it to the GMP 
multi-precision number format, performing the algorithm, and then using the 
export function to convert the data back to binary and write it out to the 
destination file.

I have no problems with text files, the algorithms encrypt and decrypt 
perfectly.  The problem is this: when using characters with an ANSI value 
higher than 127, the program will not work.  The decrypted result does not 
match the original file. So, binary files don't work, and text files with 
special characters (accented letters, etc.) also do not. Since these 
characters do not work, but regular text does, I figure it is likely a 
problem with the conversion function not properly converting the unsigned 
char data to the GMP format.  Like it treats everything as a signed char or 
something when converting.  My buffer is an unsigned char array, so I know 
that the buffer is not the problem.

Can anyone else that has used GMP offer any insight into this problem?

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus