Please suggest the best way in which we encrypt in JavaScript and decrypt in java based on shared key.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are a few shared-key encryption libraries out there. Just make sure to use one that you can run in Java. One I’ve found useful is Daniel Rench’s Blowfish library.
I would be generally be very reluctant to do anything serious with any in-browser implementation, mainly because I seriously doubt the peer review of JS encryption is thorough enough to adequately trust. I completely dismiss the criticisms of JS-based encryption as being inherently weaker than other client-based tool, though. Just because you can debug a JS script in the browser and is the code exists in plaintext doesn’t mean it’s any different inherently than any other client-based encryption system. “Easier” does not mean “less secure”. Any encryption software that runs outside of a secure system is equally at risk of tampering and manipulation no matter what. And, if implemented correctly, a JS cypher tool shares the same weaknesses of all similar tools and no more.