[jdev] Jabberd 2 project

Matthias Wimmer m at tthias.net
Sun May 2 14:50:08 CDT 2004


Salut Remy!

Remy HAREL schrieb am 2004-04-30 17:13:04:
> of XML stanzas between any two entities". So,  as we have many c2s, we 
> have to add data in order to keep this order, and I would like to hash 
> an jid (1024bits) to a MD5 word (128bits). It's better ( I think) and 
> MD5 is already implemented in jabberd 2 project, that's why I choose 
> MD5. Is it a bad choice accordind to you ?

A JID has up to 1024 B not 1024 b ;)

If you want to use the hash to reduce the size, you might prefere MD5,
that's true. SHA-1 would have 160 b.

But infact this is an advantage. 128 b isn't considered enough anymore
to prevent forced clashes (by users). So if you use it in a way that
JIDs that map to the same hash don't break your implemenation it's fine.
If clashing hashes break your implementation MD5 could be a problem for
you as somebody that want to harm your server can create a second
account that has the same hash value.

BTW: The SHA-1 hash algorithm is implemented in jabberd2 (and jabberd14)
as well: jabberd2/util/sha1.*


A+
  Matthias

-- 
Fon: +49-(0)70 0770 07770       http://matthias.wimmer.name/
HAM: DB1MW                      xmpp:mawis at charente.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.jabber.org/jdev/attachments/20040502/a775e9e2/attachment-0002.pgp>


More information about the JDev mailing list