开发者

Best encryption library for mobile devices?

Hello I have been using LibTomCrypt to use SHA1 encryption ( for data integrity checking ) on mobile devices (iPhone OS and Android for the moment ). I was wondering if anyone is using anythin开发者_运维问答g else, things to consider are Portability ( C preferred but C++ is also an option ), and libraries size ( small == better for my particular needs ).

Thanks


You might write a wrapper class that calls CommonCrypto routines if you're on an iPhone, to reduce your library size requirements and enforce portability. Your wrapper, for example, would call other routines if compiled on another platform. The nice thing about CommonCrypto is that it is pre-built by Apple. Calls to it are also entirely in C.


For size/speed -- you can get Openssl to generate flattened assembly for certain processors. I suggest you look into the build directories to see what is possible. I usually build my own Openssl library based on what I need.


I've looked a lot of libraries, and in the end I ended up going with "TomCrypt", for the following reasons:

1) Excellent portability. You can customize the library in a very very easy way in order to almost assure portability between lot's of devices.

2) Very modular, I could (in a very easy way) pick up and compile only the encryption algorithms I needed for my particular application, ( in this example it was SHA-1 and a couple of others)

3) Very very lightweight. Because of the modularity, it ended up being a very lightweight addition to my code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜