Matt Johnston wrote: > On Tue, Aug 08, 2006 at 10:59:15AM +0200, Hans-Christian Egtvedt wrote: >> I put the logs here: >> http://www.egtvedt.no/dropbear/ >> >>> Hopefully that might be of use. >> I'm not quite seeing what I should be looking for, if anybody have a >> pointer to what I should see (correct calculations etc) then I can start >> my debugging :) > > I've taken another look, turns out that my rigged random > number generator had endian-specific output :( Could you > give it another go with the new version at > http://matt.ucc.asn.au/dropbear/testing/db-unrandom2.tar.gz > , sorry about that.
Thanks again for making this test :) > I've put what I see as dump2.gz, it should be the same as > you see on the workstation (at least for the calculations). > > For debugging, I'd compare the two traces (avr versus x86) > using vimdiff or something similar. Find the first point > where they begin to differ in their numeric output (the > big-numbers printed etc), and then add more debugging > statements before and after that to narrow down the point > where they start to differ. (Note that some of the > hexadecimal output will differ with endianness, those should > be marked). I looked in your dump2-ppc vs. dump2, and found that in my x86 vs avr32 I have something faulty with the lines below: X86 mp_int mp_exptmod_fast X: 57177274837176085710416002504255433114092271661685833986820045309615224297446777341551735779854568082929739086299104916069027366371956577873538725199184070295968371188748133537718214011550432576681564852689543774176794595038388421094953024485861852872341010938808415634567578860387138830446329229275810102561 AVR32 mp_int mp_exptmod_fast X: 26144629297143774191971619660891134373249478019090098695819374263386738314451768455401121680453697629379694697503955208976597983567979834942305834318644583895981375065787344042040457278746854017585464708420108154208341890971865764261601653839167444443692604372044120220262714803272834772806762057598126328370 > Have a look at libtommath/bn_mp_exptmod_fast.c for how I've > added the debugging output there - it requires the extra > #include up the top, and order of includes does matter. I'll have a look inside here to see what I find :) > I'd be interested to see the logs, let me know how you go. http://www.egtvedt.no/dropbear/ v2 is the new logs. -- With kind regards, Med vennlig hilsen, Hans-Christian Egtvedt Applications Engineer - AVR Applications Lab Atmel Norway
