Be careful with old versions!
These versions are displayed for reference and testing purposes. You should always use the latest version of an add-on.
Thanks to Daniel Haag for sending a patch.
Sorry for the delay on this update.
There is also mozCipher.sym.wrapKey(), which takes a cipher object and re-encrypts the symmetric key used to protect the data with another user's public key.
All symmetric keys are encrypted with a public key for security, using wrapKey allows you to share the encrypted data with other users just by re-wrapping the key.
The domcrypt test page illustrates how all of the APIs operate: http://mozilla.ddahl.com/domcrypt/tests/test-domcrypt.html
The script is here: http://mozilla.ddahl.com/domcrypt/tests/test-domcrypt.js
The entire API has changed to an asynchronous model, so this is not compatible with previous releases, however, this is the future direction of the API. All crypto operations take place on a worker thread, so this keeps the UI. The Spec for the DOMCrypt API is here: https://wiki.mozilla.org/Privacy/Features/DOMCryptAPISpec/Latest