0

i need to encrypt a string in a client using javascript and need to decrypt it in a Ruby on Rails Server.

i want to use AES.

What are the best couple of script/library/method to do this?

Dabidi
  • 397
  • 5
  • 14
  • First you need to figure out what you really need. Then you can decide what kind of encryption mode and key exchange you need, or if TLS serves your needs better than any javascript crypto. Only once you figured all that out look into implementing it. – CodesInChaos May 16 '12 at 09:10

1 Answers1

1

Think hard about what exactly you need to do this for.

If you need to ensure that the data from your page that the user has input is transmitted securely to the server without being interceptable and decryptable on the way through and you want to be confident about doing that, then the obvious, well tested and well maintained way of doing that is to use HTTPS for your communications.

If you want to do AES on your page for giggles, then this question covers AES on the client and Ruby can talk to OpenSSL pretty easily on the server.

Community
  • 1
  • 1
glenatron
  • 11,018
  • 13
  • 64
  • 112