IMHO, you should try implementing an RC4 algorithm on both sides. It's
secure, but simple to implement, so not libraries are required.
I'm feeling generous today. Here's the full algorithm out of my PalmOS
boilerplate code. It's obviously easy to port to Win32. Just change all
the types to standard C types instead of PalmOS ones.
Alan
/***************************************************************************
****
* FUNCTION NAME : RC4(Char* sIn, UInt32 iInLen, Char* sKey, UInt32 iKeyLen)
* DESCRIPTION : Encrypts (in place) the data pointed to by sIn using the
* encryption key pointed to by sKey
* RETURNS : none
* PARAMETERS : sIn - pointer to the data to encrypt
* iInLen - Number of bytes to encrypt
* sKey - pointer to the encryption key
* iKeyLen - Number of bytes in the encryption key
* PRECONDITION : none
* POSTCONDITION : none
* COMMENTS : RC4 encryption is reversible. ie: use the same function
again
* to decrypt the string.
****************************************************************************
***/
void RC4(Char* sIn, UInt32 iInLen, Char* sKey, UInt32 iKeyLen) {
UInt8* inp = (UInt8*)sIn;
UInt8* key = (UInt8*)sKey;
UInt8 s[256];
UInt8 k[256];
UInt32 i;
UInt32 j;
UInt8 temp;
UInt32 t;
UInt32 x;
for (i = 0; i < 256; i++) {
s[i] = (UInt8) i;
}
j = 0;
for (i = 0; i < 256; i++) {
k[i] = key[j++];
j %= iKeyLen;
}
j = 0;
for (i = 0; i < 256; i++) {
j = (j + s[i] + k[i]) % 256;
temp = s[i];
s[i] = s[j];
s[j] = temp;
}
i = 0;
j = 0;
for (x = 0; x < iInLen; x++) {
i = (i + 1) % 256;
j = (j + s[i]) % 256;
temp = s[i];
s[i] = s[j];
s[j] = temp;
t = (s[i] + s[j]) % 256;
inp[x] ^= s[t];
}
}
"jack" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> Now i'm trying to encrypt the data inside the palm.
> Searching on the , I find that there is a library using AES algorithm to
> encrypt/decrypt in palm os:
> http://www.copera.com/AESLib/index.html
> and i find that there is another library using AES algorithm to
> encrypt/decrypt in Windows:
> http://fp.gladman.plus.com/cryptography_technology/rijndael/
>
> now i want to encrypt data in windows, and sync them to palm.
> Then i wan to decrypte data in palm.
>
> is the two library compatible?
>
> thank you for your attention.
>
> jack.
>
>
>
>
"jack" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> Now i'm trying to encrypt the data inside the palm.
> Searching on the , I find that there is a library using AES algorithm to
> encrypt/decrypt in palm os:
> http://www.copera.com/AESLib/index.html
> and i find that there is another library using AES algorithm to
> encrypt/decrypt in Windows:
> http://fp.gladman.plus.com/cryptography_technology/rijndael/
>
> now i want to encrypt data in windows, and sync them to palm.
> Then i wan to decrypte data in palm.
>
> is the two library compatible?
>
> thank you for your attention.
>
> jack.
>
>
>
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/