WHY CAN'T I USE TLS/SSL TO DELIVER THE JAVASCRIPT
CRYPTO CODE?
You can. It's harder than it sounds, but you safely
transmit Javascript crypto to a browser using SSL. The
problem is, having established a secure channel with SSL,
you no longer need Javascript cryptography; you have "real"
cryptography. Meanwhile, the Javascript crypto code is still
imperiled by other browser problems
My minor quibble is that there are other reasons one might want cryptography besides establishing a secure channel, and so using SSL does not necessarily solve whatever problem one was trying to solve with JavaScript.For instance, the client might need data that is stored encrypted on the server, and you want to do the decryption on the client.