input message (can be empty)
a (reader, output, Option[(cipherstate, cipherstate)] tuple. The output will be sent to the other side, and we will read its answer using the returned reader instance When the handshake is over (i.e. there are no more handshake patterns to process) the last item will contain 2 cipherstates than can be used to encrypt/decrypt further communication