Windows and Mac - Text Encodings
Posted: Sat Feb 13, 2010 4:37 am
Hi
I have written a client-server application using sockets and my own protocols.
What I am seeking to achieve is the accurate (checkable) transmission of encrypted data over the internet between different platforms.
It runs very well in an all Mac environment. My difficulty is with the accurate transmission of data between the two platforms. As the application will transmit sensitive information I have written an encryption package and error notification process into the protocol. The question I have is how and when to apply the mactoiso and isotomac functions.
The sending logic is as follows:
1) the message arrives at my dispatching routine
2) the md5digest routine is applied to the message and added at the front of the message for transmission
3) the message is encrypted using a combination of the rc4 package made available by one of this community together with the inbuilt encodeB64 routine
4) the message is sent with a simple "end of message" string appended
The receiving logic is as follows:
1) the message arrives at my receiving routine
2) it is checked for completeness of transmission using the "end of message" string which is cut from the message
3) the message is decrypted
4) the first 16 characters (the md5digest portion) are cut and put into checksum1
5) the md5digest of the remaining message is performed on the receiving machine and put into checksum2
5) if the checksums agree then the message is good
The server is always a Mac. If the receiving machine is a Windows machine, which of the above process are dependent on the text encoding
a) the md5digest?
b) the rc4 routine?
c) the encodeB64 routine?
ie. how can I achieve both encryption and the capacity to verify the integrity of the message when sending text data over the internet between machine running two different platforms.
I would appreciate any help as I have so far been unable to track down any advice from the resources available and I can't get it to work - so far.
Alex
I have written a client-server application using sockets and my own protocols.
What I am seeking to achieve is the accurate (checkable) transmission of encrypted data over the internet between different platforms.
It runs very well in an all Mac environment. My difficulty is with the accurate transmission of data between the two platforms. As the application will transmit sensitive information I have written an encryption package and error notification process into the protocol. The question I have is how and when to apply the mactoiso and isotomac functions.
The sending logic is as follows:
1) the message arrives at my dispatching routine
2) the md5digest routine is applied to the message and added at the front of the message for transmission
3) the message is encrypted using a combination of the rc4 package made available by one of this community together with the inbuilt encodeB64 routine
4) the message is sent with a simple "end of message" string appended
The receiving logic is as follows:
1) the message arrives at my receiving routine
2) it is checked for completeness of transmission using the "end of message" string which is cut from the message
3) the message is decrypted
4) the first 16 characters (the md5digest portion) are cut and put into checksum1
5) the md5digest of the remaining message is performed on the receiving machine and put into checksum2
5) if the checksums agree then the message is good
The server is always a Mac. If the receiving machine is a Windows machine, which of the above process are dependent on the text encoding
a) the md5digest?
b) the rc4 routine?
c) the encodeB64 routine?
ie. how can I achieve both encryption and the capacity to verify the integrity of the message when sending text data over the internet between machine running two different platforms.
I would appreciate any help as I have so far been unable to track down any advice from the resources available and I can't get it to work - so far.
Alex