'Got data from downstream. We need to de-obfuscate them and
proxy them upstream.'

def receivedDownstream(self, data):

    if (self.state == ST_WAIT_FOR_KEY):
        self._read_handshake(data)
    if (self.state == ST_WAIT_FOR_HANDSHAKE):
        return
    if (self.state == ST_SEARCHING_MAGIC):
        self._scan_for_magic(data)
    if (self.state == ST_OPEN):
        self.circuit.upstream.write(self.recv_crypto.crypt(data.read()))
