Closed socket in handshake not an exception, revert to earlier encpms structure to deal with arbitrary modulus size, minor bug fixes