Hi Vipul,
I'm built all the library files (except the tests). I built w/
LTC_SOURCE and only had a small # of warnings (I looked at them and
they aren't likely to cause a problem). When I just use LTC_NO_FAST
and ARGTYPE=3 then I got a lot of warnings about implicit/missing
prototypes (these can cause real problems; stack corruption and other
nasty stuff).
Of course I don't know if the files you are using/linking with have
these issues or not. I'd be a little wary of initially using IAR's
library versus tommath's library as the IAR libraries might not be a
"drop in" replacement.
I enabled multibyte char (you didn't mention this) and signed char in
the Project Options Language 2 tab (this is more like most compilers).
I got rid of most of the warnings (most are intuitively obvious); the
ones that I didn't fix were
der_encode_utf8_string.c
der_encode_utf8_string(const wchar_t *in ..)
if (in[x] < 0 || in[x] > 0x1FFFF)
pointless comparison of unsigned integer with zero
pointless integer comparison, the result is always false
similar warnings in der_length_utf8_string.c
(5 warnings total)
AFAICT wchar_t is an unsigned short int on IAR; not sure what it is
expected to be. I've never used UTF8 w/ encryption; these warnings
don't look like they would cause a problem.
Let me know a test that you are having issues with (or that uses the
encryption/decryption that you are trying to use) and I'll compile,
build, and run it. I used PolarSSL with IAR on an embedded ARM core
and it worked well (in many ways it is similar to tomcrypt). I chose
PolarSSL as it was delivered as part of the board support package for
the processor I was using (I was going to use tomcrypt until I found
it).
In general most of these packages require that the data to be
encrypted be padded out to some "arbitrary" boundary; this is the only
gotcha that I remember.
Note with IAR using file I/O you'll need to add heap space (I never
used file I/O after testing with the Simulator as the JTAG I/F was
missing from most of the boards and it was a PITA to get someone to
put one on the board and keep it working (I don't recommend debugging
this way; but I have > 15 years w/ ARMs so I can get by).
Good Luck,