<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18943"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT size=2 face=Arial>Hi Guido,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>I wrote the SSH code 3-4 years ago.&nbsp; I got it 
working with some Linux boxes.&nbsp; The problem you are describing is at the 
heart of authentication.&nbsp; It is hashing some security parameters and then 
rehashing that hash and signing it with the private key.&nbsp; This happens on 
your server.&nbsp;&nbsp;Then the client will also hash the security parameters 
and then rehash that hash and verify signature with the server generated 
signature and the public key.&nbsp; This is the point that is failing.&nbsp; The 
problems could be transmission of security params, changes to hashing in 
cryptography code in squeak (don't think this has happened), bad public key, 
perhaps something else.&nbsp; </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Can you connect to a different SSH 
server?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Can you provide me the credentials to connect to 
your server so I can walk the code?&nbsp; reefedjib at gmail.com, replace the at 
with @.</FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial></FONT><FONT 
face=Arial></FONT>&nbsp;</DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial>Here is the code that builds the 
exchangeHash:</FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV style="FONT: 10pt Tahoma"><FONT 
face=Arial>computeExchangeHashWithSecurityParams: securityParams</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial>&nbsp;securityParams 
exchangeHash: (SHA1 hashMessage: (<BR>&nbsp;&nbsp;(SSHBinaryMessage new 
stringOn: securityParams clientIdentification 
asByteArray),<BR>&nbsp;&nbsp;(SSHBinaryMessage new stringOn: securityParams 
serverIdentification asByteArray),<BR>&nbsp;&nbsp;(SSHBinaryMessage new 
stringOn: securityParams clientKeyInit 
asByteArray),<BR>&nbsp;&nbsp;(SSHBinaryMessage new stringOn: securityParams 
serverKeyInit asByteArray),<BR>&nbsp;&nbsp;(SSHBinaryMessage new stringOn: 
securityParams hostPublicKey asSshByteArray),<BR>&nbsp;&nbsp;(SSHBinaryMessage 
new mpintOn: self e),<BR>&nbsp;&nbsp;(SSHBinaryMessage new mpintOn: self 
f),<BR>&nbsp;&nbsp;(SSHBinaryMessage new mpintOn: securityParams 
secretKey))).<BR>&nbsp;securityParams sessionIdentifier isNil 
<BR>&nbsp;&nbsp;ifTrue: [securityParams sessionIdentifier: securityParams 
exchangeHash].<BR></FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial>Regards,</FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial>Rob</DIV></FONT>
<DIV style="FONT: 10pt Tahoma"><BR></DIV>
<DIV style="FONT: 10pt Tahoma; BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=charig@gmail.com 
href="mailto:charig@gmail.com">Guido Chari</A> </DIV>
<DIV><B>Sent:</B> Thursday, October 07, 2010 11:06 AM</DIV>
<DIV><B>To:</B> <A title=squeak-dev@lists.squeakfoundation.org 
href="mailto:squeak-dev@lists.squeakfoundation.org">The general-purpose Squeak 
developers list</A> </DIV>
<DIV><B>Subject:</B> [squeak-dev] Cryptography - Problem with SSH 
client</DIV></DIV>
<DIV><BR></DIV>
<DIV>I'm having some problems connecting to an SSH server from Squeak. The 
server is in my localhost and i test it with a unix ssh client with no 
problems.</DIV>
<DIV>However, when i tried to connect from Squeak i received an error ("bad 
signature") on 
SSHDHGroup1KeyExchangeProcessor&gt;&gt;processServerDHReplyMsg:securityParams: 
method on the key exchange phase of the algorithm.</DIV>
<DIV><BR></DIV>
<DIV>Does anybody use the SSH client from the cryptography package? What should 
be the error?</DIV>
<DIV><BR></DIV>
<DIV>Cheers,</DIV>
<DIV>Guido.</DIV>
<P>
<HR>

<P></P><BR></BODY></HTML>