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-unsubscr...@xmpp.org
> _______________________________________________
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: standards-unsubscr...@xmpp.org
_______________________________________________

Reply via email to