I am a computer science student working on a python shell. It consists of a Server and Client pair and all of the communication is encrypted with AES using the pycrypto libraries. Everything works great if I am running the Server and Client on the same OS (ex. Running the server on windows and the client on windows) the problem occurs when I run the server on a linux machine and the client on a windows machine. Suddenly I get this error:

Log what is being sent and what is being received and compare the results to figure out what is going on.

The argument passed to recv method is the buffer size. The actual size of the data received can be less; therefore you should always explicitly check the size of received data in situations where it matters.

Unless your assignment specifically requires you to use sockets and pycrypto, I would strongly suggest you use Twisted with SSL instead.