'Extract the public key and invoke a callback with the master secret.
First, the UniformDH public key is extracted out of `data\'.  Then, the
shared master secret is computed and `callback\' is invoked with the
master secret as argument.  If any of this fails, `False\' is returned.'

def receivePublicKey(self, data, callback, srvState=None):

    remotePublicKey = self.extractPublicKey(data, srvState)
    if (not remotePublicKey):
        return False
    if self.weAreServer:
        self.remotePublicKey = remotePublicKey
        self.udh = obfs3_dh.UniformDH()
    assert (self.udh is not None)
    try:
        uniformDHSecret = self.udh.get_secret(remotePublicKey)
    except ValueError:
        raise ValueError('Corrupted    public    key.')
    masterKey = Crypto.Hash.SHA256.new(uniformDHSecret).digest()
    callback(masterKey)
    return True
