Add binary serialization and crypto support to the socket (not working yet)