<div dir="ltr"><div><div><div><div><div><div><div><div>Hi Matt,<br><br></div>Thanks for the reply.<br><br></div>Things are working fine when I commented function "buf_dss_verify". Actually majoriy of the time taken was in mp_exptmod()
routine with each call takes around 25 secs and because of this only openssh server is getting timeout. <br></div>As per your suggestion one of the solution is to merge tofastmath library but just for one function merging whole library is a hectic work though. Based on experiments i have couple of questions:<br></div>1) dropbear ssh client is working by commenting out the function "buf_dss_verify". Is it ok for me to take this as workaround and continue or this can cause any serious problem further?<br></div>2) Is there any other solution to improve the speed of calculations in function "mp_exptmod()" only? <br><br></div>Appreciate your response.<br><br></div>Thanks<br></div>Pratik <br> </div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 24, 2014 at 8:02 PM, Matt Johnston <span dir="ltr"><<a href="mailto:matt@ucc.asn.au" target="_blank">matt@ucc.asn.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pratik,<br>
<br>
I'm assuming that it is the session timeout that's causing<br>
the disconnection. The log on the OpenSSH server should<br>
confirm that.<br>
<br>
I think the only real solution would be to improve the speed<br>
of libtommath on that device. Running a profiler to<br>
determine the slowest parts would be the first step. I don't<br>
know much about the device itself though it seems libtommath<br>
performs quite badly - OpenSSL is generally faster. Looking<br>
at the difference in its maths operations might help. It's<br>
non-trivial work though.<br>
<br>
Cheers,<br>
Matt<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Sep 24, 2014 at 02:12:41PM +0530, pratik singh wrote:<br>
> Hi,<br>
><br>
> I am using Dropbear 0.48 with uClinux-dist. Currently dropbear server is<br>
> working fine but while trying to run dbclient it throws write error. Some<br>
> of the traces are:<br>
><br>
> TRACE: leave process_packet<br>
> TRACE: enter cli_sessionloop<br>
> TRACE: enter send_msg_service_request: servicename='ssh-userauth'<br>
> TRACE: enter encrypt_packet()<br>
> TRACE: encrypt_packet type is 5<br>
><br>
> TRACE: enter writemac<br>
> TRACE: leave writemac<br>
> TRACE: enter enqueue<br>
> TRACE: leave enqueue<br>
> TRACE: leave encrypt_packet()<br>
> TRACE: leave send_msg_service_request<br>
> TRACE: leave cli_sessionloop: sent userauth service req<br>
> TRACE: enter write_packet<br>
><br>
> TRACE: enter cli_tty_cleanup<br>
> TRACE: leave cli_tty_cleanup: not in raw mode<br>
> TRACE: enter session_cleanup<br>
> TRACE: enter chancleanup<br>
> TRACE: leave chancleanup<br>
> TRACE: leave session_cleanup<br>
> dbclient: connection to <a href="http://pratik@10.10.10.1:22" target="_blank">pratik@10.10.10.1:22</a> exited: error writing<br>
> --------------------------------------------------------------------------------------------------------------<br>
><br>
> I have tried the following:<br>
> 1) Run dbclient with -K option but still getting the same write error<br>
> 2) Run dbclient with -y option but still getting the same write error<br>
><br>
> On further debugging I have found that this write comes because server (in<br>
> this case Openssh) is getting timeout.<br>
><br>
> I am running microblaze processor at about 60mhz with hardware<br>
> multiplier, divider enabled.<br>
><br>
><br>
> From the wireshark capture i have seen that server is sending "FIN"<br>
> packet. also server is sending the 2 ssh packets in one reply packet.<br>
> Do not know the reason of this behavior.<br>
><br>
><br>
> I am facing this problem for connection between dbclient <----> Openssh.<br>
><br>
><br>
> Please help as m stuck to this problem since very long. Appreciate your reply.<br>
><br>
><br>
> Attached the pcap file for your reference. apply "ip.addr==10.216.114.137"<br>
> filter in pcap file. IP address is client having dbclient and other is<br>
> server having openssh.<br>
><br>
><br>
> --<br>
> Thanks & Regards<br>
> Pratik Singh<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thanks & Regards<br>Pratik Singh<br>
</div>