[jdev] Re: SOCKS5 Bytestream File Transfer problem

Anthony Ortiz anthonypaulo at gmail.com
Fri Feb 25 08:16:50 CST 2005


Thanks for the quick reply, but there's no problem with the SHA-1 due to :

1) The difference in our hash results is due to your applying SHA1(sid
+ from + to) rather than SHA1(sid + Stringprep.nameprep(from + to)),
which in this particular case simply transforms the from and to
variables to all lowercase. So your hash is based on a string
containing uppercase characters while mine was based on lowercase
characters, and the protocol specifically states that the JID's need
to be Stringprepped, so I assume my hash is correct.

2) I made the mistake of pasting the hash output in uppercase... it
should be all lowercase.

Anyone else have any ideas???

Anthony

On Fri, 25 Feb 2005 14:05:41 +0100, Magnus Henoch <mange at freemail.hu> wrote:
> Anthony Ortiz <anthonypaulo at gmail.com> writes:
> 
> > sid = s5b_8e463861b5e6bc04
> > from = venkata at 68.101.84.233/Psi
> > to = aortiz at 68.101.84.233/JClient
> >
> > // using libidn/java/gnu/inet/encoding/Stringprep.java -- too boring
> > to implement, thk god I found this!
> > String SocksHost = SHA1(sid + Stringprep.nameprep(from + to)); // HASH
> > OUTPUT=9134A1B74EB358B866C604B1E1B0DDEE0D664967
> 
> $ echo -n s5b_8e463861b5e6bc04venkata at 68.101.84.233/Psiaortiz at 68.101.84.233/JClient | sha1
> 5b3427312a46e4f44958cda3e0be1cd94bdd813f
> 
> I'm not sure what goes wrong here...
> 
> Magnus
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mail.jabber.org/mailman/listinfo/jdev
>



More information about the JDev mailing list