3

I need C versions of AES-128 and DES to run on an embedded SPARC processor. I'm trying to measure the electrical power of these algorithms in software and hardware. Is there a website where I could find software implementations? Currently I can compile C code with my cross-compiler so any language implementations other than C would not be useful.

I have implemented DES in hardware before. How much work would people estimate (hours/lines of code) to implement a software version?

Does anybody know how to use the aes_generic.c and des_generic.c built into the Linux kernel in the crypto directory?

Stuart
  • 1,733
  • 4
  • 21
  • 34
  • When you say "the power of these algorithms", are you talking about cryptographic strength? If so you should know DES is by no means safe for modern use; it is interesting only in a historical context. – phs Jul 28 '12 at 01:24
  • I guess that is ambiguous. I meant the electrical power consumption. – Stuart Jul 28 '12 at 01:25
  • I used OpenSsl library, it is good library. – hmmftg Jul 29 '12 at 00:21
  • 1
    If you're doing embedded cryptography you should be aware of [power analysis](http://scholar.google.com/scholar?q=power+analysis+attacks). – zwol Jul 29 '12 at 00:41

2 Answers2

2

You may want to see if LibTomCrypt will meet your needs

Michael Burr
  • 333,147
  • 50
  • 533
  • 760
  • Thanks for the suggestion, but I checked it out and it seems too complicated. – Stuart Jul 28 '12 at 23:59
  • This is what I ended up using, but learning curve was higher than I wanted. It took me about 1-2 hours to figure out how to use the library and probably a couple more hours to get what I wanted. – Stuart Jul 26 '13 at 22:38
1

Wikipedia has a list of AES implementations. Simple googling also found a DES implementation in C; you'll have to see if it fits your requirements.

phs
  • 10,687
  • 4
  • 58
  • 84