Hi all,

I tried using the AES-assembler code for my PowerPC EABI, but everytime I start 
"speed aes" my OS crashes. The 32Bit OS is a custom one.

The first problem was the usage of r13. On Page 3 of the PowerPC EABI spec [1], 
the r13 register is described as a dedicated register.
So the usage of such a register is delicate.

I could not use it because it is forbidden in our startup code.
But at Line 101 of "crypto/aes/asm/aes-ppc.pl" I found a workaround for the 64 
bit case, which replaces r13 with r0.

# stay away from TLS pointer
if ($SIZE_T==8) { die if ($t1 ne "r13");  $t1="r0";             }
else            { die if ($Tbl3 ne "r2"); $Tbl3=$t0; $t0="r0";  }

So in the aes-ppc Perl source I replaced r13 with r0 at line 77, which made the 
line 538
        lwz     $t1,4($key)
execute smoothly.

I do not think it compromises the security since its just using a different 
register.

The second and much more delicate problem was the "LAES_Te" symbol: why do we 
need this piece of code? Would it be safe to leave it aside? I'm asking because 
this code (in my case) overwrites r3, therefore leaving me without access to 
the first argument of the whole function. Because the value of the link 
register is saved in r3, the "out" argument will point to the .text section, 
and thus the whole code will crash if the MMU prohibits accesses to this 
section.

Sincerely yours

Marius Peschke 


[1] 
http://www.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF77852569970071B0D6/$file/eabi_app.pdf
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to