[Standards] XEP-0115. Text codec for verification string

5 views
Skip to first unread message

Ruslan Nigmatullin

unread,
Mar 24, 2012, 5:26:07 AM3/24/12
to stan...@xmpp.org
Hello everybode,

Unicode characters are used in Complex Generation Example (Section 5.3 of XEP), but looks like they are ignored in resulting hash value.
I've tried to build the same string, coded it into utf-8 and to get SHA-1 hash for it and I got "XDu6S9Xwp17+ZL0Ug4CIuR36adI=", while hash in example is "q07IKJEyjvHSyhy//CH0CxmKi8w=". To determine the reason I've played with encodings and found that I receive the hash from example if verification string is encoded by "latin-1" codec, which is possible invalid behaviour (as original string contains non-latin symbols).

May be resulting hash should be fixed in example?

Ruslan

Ruslan Nigmatullin

unread,
Mar 24, 2012, 1:11:31 PM3/24/12
to XMPP Standards
24.03.2012, 18:20, "Florian Zeitz" <flo...@babelmonkeys.de>:
> Hello Ruslan,
>
> I tried to reproduce your results, but failed.
> I can however reproduce the result from XEP-0115 just fine using both
> openssl on the CLI and a SHA-1 implementation in Objective-C.
>
> Here is the CLI version, which is IIRC also roughly what was used to
> generate the original result in the XEP with an added "iconv" run to
> make very sure the encoding is UTF-8:
> % echo -n "client/pc/el/Ψ 0.11<client/pc/en/Psi 0.11<\
> http://jabber.org/protocol/caps<http://jabber.org/protocol\
> /disco#info<http://jabber.org/protocol/disco#items<http://jabber.org\
> /protocol/muc<urn:xmpp:dataforms:softwareinfo<ip_version<ipv4<ipv6\
> <os<Mac<os_version<10.5.1<software<Psi<software_version<0.11<" \
> | iconv -t UTF-8 | openssl dgst -sha1 -binary | openssl base64
> q07IKJEyjvHSyhy//CH0CxmKi8w=
>
> It'd be interesting to hear how you got to your results.
>
> Regards,
> Florian Zeitz

Good day, Florian,

Yes, I've tested again - my fault... There is no error in example, so I'm sorry.

With best regards,
Ruslan

Peter Saint-Andre

unread,
Mar 25, 2012, 3:30:01 AM3/25/12
to XMPP Standards
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for checking!

Peter

- --
Peter Saint-Andre
https://stpeter.im/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9uyXkACgkQNL8k5A2w/vwufQCghf1kk4IOUWPPaPm6VtpNcNIf
Z9kAnA/vnbmN7fCWLdZVE9CAdh1g9S8f
=VkAL
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages