@Override
	protected void readPayload(InputBuffer b) throws IOException, ParsingException {
		InputBuffer signed = b.getSubBuffer(0);

		VariableLengthIntegerMessage v = getMessageFactory().parseVariableLengthIntegerMessage(b);
		b = b.getSubBuffer(v.length());

		if (BROADCAST_VERSION != v.getLong()) {
			throw new ParsingException("Unknown broadcast message version: " + v.getLong());
		}

		v = getMessageFactory().parseVariableLengthIntegerMessage(b);
		b = b.getSubBuffer(v.length());
		addressVersion = v.getLong();

		v = getMessageFactory().parseVariableLengthIntegerMessage(b);
		b = b.getSubBuffer(v.length());
		stream = v.getLong();

		behavior = getMessageFactory().parseBehaviorMessage(b);
		b = b.getSubBuffer(behavior.length());

		publicSigningKey = Util.getPublicKey(b.get(0, 64));
		publicEncryptionKey = Util.getPublicKey(b.get(64, 64));
		ripe = b.get(128, 20);
		b = b.getSubBuffer(148);

		if (!Arrays.equals(Digest.keyDigest(publicSigningKey, publicEncryptionKey), ripe)) {
			throw new ParsingException("The hash of the public keys is incorrect.");
		}

		message = getMessageFactory().parseMailMessage(b);
		b = b.getSubBuffer(message.length());

		v = getMessageFactory().parseVariableLengthIntegerMessage(b);
		b = b.getSubBuffer(v.length());
		long length = v.getLong();

		if (length < 0 || length > b.length()) {
			throw new ParsingException("ECDSA signature too long: " + length);
		}

		signature = b.get(0, (int) length);

		if (!CryptManager.getInstance().verifySignature(signed.get(0, b.getOffset() - signed.getOffset()), signature,
				publicSigningKey)) {
			throw new ParsingException("Wrong signature.");
		}
	}