Re: IQ Handling vulnerabilities

Dave Cridland <[email protected]>
Newsgroups gmane.ietf.xmpp
Message-ID <CAKHUCzzv0Eeh6mnohci4apsAMsajHHJ7oszikeLQZtpkPQiucw@mail.gmail.com>
On Mon, Feb 10, 2014 at 7:33 PM, Joe Hildebrand (jhildebr) <
[email protected]> wrote:

> Or add a nonce to each round:
>
> nonce = crytpo_rand()
> start = sha1(nonce + crytpo_rand())
> start+1 = sha1(nonce + start)
>
> Regardless, there exist solutions.
>

At the risk of diving into what's quite clearly a bit of a bikeshed at this
point...

I wondered whether there's value in going a step further. What if an entity
constructed ids based on a random per-session key, the original "to" value,
and a suitable salt (which itself need not be cryptographically random),
such that the id was the salt followed by a (truncated, probably) HMAC
result as follows:

id = salt + hmac(salt + to, session-key)[0:10]

That way, on receipt of such an id in an iq response or error, the sender
could validate the id somewhat securely?

I suspect a single session-key is a little simplistic; but that's easy to
adapt.

The advantage here isn't really in the <iq/> case we've been mostly
discussing, but the other cases of a returned id - since we don't want to
track outbound directed presence, or message, ids for an arbitrary length
of time. (I assume).

Dave.

_______________________________________________
xmpp mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/xmpp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.