-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 01.06.2012 14:47, schrieb Lukas Pitschl | Dressy Vagabonds: > Hi, > > Am 01.06.2012 um 14:39 schrieb Nils Kenneweg: > >> Signierter PGP Teil Am 28.05.2012 21:40, schrieb Simon Rothe: >>> Hello everyone, >>> >>> my name is Simon. OpenPGP.js is a great project, that made my >>> life a lot easier! Recently, I am working on an extension that >>> encrypts messages on facebook. For chrome I got the job done. I >>> am quite satisfied with my prototype. Hence it is my task now, >>> to port that code to firefox. Getting started with firefox >>> extensions is quite hard and I wounder about the best way to >>> include OpenPGP, because there are no background pages like in >>> chrome. I guess that someone of you might have a similar >>> problem (solved). >>> >>> If not, my approach is in that direction: >>> https://builder.addons.mozilla.org/addon/1054309/latest/ There >>> I try to rebuild the contentscript - background page >>> architecture of chrome. But I fail to send messages back from >>> the background page. I exposed that problem here >>> https://builder.addons.mozilla.org/addon/1053549/latest/ >>> Whenever I put "self.port.emit("Message2", "This is the >>> background page!");" into the function sendResponse() I get an >>> error and the extension breaks. >> >> I do not see the problem. It works fine for me. Firefox will give >> you another big problem as window.crypto.getRandomBytes is not >> available which is needed by OpenPGP. >> > > You could try to use the random number generator from Stanford > Javascript Crypto Library. > https://github.com/bitwiseshiftleft/sjcl/blob/master/core/random.js > > I'm not sure as how reliable it is, but they've published papers > on it describing the method the random numbers are generated.
Actually I do use it for my own cryptography stuff but integrating it into openpgpjs is a little bit more difficult as you would need to use sha256 from the sjcl guys as openpgp sha256 does not support "partial" hashes (adding new values to a hash and finalizing it at some point). As far as I know their approach is good but it depends a lot on how you move your mouse (if window.crypto.getRandomBytes) is not available. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPyLvYAAoJECvXQ9f0b0Ho9b4H/i4dW2B5ZqjuiV/0wiFxkzdt x3LF+Mlr3pXgY2Sxcv/kWNcYxtTkpJUjm1S3C218uedIHN3pREW0CPCS9AitTzOl MZSd0+ULXDLhHpxmYJfW9FLF/mKB73Q4pCP09JTAs0H2uupUImMiT7rvCLm7k1Ro 30+EzeWl2Xd0+QRV3VKPVOXNJa5CGDJu3jyFqCypRlu+9Az5j2udSK3SUk4ZwOMW nDDr0lGvpxotlq18HFfme8+iavZrihqxZIAiKO3We/AYXxmskekHys2smpQtFmQA h0L2glaE/3Nz0Yt8kSiB4Z8VLUcsXrQgsvtrL3/KT/cPNOFS3EzhtKfdrr4MFWE= =64VI -----END PGP SIGNATURE----- _______________________________________________ http://openpgpjs.org

