[Standards] XEP-0392: Consistent Color Generation - Issues using JID

Marcel Waldvogel marcel.waldvogel at uni-konstanz.de
Fri Dec 8 14:17:04 UTC 2017


Jonas,

comparison can be case-insensitively and (probably also) normalization-insensitively without having to case-/normalization-convert both identifiers first. An example is strcasecmp() [1].

As JIDs are supposed to be case-preserving, I would expect several implementations do not downcase them first.

I would suggest language similar to the following:

"Before hashing, implementations should ensure that the JID has been converted to lower case and Unicode normalization form C (NFC)"

-Marcel

[1] http://man7.org/linux/man-pages/man3/strcasecmp.3.html

On Fri, 2017-12-08 at 10:25 +0100, Jonas Wielicki wrote:
> On Freitag, 8. Dezember 2017 10:00:33 CET Marcel Waldvogel wrote:
> > I came upon one more ambiguity in the "same JID, different
> > hash/color"
> > domain
> > First, what I already mentioned, is case: The JID must be mapped to
> > a
> > consistent case; I would suggest lower.
> 
> Isn’t that mandated anyways by RFC 7622 for "comparing" JIDs (which
> this is, I 
> think)? Surely I can add a reference that RFC 7622 normalisation must
> be 
> applied before hashing.
> 
> > Second, the hash also depends on the Normalization Form applied. I
> > would suggest NFC, which is recommended anyway for XML.
> > It would be great if that could also be specified (or at least
> > referenced) in the XEP.
> 
> I think the unicode normalization form which is to be used is also
> covered by 
> RFC 7622, even though maybe only implicitly in PRECIS. Luckily, it is
> NFC :-).
> 
> Adding a note that the RFC 7622 rules for Comparison need to be
> applied before 
> hashing probably makes sense.
> 
> kind regards,
> Jonas
> _______________________________________________
> Standards mailing list
> Info: https://mail.jabber.org/mailman/listinfo/standards
> Unsubscribe: Standards-unsubscribe at xmpp.org
> _______________________________________________
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6431 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20171208/497411a4/attachment.bin>


More information about the Standards mailing list