Re: PPC bn_div_words routine rewrite

2005-07-08 Thread Andy Polyakov
Please do not use previously mentioned routine, it missed 1 corner case where 32=num_bits_word(d) Revised routine that passes (cd test; make bntest). Does it mean that previous version didn't actually pass the test? I mean if it did on your CPU, but not mine, probably we could learn

Re: PPC bn_div_words routine rewrite

2005-07-08 Thread David Ho
Forgive my lack of knowledge in your existing code. But it is really designed with optimization in mind? What was the driving force for the C function? If it is optimized what is the time required? I jumped way to early at the fast conclusion I must admit. Because I really never had speed in

Re: PPC bn_div_words routine rewrite

2005-07-07 Thread David Ho
] Subject Re: PPC bn_div_words routine rewrite Okay, having actually did what Andy suggested, i.e. the one liner fix in the assembly code, bn_div_words returns the correct results. Note that the final version, one committed to all relevant OpenSSL branches since couple

Re: PPC bn_div_words routine rewrite

2005-07-07 Thread David Ho
Architect IBM Crypto for C Team IBM/Tivoli Gold Coast Office Andy Polyakov [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 06/07/2005 07:49 AM Please respond to openssl-dev To openssl-dev@openssl.org cc [EMAIL PROTECTED] Subject Re: PPC bn_div_words routine rewrite

Re: PPC bn_div_words routine rewrite

2005-07-05 Thread Andy Polyakov
Let's start the week off with less hostility and more productive criticism on this topic. If you want productivity, then provide real evidence in form of stack backtrace at segmentation violation point, disassemble output in the vicinity of segmentation violation point and 'info registers'

Re: PPC bn_div_words routine rewrite

2005-07-05 Thread David Ho
. After reading my email. I must say I was the unfriendly one, I apologize for that. More debugging evidence to come. -- Forwarded message -- From: Murch, Christopher [EMAIL PROTECTED] Date: Jul 1, 2005 9:46 AM Subject: RE: PPC bn_div_words routine rewrite To: David Ho

Re: PPC bn_div_words routine rewrite

2005-07-05 Thread David Ho
. -- Forwarded message -- From: Murch, Christopher [EMAIL PROTECTED] Date: Jul 1, 2005 9:46 AM Subject: RE: PPC bn_div_words routine rewrite To: David Ho [EMAIL PROTECTED] David, I had observed the same issue on ppc 8xx machines after upgrading to the asm version of the BN routines

Re: PPC bn_div_words routine rewrite

2005-07-05 Thread David Ho
: Jul 1, 2005 9:46 AM Subject: RE: PPC bn_div_words routine rewrite To: David Ho [EMAIL PROTECTED] David, I had observed the same issue on ppc 8xx machines after upgrading to the asm version of the BN routines. Thank you very much for your work for the fix. My

Re: PPC bn_div_words routine rewrite

2005-07-05 Thread Andy Polyakov
Let's take first call to BN_div_word for example from BN_bn2dec, the parameter being passed to BN_div_word is (a=35, w=10) (decimal numbers). It then calls the bn_div_words with (h=0, l=35, d=10) if you examine the code in linux_ppc32.s it will exit early on because h is 0. the

Re: PPC bn_div_words routine rewrite

2005-07-05 Thread David Ho
. I must say I was the unfriendly one, I apologize for that. More debugging evidence to come. -- Forwarded message -- From: Murch, Christopher [EMAIL PROTECTED] Date: Jul 1, 2005 9:46 AM Subject: RE: PPC bn_div_words routine rewrite To: David Ho

Re: PPC bn_div_words routine rewrite

2005-07-05 Thread Andy Polyakov
Okay, having actually did what Andy suggested, i.e. the one liner fix in the assembly code, bn_div_words returns the correct results. Note that the final version, one committed to all relevant OpenSSL branches since couple of days ago and one which actually made to just released 0.9.8, is a

Re: PPC bn_div_words routine rewrite

2005-07-01 Thread Andy Polyakov
The reason I had to redo this routine, in case anyone is wondering, is because ssh-keygen segfaults when this assembly routine returns junk to the BN_div_word function. On a ppc, if you issue the command ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N The program craps out when it tries to

Re: PPC bn_div_words routine rewrite

2005-06-30 Thread David Ho
The reason I had to redo this routine, in case anyone is wondering, is because ssh-keygen segfaults when this assembly routine returns junk to the BN_div_word function. On a ppc, if you issue the command ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N The program craps out when it tries to