Hey Forum,

I need to perform some encryption operations using the Paillier homomorphic encryption algorithm in the browser of the user. I can't have the server do it because the server is not allowed to have the values being operated on for security reasons.
There is a Java library here: http://code.google.com/p/thep/. I'm using this code on the server as well to do its part of the encryption. What I need is some way to get this Java code to work as JavaScript in the browser. Applets can't be used because my users don't necessarily have it (or allow it).

I tried using GWT but it doesn't actually convert anything, it just runs everything on the server and lets a frontend talk to this server using AJAX requests. I'm also familiar with GWT-Exporter (http://code.google.com/p/gwt-exporter/), this one doesn't work because it cannot handle imported Java classes. The third thing I looked at was Zebra (http://gravitysoft.org/doku.php?id=h...avascript_code). The online converter is limited to 2000 characters and I can't make heads or tails of the website. Finally I tried Java2Script (http://j2s.sourceforge.net/), it was the most promissing but also ultimately doesn't work because it doesn't include the java.math package which my crypto code heavily relies on.

Do you guys have a good idea how I can get this done?
- Must run in browser
- Must be JavaScript
- Must perform Paillier homomorphic encryption

thanks
Jurgen