I am running a comparison between CLEFIA(Lightweight cipher from Sony Corporation which is a standard now http://www.sony.net/Products/cryptography/clefia/standard/index.html) and AES 128-bit.

The comparison is done on an android device. (Galaxy S3)

For CLEFIA's code, I have converted their official code which is in C to Java from here http://www.sony.net/Products/cryptography/clefia/download/data/clefia_ref.c, and for AES 128-bit I am using Java's Javax.Crypto packages.

What struck me is that, instead of CLEFIA being lightweight and running faster (needs less resources, less cycles, etc), it was AES which was actually faster, and a lot. (Around 150 times and even more).

I unfortunately was not able to test both on sensors where the computational power and battery life is really minimal compared to a mobile.

Has anyone had an experienced with a lightweight cipher versus AES? (If needed, I do not mind sharing my code)

  • 1
    $\begingroup$ Please note that the IP rights of CLEFIA are not well stated by Sony - even though they have been offered for standardization. Download any code from Sony at your own risk. $\endgroup$ – Maarten Bodewes May 3 '15 at 15:20
  • 2
    $\begingroup$ From their site: "You can use CLEFIA Information only for the purpose of your evaluation of CLEFIA. You may not develop or manufacture any products by using CLEFIA Information without the prior written approval of Sony. In addition, you agree not to quote, reprint, modify, port, translate, transform, create derivative works of or any other adapt CLEFIA Information, in whole or in part." Now this could be a leftover from the time before standardization, but it could also mean that Sony are a bunch of bastards. I'm not betting anyway. $\endgroup$ – Maarten Bodewes May 3 '15 at 15:45
  • $\begingroup$ @MaartenBodewes thanks for your lines. I will mainly use it for testing purposes. I know Clefia is way too far from being a nation wide standard like AES ... Btw, I was able to implement a java version of AES (optimisation free) and run the comparison. The results were at the favor of Clefia (as expected) speedwise. $\endgroup$ – tony9099 May 4 '15 at 7:14
  • $\begingroup$ That's interesting information Tony. This does point out a clear advantage about AES though; it's more widely implemented so you would expect more speed optimized implementations of it. Note that Bouncy Castle has 3 versions of AES in case you want to test further. $\endgroup$ – Maarten Bodewes May 4 '15 at 7:26
  • $\begingroup$ @MaartenBodewes that is absolutely correct. I will dig into it. By the way, when we say Optimised Version, what do we really mean? Optimised as in Hardware optimised? Less rounds? less code? etc.. $\endgroup$ – tony9099 May 4 '15 at 8:28

You benchmarked a highly optimized AES implementation against a reference implementation of CLEFIA:

 * This reference code is written for a clear understanding of the CLEFIA
 * blockcipher algorithm based on the specification of CLEFIA.
 * Therefore, this code does not include any optimizations for
 * high-speed or low-cost implementations or any countermeasures against
 * implementation attacks.

On top of that it's possible your phone's CPU has hardware acceleration for AES.

  • $\begingroup$ thanks for your reply. what do you mean by hardware acceleration for AES. Is there anyway I can locate an optimized version of Clefia? Besides, the difference in speed (150 to 450) is just tremendous. Do you think optimization would effect that much? Also, when we say optimized version, what do we really mean? If you can elaborate on these, I'd be grateful. $\endgroup$ – tony9099 May 2 '15 at 14:12
  • $\begingroup$ @tony9099 Sorry, all these questions can be answered by simple googling - not going to do that work for you. $\endgroup$ – orlp May 2 '15 at 14:29
  • $\begingroup$ I totally understand you. But I can't locate an optimized version of Clefia whatsoever, wheresoever :/ so I am kind of stuck. Anyways, thanks for the answer. $\endgroup$ – tony9099 May 2 '15 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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