Storing API keys in Android, is obfustication enough?

Posted by fredley on Stack Overflow See other posts from Stack Overflow or by fredley
Published on 2011-01-12T17:27:04Z Indexed on 2011/01/12 17:54 UTC
Read the original article Hit count: 199

Filed under:
|
|

I'm using the Dropbox API. In the sample app, it includes these lines:

// Replace this with your consumer key and secret assigned by Dropbox.
// Note that this is a really insecure way to do this, and you shouldn't
// ship code which contains your key & secret in such an obvious way.
// Obfuscation is good.
final static private String CONSUMER_KEY = "PUT_YOUR_CONSUMER_KEY_HERE";
final static private String CONSUMER_SECRET = "PUT_YOUR_CONSUMER_SECRET_HERE";

I'm well aware of the mantra 'Secrecy is not Security', and obfuscation really only slightly increases the amount of effort required to extract the keys. I disagree with their statement 'Obfustication is good'. What should I do to protect the keys then? Is obfustication good enough, or should I consider something more elaborate?

© Stack Overflow or respective owner

Related posts about android

Related posts about keys