views:

51

answers:

1

I'm hoping you can prove me wrong here (please, please, please! ;). I have a situation where I need to download encrypted data from a Server D (for "Data"). Server K (for "Key") has the encryption key. For security sake, I would really prefer that Server D never know the key that Server K knows. What I want is my client (e.g. your browser) to connect to Server D for the data and Server K for the key and doe the decryption locally so the unencrypted stuff never leaves your computer.

I can do this fine for text areas in the dom by replacing the contents of the HTML. However, sometimes, I would like to do larger files that I stream to the file system. For instance, perhaps I want to encrypt a movie and decrypt it and stream the contents to the my video player.

I am not a JavaScript guru by any stretch, especially when it comes to the edge cases of things like the security sandbox.

For Small D, I can handle the decryption, but I don't know how to save the decrypted file. Large D seems problematic as memory runs out.

Anybody have any ideas that don't involve native plugins?

Thanks!

+1  A: 

You could generate a data: URL and add a link to it to the document using only javascript. This is unlikely to be a good idea for large data sizes, though.

Baffe Boyois
Unfortunately, IE's restrictions on data URIs are too strict to make it useful for us. If only there was a world without IE... :)
Travis Jensen