Live data from Hacker News

Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

browserhash.com

11–20 of 26 posts

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#12
post #9
post #7

Earlier quoted context omitted.

I dont' really understand what you're saying here. Other services that calculate the digest of a file online require you to upload your file to the service/site where you don't know what they will do with it. With Browser Hash, not one bit of your file leaves your computer or travels over the network.

I think he means that the JavaScript that computes the hash can be MITM'd.

How would it be MITM'd? It all happens on your computer. Nothing travels over the network after the page is downloaded.

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#13
post #11

What is the license? I haven't looked too closely yet, but I might want to borrow some of the JS for a firefox plugin where I'd want to calculate hashes.

It looks like it just uses the js crypto libs from http://pajhome.org.uk/crypt/md5/

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#14
post #11

What is the license? I haven't looked too closely yet, but I might want to borrow some of the JS for a firefox plugin where I'd want to calculate hashes.

The code is up on github. I will add the MIT license soon (do what you want with the code).

The hash functions came from Paj here: http://pajhome.org.uk/crypt/md5/

IIRC, Firefox's add-on API already has an MD5 calculation method.

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#15
post #7
post #6

Earlier quoted context omitted.

You aren't worried that doing this via Javascript will make it insecure for that use? In almost the same manner as uploading your file to a server (simply to get the hash) would be?

I dont' really understand what you're saying here. Other services that calculate the digest of a file online require you to upload your file to the service/site where you don't know what they will do with it. With Browser Hash, not one bit of your file leaves your computer or travels over the network.

Tom's point is that you're serving the JavaScript and HTML over HTTP. So, the entire site can be man-in-the-middled.

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#16
post #9

Earlier quoted context omitted.

I think he means that the JavaScript that computes the hash can be MITM'd.

How would it be MITM'd? It all happens on your computer. Nothing travels over the network after the page is downloaded.

I think what xtacy means by MITM is that the javascript sent by the server might be MITM'd and altered to return a different value than the actual hash.

But for instance, if I'm trying to SHA1 a Windows 8 iso (the kind which I imagine would be by far the most common use case - in which a cryptographically secure hash algorithm isn't even a prerequisite any checksum would do).

It's not any worse than downloading the sha1sum app from any http site.

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#17
post #9
post #7

Earlier quoted context omitted.

I dont' really understand what you're saying here. Other services that calculate the digest of a file online require you to upload your file to the service/site where you don't know what they will do with it. With Browser Hash, not one bit of your file leaves your computer or travels over the network.

I think he means that the JavaScript that computes the hash can be MITM'd.

Well I guess I'm not so paranoid if you're worried about the JS being MITM'd :D

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#18
post #5
post #4

Earlier quoted context omitted.

This could be useful to validate large files after downloading them, e.g. ISO files for Linux distributions--however that goes out the window with the 10MB size limit. Why the limit? Does it take too long to compute hashes for larger files?

Absolutely agreed. It is due to the immaturity of the browser implementations, which will hopefully be fixed soon. It regularly crashes(!) Chrome on "large" files; thus, the limitation.

You could split up the file chunks by reading in sections (blob.webkitSlice and mozSlice) as array buffers and sending them to a worker object. Then you could process those in chunks with WebWorkers (or WebGL) and have a progress indicator.

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#19
post #8

Earlier quoted context omitted.

In this world where everything is done through a browser, where would I drop my files from? On a serious note, can one drop an attachment from say gmail onto that? And dear someone, please tell me that sha1sum & friends exists for Windows!

1. Haha, I agree that files will eventually become less accesible for the majority of computer users. Something like how the iPad handles projects/songs/documents instead of the generic "file". 2. Due to HTML5 limitations, you will need to drop the file from your local storage onto the browser window. 3. Yes you can get digests of a file on Windows, but it doesn't come with a built-in program.

There's a certain cool factor of file drag/drop but I think that the click-to-browse paradigm is useful on certain laptop trackpads where dragging isn't a pleasure and other situations. It would be nice if you made the drag area clickable (like min.us).

Re: Show HN: Calculate MD5, SHA-1 in your browser using HTML5 and WebWorkers

#20
post #7

Earlier quoted context omitted.

I dont' really understand what you're saying here. Other services that calculate the digest of a file online require you to upload your file to the service/site where you don't know what they will do with it. With Browser Hash, not one bit of your file leaves your computer or travels over the network.

Tom's point is that you're serving the JavaScript and HTML over HTTP. So, the entire site can be man-in-the-middled.

Quickly, someone, make an identical looking site that actually uploads whatever you drop on it! ;)
Post reply on HN