Encrypt using Python and decrypt in jQuery/Javascript?
Question: I have some JSON data that I need to encrypt before sending it to the client
side. I can encrypt the data using pycrpto like this:

    
    
    from Crypto.Cipher import AES
    key = '0123456789abcdef'
    mode = AES.MODE_CBC
    encryptor = AES.new(key, mode)
    text = jsonData
    ciphertext = encryptor.encrypt(text)
    

And then I can send it to the client side. Now I need to use jQuery/Javascript
to convert the ciphertext to plain text. [jsaes](http://point-at-
infinity.org/jsaes/) is an implementation of AES in Javascript. Can it be used
to decrypt data back to plain text? Or is there any other library I can use to
complete this task?


Answer: Your straight forward answer is what Wes said.

However, there are problems of transmitting the key securely. (One could use a
private/public key mechanism but then, there's no point encrypting the data
because you already a P/P mechanism)

SSL/HTTPS were created for secure "transactions" between client and server, I
would advise you use those.

