Fully end to end encrypted anonymous chat program. Server only stores public key lookup for users and the encrypted messages. No credentials are transfered to the server, but kept in local browser storage. This allows 100% safe chatting.
https://safechat.ch
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
12 KiB
81 lines
12 KiB
{ |
|
"name": "openpgp", |
|
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.", |
|
"version": "2.3.3", |
|
"license": "LGPL-3.0+", |
|
"homepage": "http://openpgpjs.org/", |
|
"engines": { |
|
"node": ">=0.8" |
|
}, |
|
"keywords": [ |
|
"crypto", |
|
"pgp", |
|
"gpg", |
|
"openpgp" |
|
], |
|
"main": "dist/openpgp.js", |
|
"directories": { |
|
"lib": "src" |
|
}, |
|
"files": [ |
|
"src/", |
|
"dist/openpgp.js", |
|
"dist/openpgp.worker.js", |
|
"dist/openpgp.min.js", |
|
"dist/openpgp.worker.min.js", |
|
"test/unittests.js", |
|
"test/general", |
|
"test/crypto" |
|
], |
|
"scripts": { |
|
"pretest": "grunt", |
|
"test": "grunt test" |
|
}, |
|
"devDependencies": { |
|
"asmcrypto-lite": "^1.0.0", |
|
"babel-preset-es2015": "^6.3.13", |
|
"babelify": "^7.2.0", |
|
"chai": "~3.5.0", |
|
"es6-promise": "^3.1.2", |
|
"grunt": "~0.4.5", |
|
"grunt-browserify": "~5.0.0", |
|
"grunt-contrib-clean": "~1.0.0", |
|
"grunt-contrib-connect": "~1.0.2", |
|
"grunt-contrib-copy": "~1.0.0", |
|
"grunt-contrib-jshint": "~1.0.0", |
|
"grunt-contrib-uglify": "~1.0.1", |
|
"grunt-contrib-watch": "^1.0.0", |
|
"grunt-jsbeautifier": "~0.2.10", |
|
"grunt-jscs": "^3.0.1", |
|
"grunt-jsdoc": "~2.1.0", |
|
"grunt-mocha-istanbul": "^5.0.1", |
|
"grunt-mocha-test": "~0.12.7", |
|
"grunt-saucelabs": "8.6.2", |
|
"grunt-text-replace": "~0.4.0", |
|
"istanbul": "~0.4.1", |
|
"mocha": "~2.5.3", |
|
"rusha": "^0.8.3", |
|
"sinon": "^1.17.3", |
|
"whatwg-fetch": "~1.0.0", |
|
"zlibjs": "~0.2.0" |
|
}, |
|
"dependencies": { |
|
"node-fetch": "^1.3.3", |
|
"node-localstorage": "~1.3.0" |
|
}, |
|
"repository": { |
|
"type": "git", |
|
"url": "https://github.com/openpgpjs/openpgpjs" |
|
}, |
|
"readme": "OpenPGP.js [![Build Status](https://travis-ci.org/openpgpjs/openpgpjs.svg?branch=master)](https://travis-ci.org/openpgpjs/openpgpjs)\n==========\n\n[OpenPGP.js](http://openpgpjs.org/) is a Javascript implementation of the OpenPGP protocol. This is defined in [RFC 4880](http://tools.ietf.org/html/rfc4880).\n\n[![Saucelabs Test Status](https://saucelabs.com/browser-matrix/openpgpjs.svg)](https://saucelabs.com/u/openpgpjs)\n\n\n### Platform support\n\n* OpenPGP.js v2.x is written in ES6 but is transpiled to ES5 using [Babel](https://babeljs.io/) to run in most environments. We support node.js v0.12+ and browsers that implement [window.crypto.getRandomValues](http://caniuse.com/#feat=getrandomvalues).\n\n* The api uses ES6 promises which are available in [most modern browsers](http://caniuse.com/#feat=promises). If you need to support browsers that do not support Promises, fear not! There is a [polyfill](https://github.com/jakearchibald/es6-promise), which is included in our build. So no action required on your part!\n\n* For the OpenPGP HTTP Key Server (HKP) client the new [fetch api](http://caniuse.com/#feat=fetch) is used. There is a polyfill for both [browsers](https://github.com/github/fetch) and [node.js](https://github.com/bitinn/node-fetch) runtimes. The node module is included as a dependency if you install via npm, but we do not include the browser polyfill in our build. So you'll need to include it in your app if you intend to use the HKP client.\n\n\n### Performance\n\n* Version 2.x of the library has been built from the ground up with Uint8Arrays. This allows for much better performance and memory usage than strings.\n\n* If the user's browser supports [native WebCrypto](http://caniuse.com/#feat=cryptography) via the `window.crypto.subtle` api, this will be used. Under node.js the native [crypto module](https://nodejs.org/api/crypto.html#crypto_crypto) is used. This can be deactivated by setting `openpgp.config.use_native = false`.\n\n* The library implements the [IETF proposal](https://tools.ietf.org/html/draft-ford-openpgp-format-00) for authenticated encryption [using native AES-GCM](https://github.com/openpgpjs/openpgpjs/pull/430). This makes symmetric encryption about 30x faster on supported platforms. Since the specification has not been finalized and other OpenPGP implementations haven't adopted it yet, the feature is currently behind a flag. You can activate it by setting `openpgp.config.aead_protect = true`.\n\n* For environments that don't provide native crypto, the library falls back to [asm.js](http://caniuse.com/#feat=asmjs) implementations of AES, SHA-1, and SHA-256. We use [Rusha](https://github.com/srijs/rusha) and [asmCrypto Lite](https://github.com/openpgpjs/asmcrypto-lite) (a minimal subset of asmCrypto.js built specifically for OpenPGP.js).\n\n\n### Getting started\n\n#### Npm\n\n npm install --save openpgp\n\n#### Bower\n\n bower install --save openpgp\n\nOr just fetch a minified build under [dist](https://github.com/openpgpjs/openpgpjs/tree/master/dist).\n\n\n### Examples\n\nHere are some examples of how to use the v2.x api. For more elaborate examples and working code, please check out the [public api unit tests](https://github.com/openpgpjs/openpgpjs/blob/master/test/general/openpgp.js). If you're upgrading from v1.x it might help to check out the [documentation](https://github.com/openpgpjs/openpgpjs#documentation).\n\n#### Set up\n\n```js\nvar openpgp = require('openpgp'); // use as CommonJS, AMD, ES6 module or via window.openpgp\n\nopenpgp.initWorker({ path:'openpgp.worker.js' }) // set the relative web worker path\n\nopenpgp.config.aead_protect = true // activate fast AES-GCM mode (not yet OpenPGP standard)\n```\n\n#### Encrypt and decrypt *Uint8Array* data with a password\n\n```js\nvar options, encrypted;\n\noptions = {\n data: new Uint8Array([0x01, 0x01, 0x01]), // input as Uint8Array (or String)\n passwords: ['secret stuff'], // multiple passwords possible\n armor: false // don't ASCII armor (for Uint8Array output)\n};\n\nopenpgp.encrypt(options).then(function(ciphertext) {\n encrypted = ciphertext.message.packets.write(); // get raw encrypted packets as Uint8Array\n});\n```\n\n```js\noptions = {\n message: openpgp.message.read(encrypted), // parse encrypted bytes\n password: 'secret stuff', // decrypt with password\n format: 'binary' // output as Uint8Array\n};\n\nopenpgp.decrypt(options).then(function(plaintext) {\n return plaintext.data // Uint8Array([0x01, 0x01, 0x01])\n});\n```\n\n#### Encrypt and decrypt *String* data with PGP keys\n\n```js\nvar options, encrypted;\n\nvar pubkey = '-----BEGIN PGP PUBLIC KEY BLOCK ... END PGP PUBLIC KEY BLOCK-----';\nvar privkey = '-----BEGIN PGP PRIVATE KEY BLOCK ... END PGP PRIVATE KEY BLOCK-----';\n\noptions = {\n data: 'Hello, World!', // input as String (or Uint8Array)\n publicKeys: openpgp.key.readArmored(pubkey).keys, // for encryption\n privateKeys: openpgp.key.readArmored(privkey).keys // for signing (optional)\n};\n\nopenpgp.encrypt(options).then(function(ciphertext) {\n encrypted = ciphertext.data; // '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'\n});\n```\n\n```js\noptions = {\n message: openpgp.message.readArmored(encrypted), // parse armored message\n publicKeys: openpgp.key.readArmored(pubkey).keys, // for verification (optional)\n privateKey: openpgp.key.readArmored(privkey).keys[0] // for decryption\n};\n\nopenpgp.decrypt(options).then(function(plaintext) {\n return plaintext.data; // 'Hello, World!'\n});\n```\n\n#### Generate new key pair\n\n```js\nvar options = {\n userIds: [{ name:'Jon Smith', email:'jon@example.com' }], // multiple user IDs\n numBits: 4096, // RSA key size\n passphrase: 'super long and hard to guess secret' // protects the private key\n};\n\nopenpgp.generateKey(options).then(function(key) {\n var privkey = key.privateKeyArmored; // '-----BEGIN PGP PRIVATE KEY BLOCK ... '\n var pubkey = key.publicKeyArmored; // '-----BEGIN PGP PUBLIC KEY BLOCK ... '\n});\n```\n\n#### Lookup public key on HKP server\n\n```js\nvar hkp = new openpgp.HKP('https://pgp.mit.edu');\n\nvar options = {\n query: 'alice@example.com'\n};\n\nhkp.lookup(options).then(function(key) {\n var pubkey = openpgp.key.readArmored(key);\n});\n```\n\n#### Upload public key to HKP server\n\n```js\nvar hkp = new openpgp.HKP('https://pgp.mit.edu');\n\nvar pubkey = '-----BEGIN PGP PUBLIC KEY BLOCK ... END PGP PUBLIC KEY BLOCK-----';\n\nhkp.upload(pubkey).then(function() { ... });\n```\n\n### Documentation\n\nA jsdoc build of our code comments is available at [doc/index.html](http://openpgpjs.org/openpgpjs/doc/index.html). Public calls should generally be made through the OpenPGP object [doc/openpgp.html](http://openpgpjs.org/openpgpjs/doc/module-openpgp.html).\n\n### Security Audit\n\nTo date the OpenPGP.js code base has undergone two complete security audits from [Cure53](https://cure53.de). The first audit's report has been published [here](https://github.com/openpgpjs/openpgpjs/wiki/Cure53-security-audit).\n\n### Security recommendations\n\nIt should be noted that js crypto apps deployed via regular web hosting (a.k.a. [**host-based security**](https://www.schneier.com/blog/archives/2012/08/cryptocat.html)) provide users with less security than installable apps with auditable static versions. Installable apps can be deployed as a [Firefox](https://developer.mozilla.org/en-US/Marketplace/Options/Packaged_apps) or [Chrome](https://developer.chrome.com/apps/about_apps.html) packaged app. These apps are basically signed zip files and their runtimes typically enforce a strict [Content Security Policy (CSP)](http://www.html5rocks.com/en/tutorials/security/content-security-policy/) to protect users against [XSS](https://en.wikipedia.org/wiki/Cross-site_scripting). This [blogpost](https://tankredhase.com/2014/04/13/heartbleed-and-javascript-crypto/) explains the trust model of the web quite well.\n\nIt is also recommended to set a strong passphrase that protects the user's private key on disk.\n\n### Development\n\nTo create your own build of the library, just run the following command after cloning the git repo. This will download all dependencies, run the tests and create a minified bundle under `dist/openpgp.min.js` to use in your project:\n\n npm install && npm test\n\n### How do I get involved?\n\nYou want to help, great! Go ahead and fork our repo, make your changes and send us a pull request.\n\n### License\n\nGNU Lesser General Public License (3.0 or any later version). Please take a look at the [LICENSE](LICENSE) file for more information.\n\n### Resources\n\nBelow is a collection of resources, many of these were projects that were in someway a precursor to the current OpenPGP.js project. If you'd like to add your link here, please do so in a pull request or email to the list.\n\n* [http://www.hanewin.net/encrypt/](http://www.hanewin.net/encrypt/)\n* [https://github.com/seancolyer/gmail-crypt](https://github.com/seancolyer/gmail-crypt)\n* [https://github.com/mete0r/jspg](https://github.com/mete0r/jspg)\n* [http://fitblip.pub/JSPGP-Stuffs/](http://fitblip.pub/JSPGP-Stuffs/)\n* [http://qooxdoo.org/contrib/project/crypto](http://qooxdoo.org/contrib/project/crypto)\n* [https://github.com/GPGTools/Mobile/wiki/Introduction](https://github.com/GPGTools/Mobile/wiki/Introduction)\n* [http://gpg4browsers.recurity.com/](http://gpg4browsers.recurity.com/)\n* [https://github.com/gmontalvoriv/mailock](https://github.com/gmontalvoriv/mailock)\n", |
|
"readmeFilename": "README.md", |
|
"bugs": { |
|
"url": "https://github.com/openpgpjs/openpgpjs/issues" |
|
}, |
|
"_id": "openpgp@2.3.3", |
|
"dist": { |
|
"shasum": "895af415f7fb432aa454bac95da72974a9e04ca0" |
|
}, |
|
"_from": "openpgp@", |
|
"_resolved": "https://registry.npmjs.org/openpgp/-/openpgp-2.3.3.tgz" |
|
}
|
|
|