Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Any Data Encryption Libraries?

12 views
Skip to first unread message

Jeremy Gillick

unread,
Oct 4, 2006, 3:36:48 PM10/4/06
to
For my new extension I need to save user entered information safely to a file on their computer.
Ideally I would encrypt the content first. Are there any built-in libraries my extension can use to
do this? I don't want to use C or C++ code in the extension if I don't have to (don't want to
compile and test for all OSes).

Thanks,
Jeremy

Eric H. Jung

unread,
Oct 4, 2006, 9:32:44 PM10/4/06
to dev-ext...@lists.mozilla.org
Hi Jeremy,

You have a couple options:

1. You can use nsISecretDecoderRing.encryptString() and nsISecretDecoderRing.decryptString(). However, I'm not sure how/if that works if the user hasn't defined a master password in Options->Security->Use a master password. Worth investigating, though.

2. You can AES-128 or AES-256 symmetric encryption via aes.js. The only issue then becomes where to store the key. See how I use AES-256 with PasswordMaker here: http://tinyurl.com/pp79t (http://passwordmaker.org/passwordmaker.html also encrypts its cookies with AES-256).

FYI, PasswordMaker is not unlike your SecurePassword Generator.

Regards,
Eric
p.s. how does one get a job at Yahoo! :)

Thanks,
Jeremy
_______________________________________________
dev-extensions mailing list
dev-ext...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-extensions

0 new messages