I am working on a project that will involve symmetric AES 128 bit encrypted communication between an Android application and a bluetooth device. Are there any public AES libraries available for Android that include countermeasures against simple and differential power attacks?

What other techniques might I utilize within the app to protect from side channel attacks?

I have seen demonstrations showing what appears to be an iPhone having AES keys easily compromised through relatively simple side channel analysis. Is Android just as vulnerable?

  • One key-word to look for is "bit-sliced". Nov 1, 2012 at 20:59
  • 1
    Probably best asked on the Bouncy Castle mailing list, but I'm pretty sure they use a relatively safe implementation. The are certainly aware of timing attacks, e.g. "This version of the provider has been specifically reviewed to eliminate possible timing attacks on algorithms such as GCM and CCM mode." Nov 2, 2012 at 1:19
  • Just a dumb question, where is there an AES on a smarphone? I have no idea of what kind of application can use this algorithm (same for an ECC based algorithm).
    – user18061
    Dec 25, 2012 at 22:39

1 Answer 1


I am not aware of any public crypto library with countermeasures against side-channel attacks based on power analysis against AES (or any other symmetric cipher). There are 2 good reasons not to even think to write them:

  1. Loads of techniques are patented. You may receive a take-down notice very quickly.
  2. With power analysis, you must have physical access to the device and in most cases you also need to be able to run arbitrary code on the device. For smartphone apps, it is much easier for the attacker to lift the key via traditional means (e.g. jailbraking).

Simply put, don't use important AES keys in an Android phone (or iPhone) if your attackers have physical access to it. Note that in the video the first attack was mounted on a weak implementation of ECC, not on AES.

You may prefer to address more likely side channel attacks where the attacker operates from remote, like timing attacks, cache attacks, or padding oracle attacks.

Effective countermeasures can be done at the protocol level, independently of the AES library. Otherwise, you could consider using the Android NDK and the NaCl library.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .