How to achieve a secure validation ticket in javascript

164 Views Asked by At

Is it possible to create a secure (not easily hackable/reverse engineered) server request token from javascript code (visible to anyone) which can be validated at the server side.

To understand the question better here is the scenario depicted as an diagram:

enter image description here

1

There are 1 best solutions below

0
On

Well, I don't know if my answer is what you need, however:

You can not have a safe way to encrypt with Javascript unless you are using SSL/TLS. But I think you will not need a JS program to encrypt your data since it is already encrypted by SSL/TLS.

The link below provides a better answer than mine: http://www.matasano.com/articles/javascript-cryptography/