How to use AES with GAE python?
Question: I would like to encrypt the data transferred between GAE app and my android
application (_https_ will not help since the key should be dynamic). I am
thinking about AES (128-bit) encryption.

I've tried to use `pycrypto` (GAE SDK 1.8.6, python 2.7, OS X 10.9):

    
    
    libraries:
    - name: pycrypto
      version: "2.6"
    

But when I `import Crypto` it can not find the module:

    
    
    ImportError: No module named Crypto
    

Is there any other built-in module I can use? Or, is there any way to be able
to use `pycrypto` (should I install it manually)?


Answer: This happens to be an App Engine supplied module, as detailed here:

<https://developers.google.com/appengine/docs/python/tools/libraries27>

> The Python 2.7 runtime includes some third-party modules. Some of these are
> available by default; others are only available if configured. You can
> specify which version you want to use.
> <https://developers.google.com/appengine/docs/python/python25/migrate27#Configuring_Libraries>

To enable included libraries edit your app.yaml like this:

    
    
    libraries:
    - name: pycrypto
      version: latest
    

In general you'd need to add the files themselves to the same directory that
app.yaml is in, as per this question: [Uploading python third party libraries
with Google App engine](http://stackoverflow.com/questions/10648256/uploading-
python-third-party-libraries-with-google-app-engine) but this happens to be a
supplied library.

