Re: IQ Handling vulnerabilities

"Joe Hildebrand (jhildebr)" <[email protected]>
Newsgroups gmane.ietf.xmpp
Message-ID <CF1E771D.38FA7%[email protected]>
On 2/10/14 12:25 PM, "Thijs Alkemade" <[email protected]> wrote:

>Uhm. Maybe this email is missing a line again, but if you use those
>values as
>'id's directly, they will not be unpredictable at all, as anyone who
>receives
>an <iq/> can generate the rest of the chain.
>
>However, if you make sure the 'id' values are only half the hashes, it
>should
>be unpredictable unless an attacker is willing to spend an insane amount
>of
>work.
>
>So:
>
>start = sha1(crytpo_rand())
>start+1 = sha1(start)
>...
>
>id1 = start[0:10]
>id2 = start+1[0:10]

Or add a nonce to each round:

nonce = crytpo_rand()
start = sha1(nonce + crytpo_rand())
start+1 = sha1(nonce + start)

Regardless, there exist solutions.


-- 
Joe Hildebrand
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.