Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Assume a situation in which you want do some encryption procedures in your ARM microcontroller. (Receive a file, encrypt with 3DES and some hash functions and returning it, for example.)

As far as I know we have two option here:

  1. Reinventing the wheel! i.e. writing some functions to do described cryptography algorithms.
  2. Adding already-written libraries in our project and using their methods simply.

Now I want to benefit from the second solution using OpenSSL libraries. But I'm not sure about it! Is it possible to add these libraries to the IAR IDE? Shall I recompile the OpenSSL source code before adding to my program?

I really appreciate a step-by-step solution.

share|improve this question
1  
"Encrypt with ... and some hashes" -- multiple hashes does not provide security and may in fact introduce weaknesses. If you only plan to do different hashes on different inputs there's no problem though. –  მმმ yesterday

1 Answer 1

up vote 6 down vote accepted

Yes, you will need to recompile the library in IAR to be able to use it in your project. You can find step-by-step instructions in this answer.

I suggest to take a look at mbedTLS or Tiny SSL instead of OpenSSL, as your project will probably benefit from using a smaller library.

share|improve this answer
3  
Agreed - OpenSSL is a huge legacy package which is hard to work with. Consider also nacl.cr.yp.to . If you just want 3DES (obsolete!) and SHA-2, you can get those seperately as reference implementations. Don't forget to use the correct CBC mode, IV, key scheduling and padding modes! –  pjc50 yesterday
    
@pjc50 Can I use NACL in my ARM programs also? –  User1-St yesterday
    
As I want to do some Signature generation and verification I think the OpenSSL is the only option, right? –  User1-St yesterday
1  
I believe you need SHA-2 for this. It is implemented in mbedTLS as well. –  Dmitry Grigoryev yesterday
1  
NaCl is targetted at ARM: hyperelliptic.org/tanja/vortraege/20121129.pdf and can do signatures, although only crypto_sign_edwards25519sha512batch and not PGP-compatible signatures. –  pjc50 yesterday

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.