'Read handshake message, parse the other peer\'s public key and
schedule the key exchange for execution outside of the event loop.'

def _read_handshake(self, data):

    log_prefix = 'obfs3:_read_handshake()'
    if (len(data) < PUBKEY_LEN):
        return
    other_pubkey = data.read(PUBKEY_LEN)
    self.d = threads.deferToThread(self.dh.get_secret, other_pubkey)
    self.d.addCallback(self._read_handshake_post_dh, other_pubkey, data)
    self.d.addErrback(self._uniform_dh_errback, other_pubkey)
    self.state = ST_WAIT_FOR_HANDSHAKE
