tags:

views:

110

answers:

2

I have a bootloader limited to 32K Bytes, when the DES is added (about 6384 Bytes), it exceeds the limit. So anybody know any DES implementation in ARM assembler as small as possible?

thanks!

+1  A: 

Why do you need this in the bootloader ? You want to crypt/trust your main software ? Anyway, one solution might be to add a lightweight decompressor, and compress a part of your bootloader code, and uncompress at runtime.

Adding more software to the blob might sound strange, but you should evaluate this option.

On this page, they claim to have a very small decompressor, which fit in 200 bytes of code. I guess they mean i386 code, but it looks quite small anyway.

shodanex
I want to encrypt an area in the bootloader which is a vulnerability may be manipulated by bad guys for piracy.you are right, compressing/decompressing is another method,and this small decompressor rocks!
wenlujon
A: 

Assembler isnt necessarily going to make it smaller or faster. Have you tried compiling in thumb mode? Are you using a processor that supports thumb mode?

dwelch
IXP425 and 8695, they do support Thumb mode.thanks for your pretty good suggestion.
wenlujon