The Naked Scientists

The Naked Scientists Forum

Author Topic: In-browser encryption via javascript, is it secure ?  (Read 3554 times)

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8132
  • Thanked: 53 times
    • View Profile
#####  Encrypted: decrypt with http://www.fourmilab.ch/javascrypt/jscrypt.html
?HX?60ff740c620065ef5620b8c9bff47c3f3e063fa11112165107893744d46a
9c1ba783661ea4e4937ed3ba2ed1fef1149f9f535ae6557da799672fb8d5715f
8c7db7c4971c5fa356f1bdb2285f9f3795c49f94b311f21179c5e9242c7a2a2c
38fa248a1ca303b758f1375496e6085d67ca7c43df025957733c26d1551555d9
ec0eca42e132e2e4701bbc471bb15b3274cd13d4c98d27b64a172d33592efc47
0fd1f409276f2ae50276c447920c97b9a52dd274858c02667788079509aab5ee
c86d4aaf8621633398341881863a904c08f7f3b3b1ab886e41aa6ae39cdd6b1b
e1b26becfaaa59e0be56990e943e30ab80570a492f522f42213f45ab0900d4e4
bed11c4f8854a5ff5f1a7789f9c31007b5cdd9ad948e74161a077b25313e0ec1
18fc399871768a473cdbc592da96890c641d?H
#####  End encrypted message


http://www.fourmilab.ch/javascrypt/
« Last Edit: 05/04/2012 12:46:55 by RD »


 

Offline CliffordK

  • Neilep Level Member
  • ******
  • Posts: 6321
  • Thanked: 3 times
  • Site Moderator
    • View Profile
Re: In-browser encryption via javascript, is it secure ?
« Reply #1 on: 05/04/2012 14:43:34 »
It would help if you had chosen to send a decryption key.

Java, of course is a powerful programming language, so one could expect to be able to write encryption/decryption software in the language.  Obviously you have to trust the hosting site.

Java, of course, is mostly run on the client computers, so you have access the the algorithms.  That means that reverse engineering the program might be easier, as well as trying to see how much information is being captured by the host.

If the program was run on the server, the "black box" would be harder to crack, but you also would have less information about what the is being done with your data.
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8132
  • Thanked: 53 times
    • View Profile
Re: In-browser encryption via javascript, is it secure ?
« Reply #2 on: 05/04/2012 15:54:47 »
It would help if you had chosen to send a decryption key.

if someone could have deciphered it without the key that would have answered the question

the key is nakedscientists

I'd heard of javascript injection of malware, but I wasn't sure if such malware survived closing the browser (i.e. persistent).  If encryption / decryption was being performed by javascript into which malware has been injected then the secret info could be leaked.

[ May just be that my tinfoil hat is on too tight.  :) ]


Quote
a hacker can use a JavaScript injection attack to steal the values of browser cookies from other users. If sensitive information -- such as passwords, credit card numbers, or social security numbers – is stored in the browser cookies, then a hacker can use a JavaScript injection attack to steal this information. Or, if a user enters sensitive information in a form field contained in a page that has been compromised with a JavaScript attack, then the hacker can use the injected JavaScript to grab the form data and send it to another website.

Please be scared. Take JavaScript injection attacks seriously and protect your user’s confidential information.
http://www.asp.net/mvc/tutorials/older-versions/security/preventing-javascript-injection-attacks-cs
« Last Edit: 05/04/2012 17:55:22 by RD »
 

Offline Gordian Knot

  • Sr. Member
  • ****
  • Posts: 165
    • View Profile
Re: In-browser encryption via javascript, is it secure ?
« Reply #3 on: 09/04/2012 17:49:08 »
To repeat RD, Please be scared. The first successful Mac trojan got thru their safeguards through Java. It is estimated that some 600,000 Macs are infected!

Here is a site that helps you find out if you are one of the infected:

http://gizmodo.com/5899352/mac-flashback-trojan-find-out-if-youre-one-of-the-600000-infected
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8132
  • Thanked: 53 times
    • View Profile
Re: In-browser encryption via javascript, is it secure ?
« Reply #4 on: 09/04/2012 18:21:00 »
The first successful Mac trojan got thru their safeguards through Java.

There's Java and javascript, which are quite different ...

http://stackoverflow.com/questions/245062/whats-the-difference-between-javascript-and-java
« Last Edit: 09/04/2012 18:27:21 by RD »
 

Offline Gordian Knot

  • Sr. Member
  • ****
  • Posts: 165
    • View Profile
Re: In-browser encryption via javascript, is it secure ?
« Reply #5 on: 13/04/2012 15:24:00 »
Yes they are. And they are both dangerous for the holes in their security that the bad guys can use.
 

Offline syhprum

  • Neilep Level Member
  • ******
  • Posts: 3822
  • Thanked: 19 times
    • View Profile
Re: In-browser encryption via javascript, is it secure ?
« Reply #6 on: 13/04/2012 20:25:48 »
As one whose programing skills never got past elementry Basic I would appriciate some examples of what can be done in Java and the misnamed "Java script"
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8132
  • Thanked: 53 times
    • View Profile
Re: In-browser encryption via javascript, is it secure ?
« Reply #7 on: 13/04/2012 21:49:10 »
... I would appriciate some examples of what can be done in Java and the misnamed "Java script"

Javascript examples are available primarily to manipulate data on webpages, e.g. If you block your browser from using javascript when you compose a post in this forum, the controls for font size, italics, emoticons, etc don't appear : they are made possible by javascript in the webpage running in your browser.

https://en.wikibooks.org/wiki/JavaScript/First_Program

The arcanesanctum.net webpage calculates MD5 of a text string using javascript ... http://arcanesanctum.net/md5/
like the "fourmilab" encryption webpage at the start of this thread, you can save a copy of the webpage on your computer and run it in your browser without being connected to the internet.

« Last Edit: 13/04/2012 22:18:57 by RD »
 

The Naked Scientists Forum

Re: In-browser encryption via javascript, is it secure ?
« Reply #7 on: 13/04/2012 21:49:10 »

 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums