{"_id":"tssrp6a","_rev":"15-0b7735246836fb363191d188dc0f24f2","name":"tssrp6a","dist-tags":{"latest":"3.0.0","beta":"1.1.0-beta-4"},"versions":{"1.0.0":{"name":"tssrp6a","version":"1.0.0","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc index.ts --target es6 --module commonjs --outDir dist --sourcemap","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","_id":"tssrp6a@1.0.0","dist":{"shasum":"e88fc9a5a99c2bded635e00b4a927fba85b1b45c","integrity":"sha512-KF9diWICDcQRuNaVSr9l9K17IhTl2+BNe7pMY+c0dF2q0Dc7ksN6Uvt5ytnsfPXalsH/NTDqjRzj7UKA0ATQxQ==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.0.0.tgz","fileCount":24,"unpackedSize":72106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyxWtCRA9TVsSAnZWagAAxOoP/3m71yvhEA5/Ro/2x3uu\nwqPqzpTEXreETwlnhVdC4C4bL1AaQNJ54k1uvRlW+lM5xS5AL6TXe1HgOT25\nl2bmcjxogsd1opD7cEgpM9Y2HEvCUgisT5K5FooywGDvgsjV7deOgsP7gsyj\n0QbBqLjTMK+WRyOhB1NJtbWIABi2BEhJ2cAt1Kb8SYFUb/BD3Le/xk/9lSBG\nOWt9HiqYiHLa/CNoJMa4+3oeRBHPmJbIT1tIWlBgwnCK0VQlEpQo5nnLPsMg\no7ca0BndJ7Gs4rET1+48t5+IWs7kj/nG/xWibLKgM9j0Auua+ueZg0eIUmZi\n5NDPbR099HRyZbz+fzuyoAndhCMo/Dj4iEE4Z3rEZZRz4xEXRs0s8MOydz8X\n0gn1Qw9LXU36CxrECYvcupP0mf35OyDk1oaMmVFc6l2UDcM6q/fySb8ignh7\n1QFIiOr1jp1qY1Y+ueLlEYvGi+PjTeRe8VBeClpI7hje5AFeGgRcWMwLWvqk\n4FJUEY3Md+gSiW1MpMkfNG28B5XUm5xo+fbFgGkr58rGNFJHDzZUmGPTj7Al\nGqb8395dAVKcT8nlI48zArEH7KX1rqO8d6BA39WOQVCw+oNH6txMyEseJ+5a\n8zlxHrpxFt7U2SGY2zpWjkAfbOVIRWWcA/pmuR+GgxhgoGRtgEe3LVcxmO9l\ni3eZ\r\n=NjLS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFdJ4yftpIg/gnZRtA/SZUCHFqpLqWVkgxKOfu2dUwXcAiEAruO1iQEmAaxdLfFihexbwuIrTOmAzbyF3UVNbJ/V6/E="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.0.0_1556813228333_0.8788935040997639"},"_hasShrinkwrap":false},"1.0.1":{"name":"tssrp6a","version":"1.0.1","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc index.ts --target es6 --module commonjs --outDir dist --sourcemap --declaration","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","_id":"tssrp6a@1.0.1","dist":{"shasum":"83daa97f626c92531d84006aa2b44a70d0c9df13","integrity":"sha512-tJP7t7HCr6OdYDpU4Bh7JB26gL0j8tuB1NQGGMgaLnyCtp8lJze5Sse19LLbQY70EJo9Xmsi/QEyfg7oA0eqEw==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.0.1.tgz","fileCount":25,"unpackedSize":43198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcy/1XCRA9TVsSAnZWagAACoIP+gPMqZpTH9INJIqkQsjE\nHLDlkMYAUI10X0a+VgHjLsvnz+rcLzbOrUC++zw25xQEQQejXC7dtjGuMc5g\nXltuUq7Lc4bjzqsDKPWzMyJvQ1kygHaBDNj6PDdw4fldJSomerSzm8ris8CS\nuLaU3reP2GDve/MNDHGSI0wDWaBYiDbUzpqN1nFoRrKqqKZB8mFNm/dHKlUA\nMFFBStrJ90S829oF88biwrQS5J6fVUBAfZHYL5Fg+rC20tFEaWmumQj8Wv5k\n7FVl1lIVBMuDlFY12ARCE46b6m/WYT93LqHwiS0ggOBZ5vcJd01eXcsGM8Pc\nISXbJ3sdxK8mwD9NaVYqCX2qj/hJGg7kn7NGBIYr8jsh1/fnyzIIwHMyDbzM\nvbQAiGnIiVv3zKRNe+F1KKFh0rcI7TjQbfVDF9FdMw76fnBWK7KezuUgB5jV\naEr5ScO2Xztt2xjOLoBUTlYLNbA8PfmmzoLuM8g7+NA2hH+6L3gOYwLe+xua\nPPRzPX+owPhw3aPd6NfNmy6LT07tZ0hobOlvMTBsT3AElBkGixjGPd8EouAZ\nvTJiT8lSvbbTawROJDRuwt/r/O2qaQlnMtpvkOS4R8q0iQmuInbM/4VImyXX\nO9r+XEnEneEk3v8/17g4GC/U0nIqpLX1MAeDJv5E0M9A6pZFpr5mByjVxKg9\nxZS2\r\n=/cKN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGJ/ljEciOtWKjksqh494WvNGcenJfi4PvBt7/N5cjAQAiEA5RzUoIaZBQ4r8m0ooYZd+MKwvv9RUo82YMkYKJK2tkI="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.0.1_1556872534353_0.8035171969617407"},"_hasShrinkwrap":false},"1.0.2":{"name":"tssrp6a","version":"1.0.2","main":"index.js","types":"index.d.ts","private":false,"dependencies":{"crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc src/index.ts --target es6 --module commonjs --outDir ./ --sourcemap --declaration","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","_id":"tssrp6a@1.0.2","dist":{"shasum":"0647349f779d7cc146347ec2a08c0fba078e79b9","integrity":"sha512-dkdDMJjaoa6vE8dOHFsthzZipO9TAjC1DVB0/x4W8qnlJS4Sa14xoTDT8Pj37ISnvu9Eyl+NvOqCPz+lVnCRsg==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.0.2.tgz","fileCount":3,"unpackedSize":6030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczAQ5CRA9TVsSAnZWagAAzvAP/jmU4F8ec3tOFHID542y\n7IU3fsaDa7qdPc5MpBaxB2hJjTAPIOhypPbRlR3+5BfaUvJ07qcKFi4PB9j2\n0B6O/rTy1yYgVQxi3qqu0ml9ORO6cb/e5GJ+ZxWBKZw7k/DZmxyU+8+M0Mzy\nWfJ+FpGIh9DV5KtR6EMRspcPu1Sf6rxBwuUmqPTL6r26GLXWGZEWcMlZjGux\ncAZed+xKBfF4IQmOzVd3nuV3JaW1G/TO44/zSDHEDysOx/gQ0puJ6BFxzgj8\n0ene+k/4Tfz4TXa8RRFAbvhAE7CCEvTdf/gCWzOuYrkz2l9HC26qQ8SZe2ny\nip/mfEUhoGBOp87DlUlR9NNS9EdKzDyv7jnLPoPHwft41vKI813lrc9gD3CW\ncOQYVnV10rYXZ4MM0JXyrQXr3wFCpDbIgJlxUBWUovselfesJJ0THEtZLwZu\npXEUiKy1VvGjLPF/IBWYD6AGYtEALm0xUsplUUTWZuvcMfNiZEqEAeuiWuIR\n2S+sNTGG7izdwwy1qsn9ni6k2bHbHbI/cfPXTED/gaj7KJcYdKK+3fXjGLaU\nRvugA3QbopC6eQOILw/gtQxAgJOtVVkD6b2JQIkAcJgZIIQxsXVGUwB35ggY\nROkfoaG+5DBM/fznp8orQc/yBfz4fSR6FskRsxpnmRD10UQyA0r1q0ixsNC6\nPEND\r\n=FbYe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaM4LDyL2om/EHw7G01sv42tNMnMcqjLtCzEN8yS/p0QIhAIZZo+u1VzHei4YIO5cGFZd3foBCpcKfw6o2HSSBb2mb"}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.0.2_1556874296595_0.5792381831501423"},"_hasShrinkwrap":false},"1.0.3":{"name":"tssrp6a","version":"1.0.3","main":"index.js","types":"index.d.ts","private":false,"dependencies":{"crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc src/index.ts --target es6 --module commonjs --outDir ./ --sourcemap --declaration","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","_id":"tssrp6a@1.0.3","dist":{"shasum":"00a15fa9545a749585c822841ad8b06c0b24a411","integrity":"sha512-u5E0SwNWRe8Xq2tauwS6NKYwpMtSouZrkaf6scb+iF2FKp31O21FTt980pyj8r7wAaD9L2HPLPdJZaAEQFrZ8g==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.0.3.tgz","fileCount":4,"unpackedSize":6609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczAR9CRA9TVsSAnZWagAA8kwQAIyMS0O0CRsasNJegIL5\n4SaclLO9xSs8TDktJWCmrP29hP4d9uY/UiC6diJIu2MkIeroiChQwK3hS4oI\nCEnahqVmgTN++c0gFaM5h2mynNabyIwP5vH7MnhhF2YUhF7mav7s7ASly47f\nYtU+157c0yaaNVJN24NVJhChnDYpFqkAEaXx+edQ58fPlBcKRMps020UFWOo\nLHiIrkzV2mTPwM7316BXpkoS817lOvvlhtXjTRcLFJI3Ao5lgAq8Jk7LaNP0\nuhbQeCicxbrFzjoo6W0TVFSP6RiGTNUQMKqMIAM1YmbkId2VGSyiiTMH/0HT\nrHPFjL11NvkZPWhOtCErpT0GaZzIpxFzX0173hS5iJrHSZdQl/Qls/X8r8n1\n532O8/kObMF7EZso2C/Rd9zq4fCnYFgKGl8hoVD0djvebq413z992BiKCe/S\nej6qDQISzKPiwS4TrqqKNnsGEbOlNHifTzjujclwkZtkaN7sHmPzju4J/k+1\nPRFGFvlNnR5I0lb2N7TYpMl2qACvNNJHdrEXrwXyDoZgUN20ZENHJZoQCur2\nyK/NKv0oEJjUxtWJ/2X1Q0CecC7eRxgSErSp0StNvJOmEpeecKTgbFNELQ/E\n7qnCOp5zau1dR6cV8MBTb/6V0b/3XNCD1gc3khVZ++jKlQrkw7RqR7uMqpbY\nGnVM\r\n=VDLL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDXSTMldHxAqjeYNHkB8RyYt5G7M9F95SzV6nPolO8UMAiAJYAkuLaYt1OHbshW/32ZgXnDkv/T+N3FIYGCAOI537A=="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.0.3_1556874364511_0.8454482964215233"},"_hasShrinkwrap":false},"1.0.4":{"name":"tssrp6a","version":"1.0.4","main":"index.js","types":"index.d.ts","private":false,"dependencies":{"crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc src/index.ts --target es6 --module commonjs --outDir ./ --sourcemap --declaration","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","_id":"tssrp6a@1.0.4","dist":{"shasum":"df202ca6d1cb39ffa90d66a94dd06d359f3acb9e","integrity":"sha512-ukaMzAc+CxzzbbpcQCbOVDi433bs6qhU6AdOs7SAlSrjFiIzjSS9CuA+6n1ChHX+9tqmZdV7CXT0j4GZQ+4PtA==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.0.4.tgz","fileCount":30,"unpackedSize":68540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczATJCRA9TVsSAnZWagAAK1IP/RpLI70vNIg3n1ehAJTb\n7mImnYidimwpHHYR0gcKTXr9lDyHoSf4S9tLJhoPKKK8ElLmjq2ObHLT6G05\naIKgf2/5Cvu+4aCzBUzvTwwW98gePIODoysZ4FyXTqwBPnjTsro7TVCrQFb/\nxj8pR8B7Xi+IV84u0ZJZjraPgS0z4snrWk5u7e05BG+cBFy3+lR1sAc5p3VU\nM87uSMYDXvjYPdEiqE9+sue9WhXdUR6CbXRczd+VvW3cqNwYMyAKyCvTit/m\nnqG9A1oUk8C9a2YiYpURDeFkobCG3uzJ9ox/naclArjWpva7+uopKYohJCOg\nkdTMeBzVO+F478uc8z5B9asENp0IInXJl7JpsLJujRHXrWLIPeaG6BpBG1/+\nLl/VZrxE+zj1M+rzrmdBOC/XdwNj5Q99JGM36R12RLhyQ+23TfVV/ayKSf8o\npXXTrY6D/gOLi8vbqONozYyYkXD4o0brVIaOkBfTWHfWfmOII7VuWaocw4VN\nPwBODcJ1xRDN88JyBv4CLZU+k7sLpgttga5zDD7tGsTO9uMGSa1p/0g/9N2S\nSfCGEfgA360SZJ+giTJNxUISTyrkVIHoAfbfGuBs0hXabWxM49gf6COWx6no\nUw65xiKemnJM5c83+U11RRd/wQU+/fri1F4qLFueiw7g0b/KhYYZ7cw1RzZp\ng7YY\r\n=3AUw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOFg6vqJBPbIkxnpbRsSwAknQDxDgl/UC4F8VjONUcywIgZxlFEBqC5BfuoqdoiJagUJ8MTRLgjsWSGUa374qU+cw="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.0.4_1556874440550_0.05575850593877951"},"_hasShrinkwrap":false},"1.0.5":{"name":"tssrp6a","version":"1.0.5","main":"index.js","types":"index.d.ts","private":false,"dependencies":{"crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc index.ts --target es6 --module commonjs --outDir ./ --sourcemap --declaration","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","_id":"tssrp6a@1.0.5","dist":{"shasum":"caf7e2bd120895167dc4681bbc3116241e519e76","integrity":"sha512-0TVuWpVwB2fNgThcswcWFX8eTN4bY4ZEmhmstGL6dtpTfbcle6Ol0iahovsoLjv3CQLRbo5dPJ9DjITXqJlDDQ==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.0.5.tgz","fileCount":43,"unpackedSize":109329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczAsFCRA9TVsSAnZWagAAvcsP/3YHtg5k6kkHWBzzomC5\n9R4V9jcP/scJiTAiFvdiem4Ggw5jhd6mLaQZkKmklDMOMEjYPs6RcqmZzuFO\ncVZBvDH4ZhF5dp6zrfqQXqXkGu6sJpMme07oRlVaWvMcKPcGp01Q4pA4iRIy\nIjS87jMlqM7OdLtxqeuLRwsv52/ZHvZwGRqA6frsL7rWq+Uyz9A5opuktMYc\ntKiJ6zBgsJweCcETs/3lZhT3dYB/+e3wFHcWHnUHoTGKPooiwSVhB4zNWwZ+\ngVJomjHkANccapBis7elZDFOMMnm2hkFMSAbGN5cFYf3Z5Qiz3YfuT/Kelm0\neUFOvRPV9VvRx/r7kwsc7KD+zjwyeWDyu/HHa4IHosMvdZDlt5QkiJbCNBYC\n0f+pV1ers4mAeYa6gguhufsv7uPWr93QMR/Of54oiVpq9vP+ixqgIMIPqqxG\npYL4ZBkiYL/ppTp8/H3FQxTmBkKp6gwtpFSdjmdOuDtsfhp2FblON3lbRxG4\neVq5iV9hRHlEOErwCCGDVPy6s4f9o8qM7YPO3q2WOwbC2AI1RSBhED+PvBzz\nIfhTJKTBvId8AGCb9D0DVQLMmK0D5OiP0kX+2VOD84t8q4W2gCRbPLYsiUfN\nlIkCDJe+kEa04FSRZKHeOTgrreucMaJCv4LrlkhzIuHWpFYxBCB3rluDrkMZ\nckNl\r\n=Q8wA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyl2VUO433kWwSHTTXBPV56PfzH+DbnJSjDbZO5oCkOAiEAq6NsazYWtWbo1gNW6Aws+qB/Bv6KySnnyd5uUZ3YYtw="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.0.5_1556876036673_0.6460360583563189"},"_hasShrinkwrap":false},"1.0.6":{"name":"tssrp6a","version":"1.0.6","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc index.ts --target es6 --module commonjs --outDir dist --sourcemap --declaration","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","_id":"tssrp6a@1.0.6","dist":{"shasum":"42e6bf0dcacdf03860998b6f662efdae822951ff","integrity":"sha512-WCWkH7/oVNB8Fcap481w0+J1nee0Z9cIjagF8inC4R2iF81woeM1pdFCpBQIh1i+TOC73ZD0Trxy+DAAyfvCDQ==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.0.6.tgz","fileCount":25,"unpackedSize":43588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczF76CRA9TVsSAnZWagAAYwIP/317lc56YLMG7PqYryTi\ntqNG68zBFzfYpY7pE5wP9hZPQqmP7/Zv//Mjay7JJ+UiFh5GIvCm+8a4ocMr\nTJQQaTaC4tQRCNUaueXDlz01bhPxM7BUySG/zLxwbTnUO7oNajySQCrFHEiZ\nA6mK6bj0wh2ivpxJZ+H+a1WKyJ3P/5IO2nMiPm3YrH+oxkk/k4CMX7c9eLNF\nNiGr9OZBRz6jzkxcEFyy1UF2uL5Th4FwWJw8j8cnM/+M0BYPPGiMf2Dsw2sA\nm8cYgusGOTxixJ7pNjX0LzT53b5fLsMv0aTE7CvaZ/CstNoxqeH1TcfO/Cw0\nTSjro/lxx/90qmBeykyEkMAEj6S9j/jTieAoaMyJ+7WVwK3oMpLGpUv8Y/kH\nMYlZY9tEPR06lJCDqwfMymO53Ysz6YInhf8+U3iSpQdX+kqbWZxQvmcxwnpf\nU3B4Jyuqr9Z+oYmPT1/30UdHzAxDzyqi9QGLMSJqF0I/mq6FfCmKCiz7LUhk\n9RcIcYahFLm6xYtaRUqN22HQ2vWz3izgPlzPtZmjCXYWetETGSi7qPzC0Sqw\nycC4lv00TQOc24Z8iB3YpsuR4QTGseOX8zQxNlKtG05b2CRPG1HqBjtOAqsK\nnZLb7xTpBoWF5R5wpYNqn2nAujjcGFkbMcCeEE8+lq6iVHGmCULeozmG0YJ3\n52Ob\r\n=UMbt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCG2hrykRqgm0O+y2pHDb10Sk+LFiCazVXPGQ1SnLjAJAIhAJz84doJF/vKhiqc1+ASwxfBgQEJimCV8YRN1ija/+xI"}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.0.6_1556897529636_0.538146916365168"},"_hasShrinkwrap":false},"1.1.0-beta":{"name":"tssrp6a","version":"1.1.0-beta","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc --build tsconfig.json","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","readmeFilename":"README.md","readme":"# Midokura TSSRP6a\n\nThis library is a TypeScript implementation of [Secure Remote Password](http://srp.stanford.edu/) SRP6a.\n\nSRP allows a user to authenticate to a server without sending the password (zero-knowledge proof of password) using generated private/public keys.\n\nhttps://en.wikipedia.org/wiki/Secure_Remote_Password_protocol\nhttps://tools.ietf.org/html/rfc5054\n\n## Signup / registration\n\n[![Diagram](docs/signup.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBzYWx0ID0gY2xpZW50LmdlbmVyYXRlUmFuZG9tU2FsdCgpXG4gICAgQi0-PkI6IGNsaWVudC5nZW5lcmF0ZVZlcmlmaWVyKHNhbHQsIGlkLCBwYXNzd29yZClcbiAgICBCLT4-UzogZW1haWwsIHNhbHQsIHZlcmlmaWVyXG4gICAgTm90ZSByaWdodCBvZiBTOiBzYXZlIGJ5IGlkOjxici8-c2FsdCwgdmVyaWZpZXJcbiIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In19)\n\nThe user requests a registration page, the browser will generate a salt and take the user's identity and password and generate a verifier.  \nThe browser sends email, salt, verifier to server. The server saves this to storage.\n\n## Signin / login\n\n[![Diagram](docs/signin.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBjbGllbnQuc3RlcDEoaWQsIHBhc3N3b3JkKVxuICAgIEItPj5TOiBpZFxuICAgIE5vdGUgcmlnaHQgb2YgUzogZmluZCBpbiBzdG9yYWdlPGJyLz5ieSBpZDo8YnIvPnNhbHQsIHZlcmlmaWVyXG4gICAgUy0-PlM6IGIsQiA9IHNlcnZlci5zdGVwMShpZCwgc2FsdCwgdmVyaWZpZXIpXG4gICAgUy0-PkI6IHNhbHQsIEJcbiAgICBCLT4-QjogYSxBLE0xID0gY2xpZW50LnN0ZXAyKHNhbHQsIEIpXG4gICAgQi0-PlM6IEEsTTFcbiAgICBTLT4-UzogTTIgPSBzZXJ2ZXIuc3RlcDIoYiwgQSwgTTEpXG4gICAgUy0-PkI6IE0yXG4gICAgTm90ZSBsZWZ0IG9mIEI6IEJyb3dzZXIgbWF5IHZlcmlmeTxici8-c2VydmVyXG4gICAgQi0tPj5COiBjbGllbnQuc3RlcDMoYSwgTTIpIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0)\n\nThe user starts an authentication session by entering his id and password.\n\nThe id is sent with a request to the server, which finds salt and verifier for that id. Server executes step1 to generate private key `b` and public key `B`, and responds to browser with `salt` and `B`.\n\nThe browser generates private key `a`, public key `A` and computes `M1`. Browser makes requests with `A` and `M1`.\n\nServer verifies that the credentials were correct with step2, using `b` and `M1`. If successful, it also takes `A` and generates and responds with `M2`.\n\nBrowser may additionally verify the authority of the server from `M2` with step3.\n\nNote: `a` and `b` are generated for one authentication \"session\" and discarded immediately.\n\n## Usage\n\nSee [session test](test/session.test.ts) for actual usage of a complete authentication flow between client and server.\n\nThis package's client and server hashing algorithms of course match, and matches Java's [Nimbus SRP](https://connect2id.com/products/nimbus-srp).\n\nThese settings can be overriden, client and server receive a `SRPConfig` instance\nthat holds parameters for `N` and `g`, and also an instance of `SRPRoutines`.\nA subclass of routines can be used that uses different hashing and computation\nalgorithms, to adapt to any other server implementation.\n[This example](test/srp6a.test.ts) shows how to override computeIdentityHash() routine\nof the client.\n\n## Recomendations\n\nSRP alone only prevents a man-in-the-middle attack from _reading_ the password, but such an attack could also inject code into the browser to hijack the password.\n\nAlways use SRP in combination with HTTPS. Browsers can be vulnerable to: having malicious certificates installed beforehand, rogue certificates in the wild, server misconfiguration, bugs like the heartbleed attack, servers leaking password into errors and logs. SRP in the browser offers an additional hurdle and may prevent some mistakes from escalating.\n\nThe client can chose to exclude the identity of its computations or not. If excluded, the id cannot be changed. But this problem is better solved by an application schema that separates \"identity\" from \"authentication\", so that one identity can have multiple authentications. This allows to switch identity + password, and also to user more than one way of logging in (think \"login with email+password, google, or facebook\").\n\n## Notes\n Please **NOTE** that default routines does not\nstrictly follow SRP6a RFC because user identity is NOT included in the verifier generation.\nThis makes possible for malicious server to detect if\n[two users share the same password](https://crypto.stackexchange.com/questions/8626/why-is-tls-srp-verifier-based-on-user-name/9430#9430)\nbut also allows client to change it \"identity\" without regenerating password.\n\n[This example](test/srp6a.test.ts) shows how to make implementation strictly compliant with\nSRP6a specification.\n","_id":"tssrp6a@1.1.0-beta","dist":{"shasum":"678bf8b73e96cc0468703f7ee43c64fed140a3fa","integrity":"sha512-TJaeRC990PajiSQNlqxsIDXeIPiQqe3xnEWGGB4E/O+xYP1PdwL0ASfPKUkFt93a4xKG9g9n2UFQ6xaUu1sgcQ==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.1.0-beta.tgz","fileCount":66,"unpackedSize":178204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS/CLCRA9TVsSAnZWagAAA20P/0L/GRjH1zOEd50cXOWE\nIRzJ5CukTkww0HFn5vXuo9M2c97TIiVVNBKXUGv38ioH3FL6RfLg7vWOYpK2\nDecJ7HVXMt03Oo0VAP8LGlZXYMJvYbY1qO5zdoqG+SQhqkKkX4SmOOYzBY04\nw4tJCKrKBqnme8/VbFZ53W2yyJ2eXExlg6gE/B814FqiF5pBqZ4iJafIX2+c\nm/E091cQdkVFWEBRUX/veTmjl86sI6zJUUDCr43NhM7gyc0p47+5TWW6gtn2\nh+yi1icV9jffCKEOA6G3V8uXrzryg1sjbOV16O/7rFgcFKnXax56y7DEp9ly\n5AaHygCRkXnYv1v73vUfNwdfm0gaeWtsfPX56hlZgDSUFEtNODbBwpS6QByG\n0yBS5SSEW7Tv25zCEueVBQzlv4FLb5YSP8lAGD4tluCjTYjmH6sQ18Rb4JWJ\neXBsbUG9Ie2rH8/J3+rf8UgoE14HUGKGWQdda6ddtd6LMt8iTP/mL3W0wKRm\nIEU+qBiHj6287PILIJuKQuQ6rin8ymF+sA6t7lrZBeedRAognYs6T8So5WJG\nBVr+KSMg5dloCoUIZ4Mz/XA/V2bm3Py/RRS/eP+kHVudkK4J/cA1RTzei8jR\nsRCk+ilnx16FdJ3kwFS4VsmwxFI6HauGL6oqNLQrhSFZtxs/kEO1+NDTYDUb\nGSWl\r\n=Im/Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrr0P5TmkkLUpjQJ1ik2F8QWc1+WtNpuPWW5k59AZsbQIgcsz3N3gUv4KuzCEl0G96CrejXM29VR9tgrVvNieBMP0="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.1.0-beta_1565257866764_0.9961601768257793"},"_hasShrinkwrap":false},"1.1.0-beta-2":{"name":"tssrp6a","version":"1.1.0-beta-2","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"@types/jsbn":"^1.2.29","crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/crypto-js":"^3.1.43","@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc --build tsconfig.json","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","readmeFilename":"README.md","readme":"# Midokura TSSRP6a\n\nThis library is a TypeScript implementation of [Secure Remote Password](http://srp.stanford.edu/) SRP6a.\n\nSRP allows a user to authenticate to a server without sending the password (zero-knowledge proof of password) using generated private/public keys.\n\nhttps://en.wikipedia.org/wiki/Secure_Remote_Password_protocol\nhttps://tools.ietf.org/html/rfc5054\n\n## Signup / registration\n\n[![Diagram](docs/signup.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBzYWx0ID0gY2xpZW50LmdlbmVyYXRlUmFuZG9tU2FsdCgpXG4gICAgQi0-PkI6IGNsaWVudC5nZW5lcmF0ZVZlcmlmaWVyKHNhbHQsIGlkLCBwYXNzd29yZClcbiAgICBCLT4-UzogZW1haWwsIHNhbHQsIHZlcmlmaWVyXG4gICAgTm90ZSByaWdodCBvZiBTOiBzYXZlIGJ5IGlkOjxici8-c2FsdCwgdmVyaWZpZXJcbiIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In19)\n\nThe user requests a registration page, the browser will generate a salt and take the user's identity and password and generate a verifier.  \nThe browser sends email, salt, verifier to server. The server saves this to storage.\n\n## Signin / login\n\n[![Diagram](docs/signin.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBjbGllbnQuc3RlcDEoaWQsIHBhc3N3b3JkKVxuICAgIEItPj5TOiBpZFxuICAgIE5vdGUgcmlnaHQgb2YgUzogZmluZCBpbiBzdG9yYWdlPGJyLz5ieSBpZDo8YnIvPnNhbHQsIHZlcmlmaWVyXG4gICAgUy0-PlM6IGIsQiA9IHNlcnZlci5zdGVwMShpZCwgc2FsdCwgdmVyaWZpZXIpXG4gICAgUy0-PkI6IHNhbHQsIEJcbiAgICBCLT4-QjogYSxBLE0xID0gY2xpZW50LnN0ZXAyKHNhbHQsIEIpXG4gICAgQi0-PlM6IEEsTTFcbiAgICBTLT4-UzogTTIgPSBzZXJ2ZXIuc3RlcDIoYiwgQSwgTTEpXG4gICAgUy0-PkI6IE0yXG4gICAgTm90ZSBsZWZ0IG9mIEI6IEJyb3dzZXIgbWF5IHZlcmlmeTxici8-c2VydmVyXG4gICAgQi0tPj5COiBjbGllbnQuc3RlcDMoYSwgTTIpIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0)\n\nThe user starts an authentication session by entering his id and password.\n\nThe id is sent with a request to the server, which finds salt and verifier for that id. Server executes step1 to generate private key `b` and public key `B`, and responds to browser with `salt` and `B`.\n\nThe browser generates private key `a`, public key `A` and computes `M1`. Browser makes requests with `A` and `M1`.\n\nServer verifies that the credentials were correct with step2, using `b` and `M1`. If successful, it also takes `A` and generates and responds with `M2`.\n\nBrowser may additionally verify the authority of the server from `M2` with step3.\n\nNote: `a` and `b` are generated for one authentication \"session\" and discarded immediately.\n\n## Usage\n\nSee [session test](test/session.test.ts) for actual usage of a complete authentication flow between client and server.\n\nThis package's client and server hashing algorithms of course match, and matches Java's [Nimbus SRP](https://connect2id.com/products/nimbus-srp).\n\nThese settings can be overriden, client and server receive a `SRPConfig` instance\nthat holds parameters for `N` and `g`, and also an instance of `SRPRoutines`.\nA subclass of routines can be used that uses different hashing and computation\nalgorithms, to adapt to any other server implementation.\n[This example](test/srp6a.test.ts) shows how to override computeIdentityHash() routine\nof the client.\n\n## Recomendations\n\nSRP alone only prevents a man-in-the-middle attack from _reading_ the password, but such an attack could also inject code into the browser to hijack the password.\n\nAlways use SRP in combination with HTTPS. Browsers can be vulnerable to: having malicious certificates installed beforehand, rogue certificates in the wild, server misconfiguration, bugs like the heartbleed attack, servers leaking password into errors and logs. SRP in the browser offers an additional hurdle and may prevent some mistakes from escalating.\n\nThe client can chose to exclude the identity of its computations or not. If excluded, the id cannot be changed. But this problem is better solved by an application schema that separates \"identity\" from \"authentication\", so that one identity can have multiple authentications. This allows to switch identity + password, and also to user more than one way of logging in (think \"login with email+password, google, or facebook\").\n\n## Notes\n Please **NOTE** that default routines does not\nstrictly follow SRP6a RFC because user identity is NOT included in the verifier generation.\nThis makes possible for malicious server to detect if\n[two users share the same password](https://crypto.stackexchange.com/questions/8626/why-is-tls-srp-verifier-based-on-user-name/9430#9430)\nbut also allows client to change it \"identity\" without regenerating password.\n\n[This example](test/srp6a.test.ts) shows how to make implementation strictly compliant with\nSRP6a specification.\n","_id":"tssrp6a@1.1.0-beta-2","dist":{"shasum":"7961bac956625758d4749a6f86edfbb89f6ab6d5","integrity":"sha512-TPqj772/4EVZaksvl/YQkIMBITdCe1cUVhkOKVNJi8/+GsHhHiZdw1WzP2NkrM7M35HyQjy3cRjk3lKRSiILQw==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.1.0-beta-2.tgz","fileCount":66,"unpackedSize":178206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS/nhCRA9TVsSAnZWagAATioP/2EF/ynZXRSv5SB9vAdo\nnULyifal7ySrKcAR0ZRIxDg4GhIlNvujns8ZSdfNKEnnRGvyOAj8nbUX65oS\npWliIUODRdicJAJp87C2gtMq1bsPZe5tlWbaMrfU60/mhaAcl5JrvYgVPfT3\nByci62a8OoiK5ry89xc0maDmnwQGePsDORr7vm64vpmOWlX4bSkprNffZwdT\nXVCNsOSqWj0zI5PqLxxtjR9YJFPq8zW5HEgjj24b2Z7s1/M3Cnd/o7EaPYWc\nu6L9PhzZL4tJCCkc+OAKHgpNrjvnyacL/hpLm1jQzbiZSZyLgGfHvCP1H62K\nPzzHuVVLjlMXFbA3T8Sec4HD07w/OGtuV89pstgxD78CKbsK+b1cy5DnVj3P\n09wZl4+5Kr52G016Gaqu4Q+KHunOwqYwsLmxZ5dGiLkASNoH3IRCRebGlJPJ\nhwzfT0VRVQWpBMbnr6z5SQJMqlOe5jcNgZvuBt4Qvi8GsD8JITAdjPgaf8Wo\nu7uNt8uPa7yY19ajmYz5+XJSckxkryFffyopsFqLHuPWOCBBwXHxFA90DZY/\n75ZEKyvtx+ftZRoYnkQ0GLKoNZ2Kq+y95UkFWVPu+kMtJFVFCv9UHKZS2ape\nC/8i2vTq3tLyyttejOFaYe5+n+WYp+gFW/9fNisiIx3FjSG/MuT+PPB6s4Si\nEj+Y\r\n=q2Im\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFtXniCY19dHNUCClQeTgwcRXsFcJ+J+t4ZR9RrgzJFiAiBilkkJrKyGUuO2nGVAIw5rPUk438vHba4xpMBN/2n8gA=="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.1.0-beta-2_1565260257460_0.3530165439521933"},"_hasShrinkwrap":false},"1.1.0-beta-3":{"name":"tssrp6a","version":"1.1.0-beta-3","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc --build tsconfig.json","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","readmeFilename":"README.md","readme":"# Midokura TSSRP6a\n\nThis library is a TypeScript implementation of [Secure Remote Password](http://srp.stanford.edu/) SRP6a.\n\nSRP allows a user to authenticate to a server without sending the password (zero-knowledge proof of password)\nusing generated private/public keys.\n\nSee\nhttps://en.wikipedia.org/wiki/Secure_Remote_Password_protocol\n\nhttps://tools.ietf.org/html/rfc5054\n\nfor all the details.\n\n## Usage\n### Signup / registration\n\n[![Diagram](docs/signup.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBzYWx0ID0gY2xpZW50LmdlbmVyYXRlUmFuZG9tU2FsdCgpXG4gICAgQi0-PkI6IGNsaWVudC5nZW5lcmF0ZVZlcmlmaWVyKHNhbHQsIGlkLCBwYXNzd29yZClcbiAgICBCLT4-UzogZW1haWwsIHNhbHQsIHZlcmlmaWVyXG4gICAgTm90ZSByaWdodCBvZiBTOiBzYXZlIGJ5IGlkOjxici8-c2FsdCwgdmVyaWZpZXJcbiIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In19)\n\nThe user requests a registration page, the browser will generate a salt and take the user's identity and password and generate a verifier.  \nThe browser sends email, salt, verifier to server. The server saves this to storage.\nHere is a complete example of signup:\n```JavaScript\nimport {\n createVerifierAndSalt, SRPConfig, SRPParameters, SRPRoutines,\n} from \"tssrp6a\"\n\nconst srp6aNimbusConfig = new SRPConfig(\n  new SRPParameters(),\n  (p) => new SRPRoutines(p),\n);\nconst userId = \"hello@world.org\";\nconst userPassword = \"password\";\nconst { s: salt, v: verifier } = createVerifierAndSalt(\n  srp6aNimbusConfig,\n  userId,\n  userPassword,\n);\n// store salt and verifier in a data base\n```\n\n### Signin / login\n\n[![Diagram](docs/signin.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBjbGllbnQuc3RlcDEoaWQsIHBhc3N3b3JkKVxuICAgIEItPj5TOiBpZFxuICAgIE5vdGUgcmlnaHQgb2YgUzogZmluZCBpbiBzdG9yYWdlPGJyLz5ieSBpZDo8YnIvPnNhbHQsIHZlcmlmaWVyXG4gICAgUy0-PlM6IGIsQiA9IHNlcnZlci5zdGVwMShpZCwgc2FsdCwgdmVyaWZpZXIpXG4gICAgUy0-PkI6IHNhbHQsIEJcbiAgICBCLT4-QjogYSxBLE0xID0gY2xpZW50LnN0ZXAyKHNhbHQsIEIpXG4gICAgQi0-PlM6IEEsTTFcbiAgICBTLT4-UzogTTIgPSBzZXJ2ZXIuc3RlcDIoYiwgQSwgTTEpXG4gICAgUy0-PkI6IE0yXG4gICAgTm90ZSBsZWZ0IG9mIEI6IEJyb3dzZXIgbWF5IHZlcmlmeTxici8-c2VydmVyXG4gICAgQi0tPj5COiBjbGllbnQuc3RlcDMoYSwgTTIpIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0)\n\nThe user starts an authentication session by entering his id and password.\n\nThe id is sent with a request to the server, which finds salt and verifier for that id. Server executes step1 to generate private key `b` and public key `B`, and responds to browser with `salt` and `B`.\n\nThe browser generates private key `a`, public key `A` and computes `M1`. Browser makes requests with `A` and `M1`.\n\nServer verifies that the credentials were correct with step2, using `b` and `M1`. If successful, it also takes `A` and generates and responds with `M2`.\n\nBrowser may additionally verify the authority of the server from `M2` with step3.\n\nNote: `a` and `b` are generated for one authentication \"session\" and discarded immediately.\n\nHere is a complete example of authentication session:\n```JavaScript\nimport {\n createVerifierAndSalt, SRPClientSession, SRPConfig,\n SRPParameters, SRPRoutines, SRPServerSession\n} from \"tssrp6a\"\n\nconst srp6aNimbusConfig = new SRPConfig(\n  new SRPParameters(),\n  (p) => new SRPRoutines(p),\n);\n\nconst username = \"hello@world.org\";\nlet password = \"password\";\n\n// Sign up\nconst { s: salt, v: verifier } = createVerifierAndSalt(\n  srp6aNimbusConfig,\n  username,\n  password,\n);\n\n// Sign in\nconst srp6aNimbusClient = new SRPClientSession(srp6aNimbusConfig);\nsrp6aNimbusClient.step1(username, password);\n// erase password at this point, it is no longer stored\npassword = \"\"\n\nconst server = new SRPServerSession(srp6aNimbusConfig);\n// server gets identifier from client, salt+verifier from db (from signup)\nconst B = server.step1(username, salt, verifier);\n\n// client gets challenge B from server step1 and sends prove M1 to server\nconst { A, M1 } = srp6aNimbusClient.step2(salt, B);\n\n// servers checks client prove M1 and sends server prove M2 to client\nconst M2 = server.step2(A, M1);\n\n// client ensures server identity\nsrp6aNimbusClient.step3(M2);\n```\n\n## Recomendations\n\nSRP alone only prevents a man-in-the-middle attack from _reading_ the password, but such an attack could also inject code into the browser to hijack the password.\n\nAlways use SRP in combination with HTTPS. Browsers can be vulnerable to: having malicious certificates installed beforehand, rogue certificates in the wild, server misconfiguration, bugs like the heartbleed attack, servers leaking password into errors and logs. SRP in the browser offers an additional hurdle and may prevent some mistakes from escalating.\n\nThe client can chose to exclude the identity of its computations or not. If excluded, the id cannot be changed. But this problem is better solved by an application schema that separates \"identity\" from \"authentication\", so that one identity can have multiple authentications. This allows to switch identity + password, and also to user more than one way of logging in (think \"login with email+password, google, or facebook\").\n\n## Notes\n\nThis package's default configuration matches the following Java's \n[Nimbus SRP](https://connect2id.com/products/nimbus-srp) configuration:\n```Java\nSRP6CryptoParams.getInstance(2048, \"SHA-512\")\n```\n\nThe default routines does not\nstrictly follow SRP6a RFC because user identity is NOT included in the verifier generation.\nThis makes possible for malicious server to detect if\n[two users share the same password](https://crypto.stackexchange.com/questions/8626/why-is-tls-srp-verifier-based-on-user-name/9430#9430)\nbut also allows client to change it \"identity\" without regenerating password.\n\n[This example](test/srp6a.test.ts) shows how to make SRP client strictly compliant with\nSRP6a specification.\n","_id":"tssrp6a@1.1.0-beta-3","dist":{"shasum":"700cfbf876ee360710ca42860a31b22dc97e85fd","integrity":"sha512-l4xgS5I8mtdQ0aaG93nNt7AHSPDHcaBR3OFM8TsTkFcQcCow0CmwYPbsBW+AFwsiGYV2etfXGHgXDthiSOCtRA==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.1.0-beta-3.tgz","fileCount":66,"unpackedSize":179400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTBTuCRA9TVsSAnZWagAAqLkQAKL3qnESSBwLGUvqG8Ez\ng7nedqu+l+2s2iRRGM7mJ7z2pWsi3HF24SWk07Yasmty8oZMcR/pAjzeT2QE\nlGBXqPc517HyU4emm3qtGoFM0s4gB3Cmb7gB1A+dGAwr3qNkb8P/MwPjvzsZ\n5BoyNuX19LldTvOxpgIH2Z8MHABcynBhdpz++m1T/OsMhZKbGbxHZrUqcAaz\n7AjCfY8G4YDGEM8iuiDJzwS/HPlvjnsjWp0ivg71Fv0xH6/B4Qoq1r+6AMy8\n9Fr8uZ05B6DMW+Sqqgw2LIS0j0waJ2MsSIVI68H4YKITVbepsjbUNKzBuJwK\n+kCZhVBH5jRSOJn6l64m5fyg96SmntR8UR93q3kHC7aLon9dscXTT2c1whvH\nxms2FWwxDCFbSqbihMXnHklBsbm46wsa9k137bVW0J8lr+okNCg9F6ASGpiM\n+qJd4s+lXpCkJ/Wy6BXoUjyJA/DFBYjQHNkjT8LZWSk5KiJNpiyEsrauFK0I\nG67fPq9bIfbpZYjobElho98AMeiIIIz+qVG+sBVGX7cffokLrm99VTuW2s0M\n5YxMniWRQpzwyQV4JpseNdazAvvTz2dwcnLOkCrhAhgS57o47zZf/4fILWr5\n+OHrSHb7rwzg6Qir259ebKHPuiQoYvpzzQYHvbOIhNRDkmKUYmgsDq2BGHBr\npaQ7\r\n=9FK3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICcg6agnViZl9JtSzOcVqwcR/p6Cf6PQaL328A/cUZaWAiEA+eG9+OEbH0Dg1Si4tFw3gNCWFQPLLIg+SXL3IOhRkFk="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.1.0-beta-3_1565267181699_0.03566199676734216"},"_hasShrinkwrap":false},"1.1.0-beta-4":{"name":"tssrp6a","version":"1.1.0-beta-4","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc --build tsconfig.json","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","readmeFilename":"README.md","readme":"# Midokura TSSRP6a\n\nThis library is a TypeScript implementation of [Secure Remote Password](http://srp.stanford.edu/) SRP6a.\n\nSRP allows a user to authenticate to a server without sending the password (zero-knowledge proof of password)\nusing generated private/public keys.\n\nSee\nhttps://en.wikipedia.org/wiki/Secure_Remote_Password_protocol\n\nhttps://tools.ietf.org/html/rfc5054\n\nfor all the details.\n\n## Usage\n### Signup / registration\n\n[![Diagram](docs/signup.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBzYWx0ID0gY2xpZW50LmdlbmVyYXRlUmFuZG9tU2FsdCgpXG4gICAgQi0-PkI6IGNsaWVudC5nZW5lcmF0ZVZlcmlmaWVyKHNhbHQsIGlkLCBwYXNzd29yZClcbiAgICBCLT4-UzogZW1haWwsIHNhbHQsIHZlcmlmaWVyXG4gICAgTm90ZSByaWdodCBvZiBTOiBzYXZlIGJ5IGlkOjxici8-c2FsdCwgdmVyaWZpZXJcbiIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In19)\n\nThe user requests a registration page, the browser will generate a salt and take the user's identity and password and generate a verifier.  \nThe browser sends email, salt, verifier to server. The server saves this to storage.\nHere is a complete example of signup:\n```JavaScript\nimport {\n createVerifierAndSalt, SRPConfig, SRPParameters, SRPRoutines,\n} from \"tssrp6a\"\n\nconst srp6aNimbusConfig = new SRPConfig(\n  new SRPParameters(),\n  (p) => new SRPRoutines(p),\n);\nconst userId = \"hello@world.org\";\nconst userPassword = \"password\";\nconst { s: salt, v: verifier } = createVerifierAndSalt(\n  srp6aNimbusConfig,\n  userId,\n  userPassword,\n);\n// store salt and verifier in a data base\n```\n\n### Signin / login\n\n[![Diagram](docs/signin.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBjbGllbnQuc3RlcDEoaWQsIHBhc3N3b3JkKVxuICAgIEItPj5TOiBpZFxuICAgIE5vdGUgcmlnaHQgb2YgUzogZmluZCBpbiBzdG9yYWdlPGJyLz5ieSBpZDo8YnIvPnNhbHQsIHZlcmlmaWVyXG4gICAgUy0-PlM6IGIsQiA9IHNlcnZlci5zdGVwMShpZCwgc2FsdCwgdmVyaWZpZXIpXG4gICAgUy0-PkI6IHNhbHQsIEJcbiAgICBCLT4-QjogYSxBLE0xID0gY2xpZW50LnN0ZXAyKHNhbHQsIEIpXG4gICAgQi0-PlM6IEEsTTFcbiAgICBTLT4-UzogTTIgPSBzZXJ2ZXIuc3RlcDIoYiwgQSwgTTEpXG4gICAgUy0-PkI6IE0yXG4gICAgTm90ZSBsZWZ0IG9mIEI6IEJyb3dzZXIgbWF5IHZlcmlmeTxici8-c2VydmVyXG4gICAgQi0tPj5COiBjbGllbnQuc3RlcDMoYSwgTTIpIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0)\n\nThe user starts an authentication session by entering his id and password.\n\nThe id is sent with a request to the server, which finds salt and verifier for that id. Server executes step1 to generate private key `b` and public key `B`, and responds to browser with `salt` and `B`.\n\nThe browser generates private key `a`, public key `A` and computes `M1`. Browser makes requests with `A` and `M1`.\n\nServer verifies that the credentials were correct with step2, using `b` and `M1`. If successful, it also takes `A` and generates and responds with `M2`.\n\nBrowser may additionally verify the authority of the server from `M2` with step3.\n\nNote: `a` and `b` are generated for one authentication \"session\" and discarded immediately.\n\nHere is a complete example of authentication session:\n```JavaScript\nimport {\n createVerifierAndSalt, SRPClientSession, SRPConfig,\n SRPParameters, SRPRoutines, SRPServerSession\n} from \"tssrp6a\"\n\nconst srp6aNimbusConfig = new SRPConfig(\n  new SRPParameters(),\n  (p) => new SRPRoutines(p),\n);\n\nconst username = \"hello@world.org\";\nlet password = \"password\";\n\n// Sign up\nconst { s: salt, v: verifier } = createVerifierAndSalt(\n  srp6aNimbusConfig,\n  username,\n  password,\n);\n\n// Sign in\nconst srp6aNimbusClient = new SRPClientSession(srp6aNimbusConfig);\nsrp6aNimbusClient.step1(username, password);\n// erase password at this point, it is no longer stored\npassword = \"\"\n\nconst server = new SRPServerSession(srp6aNimbusConfig);\n// server gets identifier from client, salt+verifier from db (from signup)\nconst B = server.step1(username, salt, verifier);\n\n// client gets challenge B from server step1 and sends prove M1 to server\nconst { A, M1 } = srp6aNimbusClient.step2(salt, B);\n\n// servers checks client prove M1 and sends server prove M2 to client\nconst M2 = server.step2(A, M1);\n\n// client ensures server identity\nsrp6aNimbusClient.step3(M2);\n```\n\n## Recomendations\n\nSRP alone only prevents a man-in-the-middle attack from _reading_ the password, but such an attack could also inject code into the browser to hijack the password.\n\nAlways use SRP in combination with HTTPS. Browsers can be vulnerable to: having malicious certificates installed beforehand, rogue certificates in the wild, server misconfiguration, bugs like the heartbleed attack, servers leaking password into errors and logs. SRP in the browser offers an additional hurdle and may prevent some mistakes from escalating.\n\nThe client can chose to exclude the identity of its computations or not. If excluded, the id cannot be changed. But this problem is better solved by an application schema that separates \"identity\" from \"authentication\", so that one identity can have multiple authentications. This allows to switch identity + password, and also to user more than one way of logging in (think \"login with email+password, google, or facebook\").\n\n## Notes\n\nThis package's default configuration matches the following Java's \n[Nimbus SRP](https://connect2id.com/products/nimbus-srp) configuration:\n```Java\nSRP6CryptoParams.getInstance(2048, \"SHA-512\")\n```\n\nThe default routines does not\nstrictly follow SRP6a RFC because user identity is NOT included in the verifier generation.\nThis makes possible for malicious server to detect if\n[two users share the same password](https://crypto.stackexchange.com/questions/8626/why-is-tls-srp-verifier-based-on-user-name/9430#9430)\nbut also allows client to change it \"identity\" without regenerating password.\n\n[This example](test/srp6a.test.ts) shows how to make SRP client strictly compliant with\nSRP6a specification.\n","_id":"tssrp6a@1.1.0-beta-4","dist":{"shasum":"48c4c7aa8fee0581a3fa055992d07f53370ed49a","integrity":"sha512-v2O9T5LcIm9jqdcmIVe/DW2gLB7q+EPonUia415pfwyUas5w76337+zOTnOutPI/cqd9m2FBV8aiseQgxz84ug==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.1.0-beta-4.tgz","fileCount":66,"unpackedSize":179632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTB/rCRA9TVsSAnZWagAAVuYP/0WlH+3tB2Jh6Zqc0ehc\nnLqV50HVm/QuIQWkYc638kAYG43gAfbifdaLRz7B2pIu5PBSS4j2PAHhdtjR\n6qXHerD4aKPRI1akd41VCLWpk33yjI+eDfoFGt/atJz7xPZ/BWiQOLd4IfLo\nHiNYUa0vrx0LC0WcYG2Tg+v5GLckW2KVRsrEaExpe3elXsUNbs8czD7bPquS\nlZWmelFeRGHWaWrL2aMhyqrVqMrf6ukpi/Qi2KKPJ/I/sdtfmfkE3JKwzJwC\nSroq4thfardZY6WDLtQHsvwqk6mMV0k8tmfUGzhN/CopsnWtj1wr8jvaTrP2\nIF0MIYjaP3QbVXs7obhQhGgO2A7evOa9J4fxwHMAyMd4ydnC8ROzrsZUUIDm\n8UxuW+gwMzZi93CXGbFB7b5Hi2f47lyJRlBubTXTuFtwjmzWDMsljSbDWy0Y\nxnRTuULLtAEq20MfXy0M7015ymVKeubRJGIIvtCrW7/ZV2hY8xP6+67IVdjd\nOojRl17OKQIMsqy+WGSwk5frnS3fssIr33dUNtCKLLSut8TU5poWIRSD5CK0\n3yi9ooEmf3ill6qPZ8tSJRoiLQVyDeMcJ2zA7d5iKz1Bm949a1HdZn9rZsu6\n37GkReJW37MJYHoDeaj9Zxz1BWUXBbPJV7lnUSi1CwABOsfM2WJ4C1W+RTvt\nIvr/\r\n=dS+S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBSOWkEd1qAmQmtmvxO01K+nOp3d6DgfXdmPp/3dum7gIhAMWYuh3uvQZA16/cjicsV3IA1gnymulQ3aSsLxGLWdbE"}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.1.0-beta-4_1565269994770_0.0593791427376642"},"_hasShrinkwrap":false},"1.1.0":{"name":"tssrp6a","version":"1.1.0","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","crypto-js":"^3.1.9-1","jsbn":"^1.1.0"},"devDependencies":{"@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc --build tsconfig.json","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","_id":"tssrp6a@1.1.0","dist":{"shasum":"a20b6cc6232ccf51f41e3bf9a137ced5fd694439","integrity":"sha512-zWSpMnnAwrhxNHd4ERWghQ0B5SFw+rVlHATYILNZADMcohFPV/6YkACe+hZDpeJR26lWxBtl/LFGqrZcQa+UlA==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.1.0.tgz","fileCount":66,"unpackedSize":179625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTCh9CRA9TVsSAnZWagAA32UP/1Ki+RCi1/mkY0Fk31tG\n6yMem/kgYef/McIUX0UoLcFHB8MGz6S7BzYrFOH15jYmVowpab/iZSdRO+He\nN95B42RA2EIPZq1RbUUEePPJqzHjSGR3Na6tXTsJQCPPUL+tB2ZadQ2hpdoZ\nd9RIbJEI1Wh6TlX3pQE2iUUzPAQXO/sbgVB8W3zCG1pqDqY0/WeSz83LYqlC\nnx7fnJTDxmzKo6Qh108TyO9oOE+DBb5SzbBDnVKhDlPEmtpip5tnKbPeD9Pp\nFa/YhA1kvkDx1sj56ZFX9m+uTAY1K/xdTA9vSQz2h+hXIm3M71V88LphzZIb\n6//LB8VnqwVnlBwqkMnoJsfZ3hcbqrta8q3GwvLpwWdTkdrHhC0M/22V4pha\nvA2vutihjcTDG+iYdWMvOpp6CCs1ijB2CDR/IsYgmOjmTWpsj+mSoTXu6PAb\nZoXvekFVt8mmkLE5mG+noJaJwElAERb96fHskMaCWfdo6jKMOYhBVR+n6K6j\nYtgFVp+IzWxr8B2qE9leS5HuUIJZ9wzR/ggO/cXcNJoYXSomShwdLM67j3dY\nqAhEJwMwPpBKx/w2SAQh8632AsMGEkkfKP954uNkimHc7sf1kSsDUis712r3\nLP0OAJUHrKSbG4AXVd9uO8OcuOU/D8IdzmkithRAgV2K1AAUouyVUXpoaQPF\nt0Ws\r\n=uZZB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+qTgoHxgVwkpUPavzb2NurlANxKbsI18cD5fo7NCnHAiBNCcdLzRlK55XgvysYv0LHJMUY2yaWGq5YJ5cniy6N3A=="}]},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.1.0_1565272188335_0.5025497337203415"},"_hasShrinkwrap":false},"1.1.1":{"name":"tssrp6a","version":"1.1.1","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"@types/crypto-js":"^3.1.43","@types/jsbn":"^1.2.29","crypto-js":"^4.0.0","jsbn":"^1.1.0"},"devDependencies":{"@types/node":"^11.13.8","husky":"^2.1.0","lint-staged":"^8.1.5","nyc":"^14.0.0","prettier":"^1.17.0","tap-diff":"^0.1.1","tap-junit":"^3.1.0","tape":"^4.10.1","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"yarn tsc --build tsconfig.json","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report"},"husky":{"hooks":{"pre-commit":"yarn lint-staged"}},"lint-staged":{"linters":{"*.{ts,tsx}":["yarn prettier --write","yarn tslint -c tslint.json --fix","git add"]}},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git+ssh://git@github.com/midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","gitHead":"bec12c369c96a664a4e9e3fd6c5e09e7054bd655","bugs":{"url":"https://github.com/midokura/platform-frontend/issues"},"_id":"tssrp6a@1.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"dist":{"integrity":"sha512-hvKNfzfKQBbGc9AucQi34V5P4alGuHulXXDCsJ290NuB4b8Q/PpaLdGuL8tR7sKqirbTINOoAOkwHbBMNjYHIw==","shasum":"7ee031e1d5859fa5afa2142d73d72808def3a877","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-1.1.1.tgz","fileCount":26,"unpackedSize":53914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRf7ACRA9TVsSAnZWagAAg3oP/1bF2zJz84IfxEUszhM8\npDIcXDjajYTFtIJMQvNUcVYcazKW7yUkUbA8E1L2TgCdhafAM/LPozZFvQKb\nFt2WnT91QQHtTG+LexQNBsEROxL2JB9mqhlIrg3bRAmF05EUlrXBlz+KthLm\nAKyKOJdRVipVrPa+VzYdthWjYuE5Kd5y9qTlpLH5My6f60/+fU0hcNs00jF6\neEAQrceiE5dJvIBFU4D3xUGM4yR+W+0N3RHrOUyFUBzRPxVdRAxlv+LYXE3n\ngRKmXIA8Ps4gGhTwdJd7o6xyTz/gqIj6Gad7HnJN78vyouYywFypzEKo2zWb\ndxMXD5aPzAfddCycFAhFHQz3b13o+Ztmxbge6RKMxoGxkbKl9LNUcIi+MkpX\nMAZnvfGBxumfM+fENqzEYu5pJdCEQy5aK6s8y6/eGXM3lFOPI+o0A2u3hoWW\nlTNLA0fUkL+v9xVD++lZ1cMqmyc3YVV/1Wzy61FdPRexiYcEF85RFZHHd1ls\nro7sx7bqf+SHompe6McAR3cwYfFOQLfrfxE1LbyAsOdBts22ZB/wcxg7Q8Lg\naEQPQZsW1FCS4QGIcHMmMkHtFUBSP8ZoOTSKKstwtwGE/2q5axvX252IBIpY\nIIU6fFuoS/RFaAhGagTesP963jIRRo2kJa1ywIOHHnrWiEIoVwI3gLOcaiav\nNX1e\r\n=n2oG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFm0jedQAwIqM6Jlbnx5vhT/J07Y4lEDiKLQbMFMfYLCAiBRfquYk6jh8v6MNNJ+dAlaql01rs++skEuDTUtcckcTQ=="}]},"directories":{},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_1.1.1_1615199936364_0.5778407522675855"},"_hasShrinkwrap":false},"2.0.0":{"name":"tssrp6a","version":"2.0.0","main":"dist/index.js","types":"dist/index.d.ts","private":false,"dependencies":{"bigint-mod-arith":"^3.0.0","crypto-js":"^4.0.0"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"^1.0.1","@types/crypto-js":"3.1.43","@types/jsbn":"1.2.29","@types/node":"^15.0.3","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","eslint":"^7.26.0","nyc":"^15.1.0","prettier":"^2.3.0","source-map-support":"^0.5.19","tap-diff":"^0.1.1","tap-junit":"^4.2.0","tape":"^5.2.2","ts-node":"^9.1.1","typescript":"^4.2.4"},"scripts":{"build":"yarn tsc --build tsconfig.json","test":"TS_NODE_COMPILER_OPTIONS='{\"types\": [\"node\"]}' yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report","lint_formatter":"prettier -c 'src/**' 'test/**'","lint":"yarn lint_formatter && yarn eslint src test","format":"prettier --write 'src/**' 'test/**'"},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","licenseText":"MIT License\n\nCopyright (c) 2019 Benjamin Grosse, Dmitry Bufistov, Denis Kruschinski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"tssrp6a@2.0.0","dist":{"shasum":"c222cee8d144c02d2070a1e7c711fa5a26f79bba","integrity":"sha512-K+IIl+hk2RL6L0mDHEt3MUstTz+i8IdD7nsjYyxrt2Kyp8MG0W7JbGQtY0H+JA1bG/ePxtFCOEzLuqTZHU65dg==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-2.0.0.tgz","fileCount":26,"unpackedSize":49346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgn3yLCRA9TVsSAnZWagAA930P/2841DMmPtaorUZudssR\n+JJ2A4+36PbIHt+VV7GmGgNURIZmhoqPZgOcPENTy840SDt/gm8N/D9cxAzE\nm6PjHgmK/yVyJ/NbBGbFob85bXcdzctL9Ll6XzvQuaE9pPnENG5ZfRkiuQZe\nDPTgHxosOATUYEoHM2hvMXJTsrORSLdnhQP2Z+XAqAnIxlaOcaHyaAU1H1Wu\n98Zw3K4N6KOoIyot6Tyxoe028KfjVdQ8qDjpdRPJkAcDYObpaR+OlpWlezs0\nUPAr9J8LwjmaHohXBYGBTL8Lu3f64wJEkKapAliMBZ2ugXExt8EcJBp33bvR\nbrobuxpHibma3RUXOfGSStiMmWhAo2s/5g7WujzPEPDgmWSAp0Pw5UhoWe8v\nflbE71hag2jftBZDGMbZs0x0xgzK0iQP7LYciyMwx1pRIwbroLPDx+oitFl4\n2KqmR83GGOqga+RA8KXYB5q2Cgot4FpvW/4+NSNfpUZFGvDIN8qejRk+1jJG\nbr/QKAEjAVIWKkc1oBY452WR29d6MWzEl4/Ia4EcTzzQvstyvhyJD0vWNEcY\n8qmZR0kxpZik+dhGnKfx8ae8NKUrA6eoXJT1T+3Bj0HsHmV/rCQP2FvVYo+w\n2umedKpSWBQfc+RTKVEOaPHDic0T07uRJb9XL0l0/8W8KsfyP7o5MSPVQBQ0\ng1zJ\r\n=qg6W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1PQSP1pBVmPSsMGlqLOP2cn0OvBccOUzKWra8aoqdlAIgXk1uN7qY7tMpdfxKlECVAtK06v1Us24MRJahJL84qDo="}]},"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_2.0.0_1621064842491_0.5894002980835074"},"_hasShrinkwrap":false},"3.0.0":{"name":"tssrp6a","version":"3.0.0","main":"dist/index.js","types":"dist/index.d.ts","private":false,"devDependencies":{"@istanbuljs/nyc-config-typescript":"^1.0.1","@magic-works/ttypescript-browser-like-import-transformer":"^3.0.0","@types/crypto-js":"3.1.43","@types/jsbn":"1.2.29","@types/node":"^15.0.3","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","@zoltu/typescript-transformer-append-js-extension":"^1.0.1","eslint":"^7.26.0","nyc":"^15.1.0","prettier":"^2.3.0","source-map-support":"^0.5.19","tap-diff":"^0.1.1","tap-junit":"^4.2.0","tape":"^5.2.2","tape-promise":"^4.0.0","ts-node":"^9.1.1","ttypescript":"^1.5.12","typescript":"^4.2.4"},"scripts":{"build":"yarn tsc --build tsconfig.json","build:esm":"yarn ttsc --project tsconfig.esm.json","test":"yarn tape 'test/**/*.test.*' -r ts-node/register","test:report":"TAPE_RAW_OUTPUT=1 yarn test | yarn tap-junit -o reports -n unit","nyc":"nyc -e .ts -x 'src/crossEnvCrypto.ts' -x 'test/**'","coverage":"yarn nyc yarn test:report","coverage:report":"yarn nyc --reporter cobertura --reporter html --report-dir reports/unit yarn test:report","coverage:number":"yarn coverage | grep 'All files' | cut -d '|' -f 5 | sed 's/ //g'","lint_formatter":"prettier -c 'src/**' 'test/**'","lint":"yarn lint_formatter && yarn eslint src test","format":"prettier --write 'src/**' 'test/**'"},"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","keywords":["srp","srp6a","authentication"],"homepage":"https://github.com/midonet/tssrp6a","licenseText":"MIT License\n\nCopyright (c) 2019 Benjamin Grosse, Dmitry Bufistov, Denis Kruschinski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"tssrp6a@3.0.0","dist":{"shasum":"852ebc4816789f51936b1d790999ce736c7e3774","integrity":"sha512-kGvFhbBfQhiAhGrVO++QFpyVLqk2dy32oEcUvc8ymkuRTufSLZwQqp/QpYbBItQ9Wr1p1IC61AS9dBpGOTr7dQ==","tarball":"https://registry.npmjs.org/tssrp6a/-/tssrp6a-3.0.0.tgz","fileCount":54,"unpackedSize":119053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgun3oCRA9TVsSAnZWagAAA0gQAIp/JzHBuvkt2nrNeCcC\ny/m1Km/MZyJfMYBRg+cZQqymtmSD7o1P3GPVdrZ12AH37E2DZMQxGnAIqAh9\n22JW4xtRnkL+uhAFIEU7Pv2UeuhEP+LUsfYyMuSn48GHDf0aqNauoasuVHnw\nA4omFvb184WNF28S22zxjNz9H6EhFlQE6AQ35cadxq1DXiFxulofiszcvoiv\nxe6GSKv59XiZ+PQ+eAMu2Q/hyM97K0M3G52by7PAZo2mcAO7MknKJylaY6RB\nSvp2E96TIbxoZDjQ0jms7MQwTf5z+j+/S/RwoiU9eIsx/KhpRA+P1fmFU8y0\ngQeWqts98JAGpRfCdQQeRIgR3aIOpYCHmKDXyoHnK90C8MDuHJaIdlqUjZjY\nvWtegSKOAEkWv9/zfUcoyap0fzt/c+eLCCddX/WBnLo75AaLk7VkX7yfO3hs\nOa3VnAxP66TK5OamCE0ONflC7lDbpXHBDUFd5axkabcaipNK7SDTTbL6Is0r\nDSXtwZocl9KeLvlzDNi10I69AbyfGkggFiVKVoQ37ua+FZT7Yk2YZjg76Y38\ncNk23TPxjjdBtzuGgHwsOczO0MZZn8+DFxlHRMxmY6OEsXN/+7SkXUGlnpii\nv5MtrSemIKvKQl/lSyCIwuRHyrKX7WHi7MlqOGPPqOC6rXQdtHh60uUeeG1p\n7kKG\r\n=3ADp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDogwWXoakSetuPoRTYgYI28eJBzT/bds4Oa2LfPUyoVAIhAJNZdLNgroePQvNHT2Qob8uT5k1td/C0+xPRsaYaN0oA"}]},"_npmUser":{"name":"benjamin-midokura","email":"benjamin@midokura.com"},"directories":{},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tssrp6a_3.0.0_1622834664707_0.00531043532806974"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-02T16:07:08.332Z","1.0.0":"2019-05-02T16:07:08.502Z","modified":"2022-05-22T09:04:00.488Z","1.0.1":"2019-05-03T08:35:34.494Z","1.0.2":"2019-05-03T09:04:56.726Z","1.0.3":"2019-05-03T09:06:04.616Z","1.0.4":"2019-05-03T09:07:20.701Z","1.0.5":"2019-05-03T09:33:57.216Z","1.0.6":"2019-05-03T15:32:09.813Z","1.1.0-beta":"2019-08-08T09:51:06.930Z","1.1.0-beta-2":"2019-08-08T10:30:57.582Z","1.1.0-beta-3":"2019-08-08T12:26:21.931Z","1.1.0-beta-4":"2019-08-08T13:13:14.914Z","1.1.0":"2019-08-08T13:49:48.454Z","1.1.1":"2021-03-08T10:38:56.545Z","2.0.0":"2021-05-15T07:47:22.642Z","3.0.0":"2021-06-04T19:24:24.825Z"},"maintainers":[{"name":"benjamin-midokura","email":"benjamin@midokura.com"}],"description":"SRP6a client and server lib","repository":{"type":"git","url":"git@github.com:midokura/platform-frontend.git"},"author":{"name":"Midokura"},"license":"Apache-2.0","readme":"# Midokura TSSRP6a\n\n[![npm version](https://badge.fury.io/js/tssrp6a.svg)](https://badge.fury.io/js/tssrp6a)\n[![CI](https://github.com/midonet/tssrp6a/actions/workflows/main.yml/badge.svg)](https://github.com/midonet/tssrp6a/actions/workflows/main.yml)\n[![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/bgrosse-midokura/6d88c7cb89cc67292dc093e5d7bcede3/raw/tssrp6a-coverage-badge.json)](https://midonet.github.io/tssrp6a/coverage)\n\nThis library is a TypeScript implementation of [Secure Remote Password](http://srp.stanford.edu/) SRP6a.\n\nSRP allows a user to authenticate to a server without sending the password (zero-knowledge proof of password)\nusing generated private/public keys.\n\nSee\nhttps://en.wikipedia.org/wiki/Secure_Remote_Password_protocol\n\nhttps://tools.ietf.org/html/rfc5054\n\nfor all the details.\n\nYou can see a real-time [demo here](https://midonet.github.io/tssrp6a/demo).\n\n## Requirements & Dependencies\n\nThe `target` of TypeScript output is `es6`.\n\nThis package has zero dependencies. It only needs [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)\nnative support, or a polyfill which is not included.\n\n**Note**: This module makes use of [`Crypto.subtle`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle) and therefore only works on HTTPS.\n\n## Usage\n### Signup / registration\n\n[![Diagram](docs/signup.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBzYWx0ID0gY2xpZW50LmdlbmVyYXRlUmFuZG9tU2FsdCgpXG4gICAgQi0-PkI6IGNsaWVudC5nZW5lcmF0ZVZlcmlmaWVyKHNhbHQsIGlkLCBwYXNzd29yZClcbiAgICBCLT4-UzogZW1haWwsIHNhbHQsIHZlcmlmaWVyXG4gICAgTm90ZSByaWdodCBvZiBTOiBzYXZlIGJ5IGlkOjxici8-c2FsdCwgdmVyaWZpZXJcbiIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In19)\n\nThe user requests a registration page, the browser will generate a salt and take the user's identity and password and generate a verifier.  \nThe browser sends email, salt, verifier to server. The server saves this to storage.\nHere is a complete example of signup:\n```JavaScript\nimport {\n createVerifierAndSalt, SRPParameters, SRPRoutines,\n} from \"tssrp6a\"\n(async ()=> {\n    const srp6aNimbusRoutines = new SRPRoutines(new SRPParameters());\n    const userId = \"hello@world.org\";\n    const userPassword = \"password\";\n    const { s: salt, v: verifier } = await createVerifierAndSalt(\n        srp6aNimbusRoutines,\n        userId,\n        userPassword,\n    );\n// store salt and verifier in a database\n})()\n```\n\n### Signin / login\n\n[![Diagram](docs/signin.svg)](https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgcGFydGljaXBhbnQgQiBhcyBCcm93c2VyXG4gICAgcGFydGljaXBhbnQgUyBhcyBTZXJ2ZXJcbiAgICBOb3RlIGxlZnQgb2YgQjogVXNlciBlbnRlcnM8YnIvPmlkLCBwYXNzd29yZFxuICAgIEItPj5COiBjbGllbnQuc3RlcDEoaWQsIHBhc3N3b3JkKVxuICAgIEItPj5TOiBpZFxuICAgIE5vdGUgcmlnaHQgb2YgUzogZmluZCBpbiBzdG9yYWdlPGJyLz5ieSBpZDo8YnIvPnNhbHQsIHZlcmlmaWVyXG4gICAgUy0-PlM6IGIsQiA9IHNlcnZlci5zdGVwMShpZCwgc2FsdCwgdmVyaWZpZXIpXG4gICAgUy0-PkI6IHNhbHQsIEJcbiAgICBCLT4-QjogYSxBLE0xID0gY2xpZW50LnN0ZXAyKHNhbHQsIEIpXG4gICAgQi0-PlM6IEEsTTFcbiAgICBTLT4-UzogTTIgPSBzZXJ2ZXIuc3RlcDIoYiwgQSwgTTEpXG4gICAgUy0-PkI6IE0yXG4gICAgTm90ZSBsZWZ0IG9mIEI6IEJyb3dzZXIgbWF5IHZlcmlmeTxici8-c2VydmVyXG4gICAgQi0tPj5COiBjbGllbnQuc3RlcDMoYSwgTTIpIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0)\n\nThe user starts an authentication session by entering his id and password.\n\nThe id is sent with a request to the server, which finds salt and verifier for that id. Server executes step1 to generate private key `b` and public key `B`, and responds to browser with `salt` and `B`.\n\nThe browser generates private key `a`, public key `A` and computes `M1`. Browser makes requests with `A` and `M1`.\n\nServer verifies that the credentials were correct with step2, using `b` and `M1`. If successful, it also takes `A` and generates and responds with `M2`.\n\nBrowser may additionally verify the authority of the server from `M2` with step3.\n\nNote: `a` and `b` are generated for one authentication \"session\" and discarded immediately.\n\nHere is a complete example of authentication session:\n```JavaScript\nimport {\n createVerifierAndSalt, SRPClientSession, SRPParameters, SRPRoutines,\n SRPServerSession\n} from \"tssrp6a\"\n\n(async ()=> {\n    const srp6aNimbusRoutines = new SRPRoutines(new SRPParameters());\n\n    const username = \"hello@world.org\";\n    let password = \"password\";\n\n// Sign up\n    const {s: salt, v: verifier} = await createVerifierAndSalt(\n        srp6aNimbusRoutines,\n        username,\n        password,\n    );\n\n// Sign in\n    const srp6aNimbusClient = new SRPClientSession(srp6aNimbusRoutines);\n    await srp6aNimbusClient.step1(username, password);\n// erase password at this point, it is no longer stored\n    password = \"\"\n\n    const server = new SRPServerSession(srp6aNimbusRoutines);\n// server gets identifier from client, salt+verifier from db (from signup)\n    const B = await server.step1(username, salt, verifier);\n\n// client gets challenge B from server step1 and sends prove M1 to server\n    const {A, M1} = await srp6aNimbusClient.step2(salt, B);\n\n// servers checks client prove M1 and sends server prove M2 to client\n    const M2 = await server.step2(A, M1);\n\n// client ensures server identity\n    await srp6aNimbusClient.step3(M2);\n})()\n```\n\n## Recommendations\n\nSRP alone only prevents a man-in-the-middle attack from _reading_ the password, but such an attack could also inject code into the browser to hijack the password.\n\nAlways use SRP in combination with HTTPS. Browsers can be vulnerable to: having malicious certificates installed beforehand, rogue certificates in the wild, server misconfiguration, bugs like the heartbleed attack, servers leaking password into errors and logs. SRP in the browser offers an additional hurdle and may prevent some mistakes from escalating.\n\nThe client can choose to exclude the identity of its computations or not. If excluded, the id cannot be changed. But this problem is better solved by an application schema that separates \"identity\" from \"authentication\", so that one identity can have multiple authentications. This allows to switch identity + password, and also to user more than one way of logging in (think \"login with email+password, google, or facebook\").\n\n## Serialization\n\nThe SRP protocol and therefore this library is stateful. Each step sets various internal state. Due to the randomness of some of this state (namely the public and private values), repeating the step methods with the same arguments is unlikely (almost definitely) to result in the same state. This proves to be an issue when using a stateless protocol such as HTTP (as opposed to websockets). The server \"session\" state (the server step 1 state) might not be easily kept in memory. Therefore, we provide a way to serialize and deserialize the step classes in order to restore state. [serialize.test.ts](test/serialize.test.ts) shows some examples here's an explanation of how it works:\n\n```typescript\nconst serverStep1 = await new SRPServerSession(TEST_ROUTINES).step1(...); // Each step returns a class, in this case .step1 returns SRPServerSessionStep1\n\nconst serializedServerStep1 = JSON.stringify(serverStep1); // Some of the step methods (see below for which ones) have a .toJSON method that returns the internal state. JSON.stringify calls .toJSON\n// you can now store serializedServerStep1 in a database or elsewhere. There are security implications, see below. \n\n// when you are ready to restore the state, call fromState on the same step class used to serialize the data (in this case SRPServerSessionStep1) to deserialize\nconst deserializedServerStep1 = SRPServerSessionStep1.fromState(\n    TEST_ROUTINES, // first param is the routines\n    JSON.parse(serializedServerStep1),\n);\n\n// deserializedServerStep1 is now functionally equivilent as serverStep1 because it contains the same state\n```\n\nSupported steps/classes for serialization are:\n\n- `SRPServerSessionStep1`\n- `SRPClientSessionStep1`\n- `SRPClientSessionStep2`\n\nWhile the password is **never** kept directly in the state, hashes of it are. If an adversary is able to access the serialized state it will likely open you up to some kind of MITM attack and depending on the step, may allow an attacker to perform a bruteforce and/or dictionary attack to retrieve the password. **Do not expose the serialized data.** For clients, this means do not send it over the network and be careful where you store it. For servers, only send it in encrypted form to parties you trust (such as your database). If you believe state at anytime may have been exposed, it is suggested you change passwords as soon as possible.\n\n## Notes\n\nThis package's default configuration matches the following Java's \n[Nimbus SRP](https://connect2id.com/products/nimbus-srp) configuration:\n```Java\nSRP6CryptoParams.getInstance(2048, \"SHA-512\")\n```\n\nThe default routines does not\nstrictly follow SRP6a RFC because user identity is NOT included in the verifier generation.\nThis makes possible for malicious server to detect if\n[two users share the same password](https://crypto.stackexchange.com/questions/8626/why-is-tls-srp-verifier-based-on-user-name/9430#9430)\nbut also allows client to change it \"identity\" without regenerating password.\n\n[This example](test/srp6a.test.ts) shows how to make SRP client strictly compliant with\nSRP6a specification.\n","readmeFilename":"README.md","homepage":"https://github.com/midonet/tssrp6a","keywords":["srp","srp6a","authentication"]}