user695663
user695663

Reputation: 12346

Javascript or Jquery Encryption techniques

I would like to have a public key encryption where i want some javascript function to encrypt some data. Is there any Javascript encryption techniques with high security?

Thanks

Upvotes: 4

Views: 8469

Answers (4)

Dustin Wilhelmi
Dustin Wilhelmi

Reputation: 1799

Javascript AES encryption provides a good solution to this question.

I think that encrypting things with javascript can work just fine, if you have a good use case for it. The fact that the code is open shouldn't matter at all, because encryption algorithms are well known anyway. Where you are going to run into problems is the way in which the private key is supplied. DO NOT put the private key in your javascript code. The key should be provided by the user only. As long as you follow that rule, you should be good.

Upvotes: 8

Tudor Constantin
Tudor Constantin

Reputation: 26861

If you put your web page(s) under https, then ALL your data will be encrypted, no need for additional algorithms/libraries/headaches

Upvotes: 0

blackbourna
blackbourna

Reputation: 1233

javascript code is in plain view online so any encryption method via javascript will be plainly visible, i don't think there's any realistic way to do that without using a server side language (i.e. php)

Upvotes: 0

John Green
John Green

Reputation: 13435

I would generally suggest that there is little reason to encrypt anything in JavaScript. If you need to transport something over the wire, utilize a secure wire protocol instead.

JavaScript has a number of deficiencies for this sort of thing, not the least of which is the fact that it sits in very accessible memory space if used in a browser context.

Upvotes: 0

Related Questions