{"_id":"chacha","_rev":"23-dae48dc3c7448392f1aefdbf2b6344c8","name":"chacha","description":"ChaCha20 Poly1305 auth cipher with a node api with pure js and native bindings","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"chacha","version":"1.0.0","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"_id":"chacha@1.0.0","dist":{"shasum":"7982308caea9f39fe58fb2f0092a769b1023def3","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.0.0.tgz","integrity":"sha512-1E0/YpqmIsiOJ0pgv72L4tdSXQyofv1+Bgo1xniV3/C/srohThs0pt3bC/EWeWDkXjaKuu0/Ieskk2lMGICaIw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCm7GBhqjIjj1fpgv+AHHneqHa0e9srp/sdlxCaoaSGAgIgI8hy5dp9r1Z+VYwL8Qk50l9e9cZ6/e1JFDRg5c+WS20="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}]},"1.0.1":{"name":"chacha","version":"1.0.1","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"_id":"chacha@1.0.1","dist":{"shasum":"897308187d56bcdc9e258cd31360d5d8c957bb78","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.0.1.tgz","integrity":"sha512-nJZc4a5QCSkwvQRI8ahFjrn/T0NHaUA6XFi9vqB4Z49y9qF3TQJGI6E0+FF7KpVPR/sfv9fZDPl1TO0/PBc5FQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcI4mirWkSsNGLgVaz+jDpbTyGfdue/Xd8wB3JekNUkQIhAN3yaMHdWvCCElOz/MB9+qDKIfW/yRR1gLsFMTNtxt8A"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}]},"1.0.2":{"name":"chacha","version":"1.0.2","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"_id":"chacha@1.0.2","dist":{"shasum":"5b80e59e1c66f6976bfec6e4f4d3f47f7274de99","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.0.2.tgz","integrity":"sha512-n08Q3kgGBsLz01IOczRQRP9A4/D8M2eHJS9LwwKACvWhZhxk2NvFshwUtn8KnRpIdQeFdcYA/bZdS2sPWIMVJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAD4Q/O/5BJuU6cdGLdNdFqNtgfTbClLg8ucF5rRzCfhAiAPhrhOKuNtCRh5dWUjUMR3xP+2C+XAvyClh11l5AQncQ=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}]},"1.0.3":{"name":"chacha","version":"1.0.3","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"_id":"chacha@1.0.3","dist":{"shasum":"ac7eaffcb3b806243403dd4819bc5ea4f86dc14d","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.0.3.tgz","integrity":"sha512-FMpAXi1Q0loAb6x1rpgKHJVIsx7cyJCLpSkft2DxQiJ3CJPWdAGGkMtPGLRzw39JYcIJdl6mbZ/KhS25b10uGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKwsW9uNrI218LwrZ96fO7ftTV6r/ogfw4Xh+xE3JS/QIgNb1DcMTKhMckLACo2UBJHSyQtaGk1MtFQVh+UtxzUB4="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}]},"1.0.4":{"name":"chacha","version":"1.0.4","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"inherits":"^2.0.1","readable-stream":"^1.0.33"},"_id":"chacha@1.0.4","dist":{"shasum":"ed1dcc83ec251c3a4035934cd82973d5374b5607","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.0.4.tgz","integrity":"sha512-jMWtUPSRyjHAi/igVMZ2VCwPIFeR/GFPizFxg4567aLoOMPp8PqahToHKH13e7bBMWHfMBYFYd2a4sU9fzhxCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCD8IdM4g238qvH7jH87j/RXOqhk8clHBva6Oje3ksmCAIhAOWJhs54DDCBE92gLM2jqd7cJP6tiVp+GHFNU282RTde"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}]},"1.0.5":{"name":"chacha","version":"1.0.5","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"inherits":"^2.0.1","readable-stream":"^1.0.33"},"_id":"chacha@1.0.5","dist":{"shasum":"89458f1c8aaf78ba70443875fd15d56a91c988af","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.0.5.tgz","integrity":"sha512-E5YgwR6jFNzAWWgIaCxjPi2e0GLyEn4zUbs0QJbUYNs1Qs0oM45rlnxKkwkheP/n1PunDlB+tcdL3rJ7g3ygJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPJipT+ty8LRkuFwsPHa8nrF+ml/agvTi8Ymru+t4R/gIgfMNU0IfTQ/4kMAYvevOOOzr4WtPgWSqH3TIT6AnExno="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}]},"1.1.0":{"name":"chacha","version":"1.1.0","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"inherits":"^2.0.1","readable-stream":"^1.0.33"},"_id":"chacha@1.1.0","dist":{"shasum":"3225c5a1a03f2dd74c72bd59e03d7c57d11d46c7","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.1.0.tgz","integrity":"sha512-2YjLMR4203fAkmnGJLZXtmx8SQI7Z6CF0KH88Qjt+m/11+JLNkDsw4ZT0rBdo66q9kKJhUkD2YKJA72q6anbtQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDT2Oh+AV7Ig7dObDVtPQRnfKbtQSG9FuWUxBtNR5FvRwIhANlPHfdijOHibnTE3Fngwpasi7XkOJBvuQjsrenzRsWa"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}]},"1.1.1":{"name":"chacha","version":"1.1.1","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"inherits":"^2.0.1","readable-stream":"^1.0.33"},"gitHead":"d3623ab1a254bd6866bb0b8fc9754ed697088706","_id":"chacha@1.1.1","_shasum":"5aac75447a5f264a3a2ed83cd5f91ac6e56ffbe6","_from":".","_npmVersion":"2.1.10","_nodeVersion":"0.11.15","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}],"dist":{"shasum":"5aac75447a5f264a3a2ed83cd5f91ac6e56ffbe6","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.1.1.tgz","integrity":"sha512-f2C3+cOvOVh+Z+jZfOfSnaHvFWR198eXScj8pW00p4digmgq9SmhyWS8H5tx0a580AD1RSDGXy2qsxDiw72E1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEm18vaoeHRfNObRL9b7+dRLg/wyrNOUJRFjDjskiE/DAiA+hElXWOS6/1oMvZW5/mB1BVIfAaTjH0/OMumhqj4ScA=="}]}},"1.1.2":{"name":"chacha","version":"1.1.2","description":"ChaCha20 Poly1305 auth cipher with a node api in pure js","main":"index.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"inherits":"^2.0.1","readable-stream":"^1.0.33"},"gitHead":"71cda948a8197d665fcecba7a287e5a90fe96a17","_id":"chacha@1.1.2","_shasum":"65ccfcd8766313378ccbf7ffdde245b6ba19807d","_from":".","_npmVersion":"2.7.0","_nodeVersion":"1.5.1","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}],"dist":{"shasum":"65ccfcd8766313378ccbf7ffdde245b6ba19807d","tarball":"https://registry.npmjs.org/chacha/-/chacha-1.1.2.tgz","integrity":"sha512-O2g8XxfPsuonJIbrGIkF/UMljBDIiN1gVph/CvkV8pz+4qPla7NDF2kWOxxHfWti0DQO13rHjhriET6/3R/JKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEmkfZoLcoFSnswNa9wsFW17eNGazidqnVgnb0KdY00wAiBNl5gw2QGPZykYmsZucYgDqhyKDbW2pJwYJH298wIa4Q=="}]}},"2.0.0":{"name":"chacha","version":"2.0.0","description":"ChaCha20 Poly1305 auth cipher with a node api with pure js and native bindings","main":"index.js","browser":"browser.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"inherits":"^2.0.1","readable-stream":"^1.0.33","chacha-native":"^1.1.0"},"optionalDependencies":{"chacha-native":"^1.1.0"},"gitHead":"c870e040d708a01dcac4ac6fc14ef83ee0572d27","_id":"chacha@2.0.0","_shasum":"2ddc6d999880d1bd47fca9720e240e5f87861beb","_from":".","_npmVersion":"2.7.0","_nodeVersion":"1.5.1","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}],"dist":{"shasum":"2ddc6d999880d1bd47fca9720e240e5f87861beb","tarball":"https://registry.npmjs.org/chacha/-/chacha-2.0.0.tgz","integrity":"sha512-RfCZyg76oLWKhJl4M4Sdx8fDzkPJuPDIaYftNPZRZnJSNjgUaZcMAftAou/omm+5N+W5NGkVJe8YN+rz2hOO3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDnwZCzwJUml1K4DSlXilY6vYtE/B4W2CcbVnHx9SWoAiEA5fUYNsWMROMheNwO8BAHQUXvgG2C1RAXbq6U2NLqlig="}]}},"2.1.0":{"name":"chacha","version":"2.1.0","description":"ChaCha20 Poly1305 auth cipher with a node api with pure js and native bindings","main":"index.js","browser":"browser.js","scripts":{"test":"tape test/*.js | tspec"},"keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"license":"MIT","bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"inherits":"^2.0.1","readable-stream":"^1.0.33","chacha-native":"^2.0.0"},"optionalDependencies":{"chacha-native":"^2.0.0"},"gitHead":"f0bc660854f1cf6d32f336729e6fadb7423a4657","_id":"chacha@2.1.0","_shasum":"f4d57c8768a1b4206e9967f858b48da7dd28eaa6","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.5.0","_npmUser":{"name":"cwmma","email":"calvin.metcalf@gmail.com"},"dist":{"shasum":"f4d57c8768a1b4206e9967f858b48da7dd28eaa6","tarball":"https://registry.npmjs.org/chacha/-/chacha-2.1.0.tgz","integrity":"sha512-FhVtqaZOiHlOKUkAWfDlJ+oe/O8iPQbCC0pFXJqphr4YQBCZPXa8Mv3j35+W4eWFWCoTUcW2u5IWDDkknygvVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChxu3ZY2S4+RzgvpdGNV+smtfTzYdG87gM18qV3Bd04gIhALTD0tHeSojK0QEIt+DnZx6JeSqmKSIW2F+t64VLYF03"}]},"maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}]}},"readme":"ChaCha [![Build Status](https://travis-ci.org/calvinmetcalf/chacha20poly1305.svg?branch=master)](https://travis-ci.org/calvinmetcalf/chacha20poly1305)\n====\n\n\nChaCha20 Poly1305 implementation based on this [repo](https://github.com/devi/chacha20poly1305), test vectors are from this [ietf draft](https://tools.ietf.org/html/draft-irtf-cfrg-chacha20-poly1305-03) and boringssl.  Note there are 2 versions of the chacha20/poly1305 aead, an [earlier draft](https://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04) and a modified version with a longer nonce, shorter counter and different tag generation.  This is the more recent version, boringssl implemented the older version which is also included.\n\nBy default in node it attempts to use [native bindings](https://github.com/calvinmetcalf/chacha-native) and falls back to using the pure js implimentation. In the browser it defaults to the pure js one.  To use the pure js one in node `require('/chacha/browser');`.\n\nAPI\n===\n\n```js\nvar chacha = require('chacha');\n```\n\n# ChaCha20 Poly1305\n\n```js\nvar cipher =  chacha.createCipher(key, nonce);\nvar decipher =  chacha.createDecipher(key, nonce);\n```\n\nCreate a cipher object by passing it a 256 bit key and 96 bit nonce, API is identical to crypto.createCipheriv()/createDecipheriv in node >= 11 with a gcm mode, in other words, e.g.\n\n```js\ncipher.setAAD(nonencrypteddata);// must be called before data\nvar tag = cipher.getAuthTag();// must be called after finish or end\n\ndecipher.setAAD(nonencrypteddata);// must be called before data\ndecipher.setAuthTag(tag);// must be called before data\n```\n\ndecipher with throw if you don't set a tag or the tag doesn't match. See the [node docs](https://github.com/joyent/node/blob/cfcb1de130867197cbc9c6012b7e84e08e53d032/doc/api/crypto.markdown#cryptocreatecipherivalgorithm-key-iv) for more info (the iv length for gcm is also 96 bit fyi).\n\n# ChaCha20\n\n\n```js\nvar cipher =  chacha.chacha(key, nonce);\n```\n\nThe API is identical to a cipher/decipher object in node >= 10. Encryption and decryption are the same.\n\n# Poly1305\n\n```js\nvar hmac =  chacha.createHmac(key);\n```\n\nAPI is identical to an hmac in node, so it's a stream with update and digest methods.\n\n# Legacy Aead\n\nA variant version of the aead that is compatible with boringssl.\n\n```js\nvar cipher =  new chacha.AeadLegacy(key, nonce);\nvar decipher =  new chacha.AeadLegacy(key, nonce, true);\n```\n\nThe third parameter is whether it should decipher, otherwise identical to createCipher/createDecipher. Doesn't implement variable length tags.\n","maintainers":[{"name":"cwmma","email":"calvin.metcalf@gmail.com"}],"time":{"modified":"2022-06-13T05:50:42.441Z","created":"2014-11-18T21:39:12.987Z","1.0.0":"2014-11-18T21:39:12.987Z","1.0.1":"2014-11-18T21:41:09.345Z","1.0.2":"2014-11-18T21:42:23.891Z","1.0.3":"2014-11-18T23:35:45.440Z","1.0.4":"2014-11-19T00:32:13.325Z","1.0.5":"2014-11-19T16:19:47.191Z","1.1.0":"2014-11-21T21:26:53.225Z","1.1.1":"2015-01-21T22:37:02.481Z","1.1.2":"2015-03-16T16:48:57.184Z","2.0.0":"2015-03-17T20:20:10.244Z","2.1.0":"2015-09-10T20:11:25.375Z"},"homepage":"https://github.com/calvinmetcalf/chacha20poly1305","keywords":["chacha20","chacha","poly1305","cipher","hmac","crypto"],"repository":{"type":"git","url":"git://github.com/calvinmetcalf/chacha20poly1305.git"},"bugs":{"url":"https://github.com/calvinmetcalf/chacha20poly1305/issues"},"license":"MIT","readmeFilename":"readme.md"}