Hi Ehsan,
On 01/07/2018 07:11 PM, Ehsan Ae wrote:
>
> Happy new year steffen!
thanks! to you too.
> I successfully built the RSA key encryption sample (from crypto.pdf) on
> KEIL and in the meanwhile enjoyed the level of modularity you made using
> C (and not C++ :) ).
You have to thank Tom ;)
> I fact, the program size is something around 500KB now, while my device
> has only 128KB ROM. I made an effort on the compiler to trim all unused
> functions ( specifically in mpi.c) automatically but still not sure how
> much compact ltc could be.
Uhm, I luckily never had to squeeze it that much...
> I was wondering if you had rough code size numbers from the times you
> have linked the library? I know the underlying CPU architecture can
> significantly affect the machine code size, but I can still figure out
> to buy another device or still continuing with code optimization.
Sorry, I can't give you any real numbers.
But I'll be happy to see some :)
I've just built mpi.o and the comment regarding RSA-only compilation in
tommath_superclass.h should be revised...
I tried building:
x86_64: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5)
i386: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) with "-m32"
ARM: gcc-arm-none-eabi-5_4-2016q3 5.4.1
with "-O3":
x86_64 = 73KiB
i386 = 53KiB
ARM = 46KiB
with "-Os":
x86_64 = 31KiB
i386 = 23KiB
ARM = 21KiB
I only built mpi.o, didn't build an application from it neither test it,
but from these numbers I guess it should be possible to squeeze an RSA
test in 128KiB ROM... more ROM would as usual be better as it would ease
a lot of things...
FYI: I'm pretty sure you'll have to strip down ltc by hand to be able to
fit the tests in 128K. ltc is somewhat configurable, but not down to
that level.
Cheers,
Steffen
> > an email to
libtom+un...@googlegroups.com <javascript:>
> > <mailto:
libtom+un...@googlegroups.com <javascript:>>.
> <javascript:>
> > <mailto:
lib...@googlegroups.com <javascript:>>.
> Steffen Jaeckel -
s_ja...@gmx.de <javascript:>
> GnuPG fingerprint: C438 6A23 7ED4 3A47 5541 B942 7B2C D0DD 4BCF F59B
> My OTR key has changed on 30. Sept. 2015!
> jabber:
jae...@jabber.ccc.de <javascript:> F052DE29 4FA9A02D