{"_id":"@noble/bls12-381","_rev":"13-baaf6101175cfa6ef5ff48477e6dfa79","name":"@noble/bls12-381","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"@noble/bls12-381","version":"1.0.0","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.0.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/noble-bls12-381","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"97395a39e89f76f7fbcc92b499d28fcf1cf43bfe","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.0.0.tgz","fileCount":7,"integrity":"sha512-58IMoseK4urY+18bwHgaKT2MVV0DdxcNArUqTyBkB+6BsketbwhcG2SLKGAwBFKSvhtGYgkExn1J+YN8NLq5Mw==","signatures":[{"sig":"MEUCIBOHchzNw0t7wjODEXTQp7G5kXM72u/WgKZRO+pVAyGpAiEAgWKiRcn6LoWsHRohGZ9kItXZLdteS+r4id1MH2Yr6AI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87163},"main":"index.js","types":"./index.d.ts","browser":{"crypto":false},"gitHead":"913b3584e0683734a5f5ed143adfc2916271f185","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc -d","build-release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.1.0","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"16.11.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","rollup":"^2.52.2","ts-jest":"^27","prettier":"^2.3.2","fast-check":"^2.17","typescript":"^4.3","@types/jest":"^27","@types/node":"^16.9.2","micro-bmark":"^0.1.3","@rollup/plugin-commonjs":"^19","@rollup/plugin-node-resolve":"^13"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.0.0_1635978682624_0.855843708270563","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@noble/bls12-381","version":"1.0.1","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.0.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/noble-bls12-381","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"7945f61e2067ddc75b2a22a947b1b0c60290d1d5","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.0.1.tgz","fileCount":7,"integrity":"sha512-kZbZMEvXiosdAWTdfMUBRK8Gbk9jz6b7Psv1ciGfdxZ8yG9tMef+jgyCpdT/FdgI4e+e7KnE5QtrfjZmeIZA6Q==","signatures":[{"sig":"MEUCIQDYPDdHfXkPb3uGAlMoZGPEoroN8o25rwC5fbBmvQaVlQIgBeno9jMKgJS8/nfs88FwKbQvcN6h59+9gsDwSenOKfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87220},"main":"index.js","types":"./index.d.ts","browser":{"crypto":false},"gitHead":"2a72499e1f485f151b4ecadba9e3b707ae674196","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc -d","build-release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.1.0","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"16.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","rollup":"^2.52.2","ts-jest":"^27","prettier":"^2.3.2","fast-check":"^2.17","typescript":"^4.4","@types/jest":"^27","@types/node":"^16.9.2","micro-bmark":"^0.1.3","@rollup/plugin-commonjs":"^19","@rollup/plugin-node-resolve":"^13"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.0.1_1636661636778_0.4450444841872745","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@noble/bls12-381","version":"1.0.2","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.0.2","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/noble-bls12-381","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"b09df97284fe8e4cade84bcd285f71a4bc6c10f8","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.0.2.tgz","fileCount":7,"integrity":"sha512-Y/Rf+xbsCXrqZuc1guQiQbjUElmMJ5hKOvpWB/CoIkaK/zxm+TXFSUmaadFRsRmT6l9ASzPOKib/wXXvmAYdeQ==","signatures":[{"sig":"MEYCIQCeD1bfJmSmJSwBLQOfWTIYHweoB76K3kX3Hgzs08tMIwIhAIn1jOcoNHe1n7YwDPHmn+hKGmkYiDkIWOGCwqRLjBa3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyBBZCRA9TVsSAnZWagAAEfEP/2GuyR9ETcuhHHac4ebt\nvbEgLbS1eVSU9hqnk/hw6cbfGaOP/E7P2zvpvHOxt1QkazlQOH84G69LqLh8\n0B4IABOZpAw2O2ugQNhRACyvF04YTY1myWHTqS/oHjoFUim4WvX8JK2OZR/K\nSm4sQfBHrtczhiCbSdyzeYIchmHQ0cJzfA0e479+Z7xtpp/VSZqWXymga99s\nKf4baADw3vHyVJSW0xJ5fqXuEeCgWrZ7gFWY9V+Kt2fQ8ZZhoocIIfyL6haE\naRecYbXyl+a+75vaKB9v+CbhDYpS3ntVgmRNFY3t5xbvT6GTmL/U8HFa6s3r\njzIzZ26cu8ejyNAyaV20wdna+ONrF5LYE6f+S356udxQtyYWIpJ800CASc+A\npF0Fn5KwvRWIaMSYGXhWi3MzEo1Zc65pRoOxr2EnIvPY4TWWosXMsVzGGUKx\nRxNvNHvj2rKv0t0JNPSS3lmPaSBmETJ4+Zh7WMQyDd8MCVaFC6XCDR1PTKnq\nn5Ok7m8ptN1kDVfXt7Thz9pWmlNPZL2uq6fFssg0pcopudrJDZo9zBTsH9CV\nXBvbFGnRwGylqH0vYMqVSfID7rQxcrauChwCMXzhOraYdUu9Toir1bqWkF29\nODV+ob4flKsRYK4DF5y9oQNDIys7wq/hcNkatcjU4qJola82YGarL1yBDYP1\nQzad\r\n=pbMH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"./index.d.ts","browser":{"crypto":false},"gitHead":"2c9fdd6aa2b57cb12230d67541915ab12fb16272","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc -d","build-release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.3.0","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"16.13.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","rollup":"^2.52.2","ts-jest":"^27","prettier":"^2.3.2","fast-check":"^2.17","typescript":"^4.4","@types/jest":"^27","@types/node":"^16.9.2","micro-bmark":"^0.1.3","@rollup/plugin-commonjs":"^19","@rollup/plugin-node-resolve":"^13"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.0.2_1640501337537_0.04411535261018762","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@noble/bls12-381","version":"1.1.0","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.1.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/noble-bls12-381","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"deac3bfceea2870cf20689e3a014188669ef8343","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.1.0.tgz","fileCount":10,"integrity":"sha512-HgBTLCCy6vWZPD1vdzCREiZLnUwHj3z6Nj3NxgFezRYJAM10QvyuzoQmeH3uvaR9IJlxmrqXO6mCgZOQ6i7o1A==","signatures":[{"sig":"MEYCIQC9K8upvbFJgxuI4b0YmVt363bewQyguW7l9EyH8CkAzwIhAPkQl5wdafOXrsYSLChoWwG5bWSFe8girasVJ+EW6t2u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":147029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzbl3CRA9TVsSAnZWagAA6YEP/RPKXhdwgMVKf2ZA4rR4\nkdYPfOkb1zy5PhFKeYjIvHBd3SnIysT4+UPnHCo6BMuD6Yj23IPsSaBBrF7G\n7+vlMKDUL5FmY2Q/3m9YltY72FDxEJTTuaD97VyGZIBmzs8TudXFUFk1qIhw\nnfN5YMNf70HrxFoGB7JKdvxVSdsVcPBwrMx1fs8L1AWWroys5EQTbAhoc6BY\nwXsPXVdc9N6w2iLqdX91Dfe1uumo2nXypSAY+fWOEu1VVy7IREUO9ClQl9vB\nrAbInYkz5Rv6Elscj9AEqqYDlhIIayaJkjHSop3zwt1f86xYLZpK3zb9C5if\nNXnPmafhqoSKtjkOGR1prlMJse3RuFsr+MFT3RnOJCMjcUdj+du95NQIwls5\neppurgDkHBT2nwopS67yizJO23oN3Xps/tYv+JH6EHTjthbvvbUzl9mrPnRC\nB76XtToQi6y2N8jd7MUHWQrVR4Pylj4pVLvuFkyEJVIE1f00kjb8GzrbeQv8\nnV/GCKL6dsgzyNg3QVbBySvJjavo4DVg5ImwPoYG6NUrKANqCbGauamb17Fj\nqi/bCm6Dyz8jCsORvCstLkymz/nSKm/YEvYOYJlfWhr8cnTqLB+pqS40qYk+\nKddN+F49UTmXmg4hTbtqA1KSUO/qIEr599slE+t/pwM97tQnR1e4/rNRUbcd\n0SfK\r\n=zpyf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","browser":{"crypto":false},"exports":{".":{"import":"./lib/esm/index.js","default":"./lib/index.js"},"math":{"import":"./lib/esm/math.js","default":"./lib/math.js"},"./math.d.ts":"./lib/math.d.ts","./index.d.ts":"./lib/index.d.ts"},"gitHead":"9b9be77210eb1133cad64eabe0ca83407419250d","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc -d && tsc -p tsconfig.esm.json","build-release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.1.2","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"16.13.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","rollup":"^2.52.2","ts-jest":"^27","prettier":"^2.3.2","fast-check":"^2.17","typescript":"^4.4","@types/jest":"^27","@types/node":"^16.9.2","micro-bmark":"^0.1.3","@rollup/plugin-commonjs":"^19","@rollup/plugin-node-resolve":"^13"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.1.0_1640872310975_0.13980912012603874","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@noble/bls12-381","version":"1.1.1","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.1.1","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/noble-bls12-381","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"460d2977ab7496c36cb77947770b802b48a6d926","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.1.1.tgz","fileCount":10,"integrity":"sha512-wlxHBYJLQrtoReOBo1mbqq/yi/bn0ajH25lts7WCc+AxAlhoNOmcHtIhIeEsjW9At2b8CVM66F36ijjtmcHasw==","signatures":[{"sig":"MEYCIQDRk3eAAKBT2K/Mvpx5W4/Sig4cLEs4Vx+TtW3UN4yuPgIhAOipMlsUv07Qb2bo0RzeKaEHkTdr3BMQ1hoc1YbIR7cV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":147031,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0iWdCRA9TVsSAnZWagAAH2YP/iNv/FzTUlskoa7NQU8F\nH/4JrpE5gpQ+eZbk5bDMao/awiok4Qkss9MF9sOfFMXaznC2iVh40C7e0+1/\nCDtjKYjBTKy4LfOm1PuAILBNvTecazGqA790OQmZP1EoVzvzYXzECII51m2s\nDF/ETNR4egCou49ytgcnbVf0BMT1SA7q9bzYQrtg4s1nmpR3N3iCp5P4aXw5\nTuAt7FbheIkg8jTrdGTIOh12jqM2JDkw079PFs+ZQQdY2lHP36fvSTe+VUon\n0DmU7ogoL5wpX2448a46+O6B3pVKH4zj2/kQzQK3QGT9s1VwqgV5XgBN+Et2\nGy2ietfBwhA6rwZDMTD7ai+1wwQSNiY5JuJels5hZBLnuoP/9FwsfNChoCm9\nwzZjA0g/Shlq21GG8ip+v8cAwK/CjV3HhLnRcbLnw/IWjy5Fuxr0zRLfzI9i\nnqs6Uyc0vzWdEqNUCogyPR83+IhO1ZDZNSI/5xKOSW8mun4mZfQZKZ6jKj4w\nD4ej0FIRpBNH3BEaZp0lwkRNjn82nnWwOKCDn+WHls6R46pbO0wXexm7+fSl\ndrVoEiJythYX2MMizR6N+C2Bpp+L/eIqbnMZ44/73V/B2gkf8Qi9aM4bo5wR\nFf3zAsuF2qKYVI5a6GMksD6a54RZN+rBXjQr2lcy+uhN3x3oJ6ddwzCGTNnP\nVYfh\r\n=JRW4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","browser":{"crypto":false},"exports":{".":{"import":"./lib/esm/index.js","default":"./lib/index.js"},"./math":{"import":"./lib/esm/math.js","default":"./lib/math.js"},"./math.d.ts":"./lib/math.d.ts","./index.d.ts":"./lib/index.d.ts"},"gitHead":"b5d18d74629dfa1cbff5d3f58273b037a2d6169f","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc -d && tsc -p tsconfig.esm.json","build-release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.1.2","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"16.13.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","rollup":"^2.52.2","ts-jest":"^27","prettier":"^2.3.2","fast-check":"^2.17","typescript":"^4.4","@types/jest":"^27","@types/node":"^16.9.2","micro-bmark":"^0.1.3","@rollup/plugin-commonjs":"^19","@rollup/plugin-node-resolve":"^13"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.1.1_1641162141341_0.24842164602478545","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@noble/bls12-381","version":"1.1.2","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.1.2","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://github.com/paulmillr/noble-bls12-381","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"e9918439246f32a80ad006db49ef3a1b0f576c2d","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.1.2.tgz","fileCount":10,"integrity":"sha512-PLPxjt98aYPGytBVQvqYJqEt98jOCCvqJ72cvTbLI6vLkNsztLr2q4MQYKgH0rjMS5EjZsquU8nVwj1K8KiqhQ==","signatures":[{"sig":"MEQCICUh5khSfTnTAULQhDFn2UwUyPBng4AAzw7l9sHIp6e0AiBKjradaXVB4f7oBTWeSsa/Ac4r6TC5VDzDqYzh5TrypA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":147314,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0ioOCRA9TVsSAnZWagAA+nUP/Ap4VRhRW38s8DF5Uqpn\nUYzN6SWL6oBrB8dV+B0KNfHifxCFktd4M8rnsmd+Cue+OeT0VT2s7oqewum4\n9Qct2PTzA09U1XxkS0oL290Hc4lP5351BOvpc6z5xdlPmsapAZrFuD9eZJ2r\nuO0v0K0OAY+sQqf5iieSy+O+BatJnjAw+3CoGtZ1u3Osx8WyNoMTdmegqsvn\nmPM/SpEIogI7FENHT0Fxf+6yU3Kgwvg5Wdlr/yQViwD8E7GuzgiUkNgxtSkQ\nhkKZnEFLkaeGUNXKtN1Ptvps6e76byIKLLaerFUOdMXv9Fk9Ou4MaVvF4MxX\nEAG8L4Z1qO11tOCTU9aNfoFbrUFNwWNVXKt+w+Xy8vy1hHf5hlm/5II1YCXK\n1i6VJq6JDbZ9WU2/ILXsLG43ciYPxuiOzbndPX4sUt1FLYht058S3vUzadOQ\nhQUW1eTTxYsm3jkIHNbynGFOVxHD7ud4GYe5+ZaV1joYsWKX3erx208k/SeV\nTz4aNoSRdLeqRPF8l/zn0vUe4y28G5FW6th3yB0taWv3UOgLFEffsnAaEb3K\nrqTwTHoqSoiWZ9YRswBk1woZXAeYcXCph33JLieowI9ouof7NFY6iF0idEBQ\nTbfIqmJI7lp7QpYEw8zxGnXqSnCkiVBtQeKYgbuZ9NI41Bn8PxXSobNJOYaz\nYUx+\r\n=aCks\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","browser":{"crypto":false},"exports":{".":{"import":"./lib/esm/index.js","default":"./lib/index.js"},"./math":{"import":"./lib/esm/math.js","default":"./lib/math.js"},"./math.d.ts":"./lib/math.d.ts","./index.d.ts":"./lib/index.d.ts"},"gitHead":"60562961869baa5ee0528f509f7bfe275d5e520b","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc -d && tsc -p tsconfig.esm.json","build-release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.1.2","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"16.13.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","rollup":"^2.52.2","ts-jest":"^27","prettier":"^2.3.2","fast-check":"^2.17","typescript":"^4.4","@types/jest":"^27","@types/node":"^16.9.2","micro-bmark":"^0.1.3","@rollup/plugin-commonjs":"^19","@rollup/plugin-node-resolve":"^13"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.1.2_1641163278737_0.8422075261069775","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@noble/bls12-381","version":"1.2.0","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.2.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"0d2f64a922a66fa07526080bcaf63fb7168f377c","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.2.0.tgz","fileCount":10,"integrity":"sha512-4wulV2SGeu4UxlXkNT0K88sG5g23tzmLMGFZgHSMkwz2Cd2zx2YFJNTEghdLioNdludTZQ5iQpMkQxrtyuS0mw==","signatures":[{"sig":"MEUCIFw3/Y0tHM39d3H25fyz4oeVHrfC3RGMZJmfyJto6jGKAiEAjJvUBO+byz87y+0C5hu3wY6zb+pfxqnlaCFcfIWWzVc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":147316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1jnXCRA9TVsSAnZWagAAbt8QAJgYD8ZNwGAHojtX9tHS\nGgTbJDCgf3rrreoma5q6h1i3PUWvk+f8ufFP//D3+cmVXmma1xJIhXB0i69k\nyd0N8Im9Vr61Z7LBGqg32+04X0BRTuee7OE4/rgxDJhegKG+Jquhft12MLmW\nB6Yi3ebniIvLZMoCHWG89pYEtoQsvn4asB6qHqf4Atx5I9QwHAiGSprMTHWx\nbv0Cbdz9lTHlu0fFL15HkVTKmvQDWrdDvAhiXjyG2BgiyShgTgnfJfcrzqyB\nl+TpNimNfMTrfw4auMC2WJmzDMhZy9JoG17Fj4uKaVJcESu/INauNiiJq+9D\n5gJq60/vRnd1a9UwtzVYVV5VU3xySU2DF8nI9CcrTwbvb8ke2T9B51emWj4p\nLFDc0EAKQB1CxZk/5P1OTuX5FsXxTMT+caQzG1xTFOre1pXGCXgd8uNd+Srv\nn+QHw0F8hjNgMLc8kkJQuAYytkEIa3FVbrk27OM4kaqPsPDoHH/OX1G4Nt1L\n+JRLw2J2Z86B31Yx0VvQbyu3t3Gr7+3me2S9stURZZzBjOVUCait5oeM26Rs\nCyek3U7i6cj+OwB7mKC9MCG1Ac5BbLXi9sy57DcC85z8g0PPZytyRFxLBqYN\nxnY4CBbeC5oPadJMT0HdHhHTk7L9QePy+VW+fbdXAqAd6/EBQPzj0iOK5gtQ\nFUj1\r\n=ATzD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","browser":{"crypto":false},"exports":{".":{"import":"./lib/esm/index.js","default":"./lib/index.js"},"./math":{"import":"./lib/esm/math.js","default":"./lib/math.js"},"./math.d.ts":"./lib/math.d.ts","./index.d.ts":"./lib/index.d.ts"},"gitHead":"a864b5c4df56c21984b380319eeefc9887517274","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc -d && tsc -p tsconfig.esm.json","build-release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.1.2","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"16.13.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","rollup":"^2.52.2","ts-jest":"^27","prettier":"^2.3.2","fast-check":"^2.17","typescript":"4.5.4","@types/jest":"^27","@types/node":"^16.9.2","micro-bmark":"^0.1.3","@rollup/plugin-commonjs":"^19","@rollup/plugin-node-resolve":"^13"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.2.0_1641429463472_0.3129788540639449","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@noble/bls12-381","version":"1.3.0","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.3.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"24a50a875b542ddeab755f65103ea99c99a732cb","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.3.0.tgz","fileCount":10,"integrity":"sha512-rYQXhQ+Q6fDYLSO/ZUY9RsDE0Adi2Iua9xXxNxLmO8jXiBZGVxecWQsC1116aRlv3XGLvoZTGqyy5vAcBu368g==","signatures":[{"sig":"MEYCIQDUoA1n/pjpTdtsMbir1SzIctwL/d5dmn7P0j4OpIQd9QIhAPkWDMbZDE6LmDu/RC/t5QsqeQ33O+8r1v1NK4ZWltly","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3UW8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAfQ//fBKorSetmlQQg91mQZ0muf0slEHaoOCr2usRK7bCdWAumrQm\r\naZpbqiU0Nk2baAc4s4rpeiccl7Bvoe9/T3yCWIcSixvdq1ubCWNCyuyxaTfw\r\nNZkHkxtGmp2p7XcTwu6REsPmwqT1D1tVvzn11OBtUM1RJY5IwY/lq3OHWKME\r\nG4xmB6A1Xkx8UhGu1/e9GG/p7WMHEBLR78aZYmJFKoG2pqrLK1kdZR9OUbo3\r\nDIQzfug80MpZGxukYk6ga9NogGAEXeVRtAiql5AqoIPsQhkuQtZemAqznouQ\r\npfN3JpG9ZxQI/Sk0gIf5GfSMD6KFy6QDC/J2FSG+gTC6JO+XjtInATIADvaE\r\nntjeALnzHY7eJQIVdSpYXsuBUlOPQg4E71WqTIYFUG2j2wdrZQ5sKH7z3FwR\r\nweO+o+T1E4vqMgqrcDDjWO6tNgdM3TQWYqZSnoWuKWI7ke73UnE24+XVUQWm\r\n6cdxEV1PfJgijCTN/5w/0BA0CVpYg4lNDcoLCKCaEfcOYbSmwzYNirN8qit/\r\nZg5KNcpd7ErMJYr9GAXVOHClB+qsqwO9n37EZMM7blf2DKigaygxLzpS9XLB\r\nbGdloBIFJulPlJroeZEA1OSJQVSlU0D0Iy4GQ8W6VYD1uoUuJKzRyLP3jFLB\r\ncQqYe86P4M6cD3rgbV4cGpuJllfjqHporLs=\r\n=urcM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","browser":{"crypto":false},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"},"./math":{"types":"./lib/math.d.ts","import":"./lib/esm/math.js","default":"./lib/math.js"}},"funding":[{"url":"https://paulmillr.com/funding/","type":"individual"}],"gitHead":"ea10912fd1a7a0d7473f9dff0dee072d9d8272c6","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc -d && tsc -p tsconfig.esm.json","build:release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.14.0","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"18.6.0","_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.0","rollup":"2.75.5","ts-jest":"28.0.4","prettier":"2.6.2","fast-check":"3.0.0","typescript":"4.7.3","@types/jest":"28.1.1","@types/node":"18.0.0","micro-bmark":"0.1.3","@rollup/plugin-commonjs":"22.0.0","@rollup/plugin-node-resolve":"13.3.0"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.3.0_1658668476743_0.30699658740387004","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@noble/bls12-381","version":"1.4.0","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","_id":"@noble/bls12-381@1.4.0","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"homepage":"https://paulmillr.com/noble/","bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"dist":{"shasum":"4db0e1577ef85632347e86eee81062acdda6d65b","tarball":"https://registry.npmjs.org/@noble/bls12-381/-/bls12-381-1.4.0.tgz","fileCount":10,"integrity":"sha512-mIYqC2jMX7Lcu1QtU/FFftMPDSXNCdlGex6BSf5nPojHjnzzBgs1klFWpB1R8YjqHmOO9xrCzF19f2c42+z3vg==","signatures":[{"sig":"MEYCIQCERTl91V7Psy+yoJhnR2Z2TmElFvnAeaWARAqEjtjADwIhAN5d1jsa4NEb24bTfPs03ZObSOSobFwdZMAwSKLMq81S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":179949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN3IZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0AA//U7ZpfUHl/jBUBkXSfKy86JQYukqNvRoSwjoFZYuKsHDe2jyx\r\njHG9ci81i+ULE6UvzQo1eIvPAMqq2r7V6AnHqQQjC3jIVMasAeWur1eVKd5l\r\nJ51ku3C4rhcxxIvGZreicBa7VWE4zG/uHEHfYTxqnPYUOAcxSfWBJ+Mo0wD5\r\n0A8sew4Sltv0omqkh7NEgOPNQ4eOev6cmTGdF7QwFp3Piz1wIaz6GnYKRHYS\r\nDjh1Pf3f7Kf9OZ6i55q2pOc5272yJT6gSsWGAZIygoeZSTldOI4htA2sWY1w\r\nKWX330x1V+hS54oEAyiecUBT3rsio1OcTg8vbskRjjhECwHbPBcRDfLW9Arx\r\nJW7UGTXvO/m8SRYNAiMlPMblNvE3LEhpkZDRS5tVKwku+u/9nXsseNEvq8IH\r\nJ0/hzYtuAPQvkrP21+8WSWo3AR4ww00RQL86CShmef4GvcTSIjB63pagQyUY\r\n1/r+SAPKdc7XlzRP5CmInkYvt955Ql/wwMMzPCpH7S1/SRALN/gCRft0xXcF\r\nbipxcWkfz5f9pRkpOE3+3ZgbjsPBwI1VqchAlCUf1sEKvm0h365YKHY+4pmc\r\nE+UHxZgXWtoBVwmdI0MCWsnhIGS1woES7QHgmzlRryZZhyMQwW1fs5daruAO\r\nRLI0bX7PVKQawQSN+JwH8+URvENhgPSJB0Q=\r\n=+TF6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/esm/index.js","browser":{"crypto":false},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/esm/index.js","default":"./lib/index.js"},"./math":{"types":"./lib/math.d.ts","import":"./lib/esm/math.js","default":"./lib/math.js"}},"funding":[{"url":"https://paulmillr.com/funding/","type":"individual"}],"gitHead":"c514eca123bd5bc169ee38530841eadc79bc83b9","scripts":{"lint":"prettier --print-width 100 --single-quote --check index.ts","test":"jest test/*.test.ts","bench":"node test/benchmark.js","build":"tsc && tsc -p tsconfig.esm.json","build:release":"rollup -c rollup.config.js"},"_npmUser":{"name":"paulmillr","email":"paul@paulmillr.com"},"deprecated":"Switch to \"@noble/curves\" for security updates","repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"_npmVersion":"8.18.0","description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","directories":{},"_nodeVersion":"18.8.0","_hasShrinkwrap":false,"devDependencies":{"jest":"28.1.0","rollup":"2.75.5","ts-jest":"28.0.4","prettier":"2.6.2","fast-check":"3.0.0","typescript":"4.7.3","@types/jest":"28.1.1","@types/node":"18.0.0","micro-bmark":"0.2.0","micro-packed":"0.3.1","@noble/hashes":"1.1.2","@rollup/plugin-commonjs":"22.0.0","@rollup/plugin-node-resolve":"13.3.0"},"_npmOperationalInternal":{"tmp":"tmp/bls12-381_1.4.0_1664578073036_0.18103993583056743","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-11-03T22:31:22.579Z","modified":"2026-05-27T15:46:45.880Z","1.0.0":"2021-11-03T22:31:22.754Z","1.0.1":"2021-11-11T20:13:56.965Z","1.0.2":"2021-12-26T06:48:57.869Z","1.1.0":"2021-12-30T13:51:51.123Z","1.1.1":"2022-01-02T22:22:21.499Z","1.1.2":"2022-01-02T22:41:18.947Z","1.2.0":"2022-01-06T00:37:43.665Z","1.3.0":"2022-07-24T13:14:36.957Z","1.4.0":"2022-09-30T22:47:53.317Z"},"bugs":{"url":"https://github.com/paulmillr/noble-bls12-381/issues"},"author":{"url":"https://paulmillr.com","name":"Paul Miller"},"license":"MIT","homepage":"https://paulmillr.com/noble/","keywords":["bls12-381","bls12","bls","bls signature","threshold signatures","aggregate","aggregated","zk-snark","barreto-lynn-scott","barreto-naehrig","snark","pairing","cryptography","security"],"repository":{"url":"git+https://github.com/paulmillr/noble-bls12-381.git","type":"git"},"description":"Fastest JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings","maintainers":[{"name":"paulmillr","email":"paul@paulmillr.com"}],"readme":"# noble-bls12-381 ![Node CI](https://github.com/paulmillr/noble-secp256k1/workflows/Node%20CI/badge.svg) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n**[Fastest](#speed)** JS implementation of BLS12-381. Auditable, secure, 0-dependency aggregated signatures & pairings.\n\nThe pairing-friendly Barreto-Lynn-Scott elliptic curve construction allows to:\n\n- Construct [zk-SNARKs](https://z.cash/technology/zksnarks/) at the 128-bit security\n- Use [threshold signatures](https://medium.com/snigirev.stepan/bls-signatures-better-than-schnorr-5a7fe30ea716),\n  which allows a user to sign lots of messages with one signature and verify them swiftly in a batch,\n  using Boneh-Lynn-Shacham signature scheme.\n\nCompatible with Algorand, Chia, Dfinity, Ethereum, FIL, Zcash. Matches specs [pairing-curves-10](https://tools.ietf.org/html/draft-irtf-cfrg-pairing-friendly-curves-10), [bls-sigs-04](https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-04), [hash-to-curve-12](https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-12). To learn more about internals, navigate to\n[utilities](#utilities) section.\n\n### This library belongs to *noble* crypto\n\n> **noble-crypto** — high-security, easily auditable set of contained cryptographic libraries and tools.\n\n- Just two files\n- No dependencies\n- Easily auditable TypeScript/JS code\n- Supported in all major browsers and stable node.js versions\n- All releases are signed with PGP keys\n- Check out [homepage](https://paulmillr.com/noble/) & all libraries:\n  [secp256k1](https://github.com/paulmillr/noble-secp256k1),\n  [ed25519](https://github.com/paulmillr/noble-ed25519),\n  [bls12-381](https://github.com/paulmillr/noble-bls12-381),\n  [hashes](https://github.com/paulmillr/noble-hashes)\n\n## Usage\n\nUse NPM in node.js / browser, or include single file from\n[GitHub's releases page](https://github.com/paulmillr/noble-bls12-381/releases):\n\n> npm install @noble/bls12-381\n\n```js\nconst bls = require('@noble/bls12-381');\n// If you're using single file, use global variable instead: `window.nobleBls12381`\n\n(async () => {\n  // keys, messages & other inputs can be Uint8Arrays or hex strings\n  const privateKey = '67d53f170b908cabb9eb326c3c337762d59289a8fec79f7bc9254b584b73265c';\n  const message = '64726e3da8';\n  const publicKey = bls.getPublicKey(privateKey);\n  const signature = await bls.sign(message, privateKey);\n  const isValid = await bls.verify(signature, message, publicKey);\n  console.log({ publicKey, signature, isValid });\n\n  // Sign 1 msg with 3 keys\n  const privateKeys = [\n    '18f020b98eb798752a50ed0563b079c125b0db5dd0b1060d1c1b47d4a193e1e4',\n    'ed69a8c50cf8c9836be3b67c7eeff416612d45ba39a5c099d48fa668bf558c9c',\n    '16ae669f3be7a2121e17d0c68c05a8f3d6bef21ec0f2315f1d7aec12484e4cf5'\n  ];\n  const messages = ['d2', '0d98', '05caf3'];\n  const publicKeys = privateKeys.map(bls.getPublicKey);\n  const signatures2 = await Promise.all(privateKeys.map(p => bls.sign(message, p)));\n  const aggPubKey2 = bls.aggregatePublicKeys(publicKeys);\n  const aggSignature2 = bls.aggregateSignatures(signatures2);\n  const isValid2 = await bls.verify(aggSignature2, message, aggPubKey2);\n  console.log({ signatures2, aggSignature2, isValid2 });\n\n  // Sign 3 msgs with 3 keys\n  const signatures3 = await Promise.all(privateKeys.map((p, i) => bls.sign(messages[i], p)));\n  const aggSignature3 = bls.aggregateSignatures(signatures3);\n  const isValid3 = await bls.verifyBatch(aggSignature3, messages, publicKeys);\n  console.log({ publicKeys, signatures3, aggSignature3, isValid3 });\n})();\n```\n\nTo use the module with [Deno](https://deno.land),\nyou will need [import map](https://deno.land/manual/linking_to_external_code/import_maps):\n\n- `deno run --import-map=imports.json app.ts`\n- app.ts: `import * as bls from \"https://deno.land/x/bls12_381/mod.ts\";`\n- imports.json: `{\"imports\": {\"crypto\": \"https://deno.land/std@0.119.0/node/crypto.ts\"}}`\n\n## API\n\n- [`getPublicKey(privateKey)`](#getpublickeyprivatekey)\n- [`sign(message, privateKey)`](#signmessage-privatekey)\n- [`verify(signature, message, publicKey)`](#verifysignature-message-publickey)\n- [`aggregatePublicKeys(publicKeys)`](#aggregatepublickeyspublickeys)\n- [`aggregateSignatures(signatures)`](#aggregatesignaturessignatures)\n- [`verifyBatch(signature, messages, publicKeys)`](#verifybatchsignature-messages-publickeys)\n- [`pairing(G1Point, G2Point)`](#pairingg1point-g2point)\n- [Utilities](#utilities)\n\n##### `getPublicKey(privateKey)`\n```typescript\nfunction getPublicKey(privateKey: Uint8Array | string | bigint): Uint8Array;\n```\n- `privateKey: Uint8Array | string | bigint` will be used to generate public key.\n  Public key is generated by executing scalar multiplication of a base Point(x, y) by a fixed\n  integer. The result is another `Point(x, y)` which we will by default encode to hex Uint8Array.\n- Returns `Uint8Array`: encoded publicKey for signature verification\n\n**Note:** if you need EIP2333-compliant `KeyGen` (eth2/fil), use [paulmillr/bls12-381-keygen](https://github.com/paulmillr/bls12-381-keygen).\n\n##### `sign(message, privateKey)`\n```typescript\nfunction sign(message: Uint8Array | string, privateKey: Uint8Array | string): Promise<Uint8Array>;\nfunction sign(message: PointG2, privateKey: Uint8Array | string | bigint): Promise<PointG2>;\n```\n- `message: Uint8Array | string` - message which would be hashed & signed\n- `privateKey: Uint8Array | string | bigint` - private key which will sign the hash\n- Returns `Uint8Array | string | PointG2`: encoded signature\n\nCheck out [Utilities](#utilities) section on instructions about domain separation tag (DST).\n\n##### `verify(signature, message, publicKey)`\n```typescript\nfunction verify(\n  signature: Uint8Array | string | PointG2,\n  message: Uint8Array | string | PointG2,\n  publicKey: Uint8Array | string | PointG1\n): Promise<boolean>\n```\n- `signature: Uint8Array | string` - object returned by the `sign` or `aggregateSignatures` function\n- `message: Uint8Array | string` - message hash that needs to be verified\n- `publicKey: Uint8Array | string` - e.g. that was generated from `privateKey` by `getPublicKey`\n- Returns `Promise<boolean>`: `true` / `false` whether the signature matches hash\n\n##### `aggregatePublicKeys(publicKeys)`\n```typescript\nfunction aggregatePublicKeys(publicKeys: (Uint8Array | string)[]): Uint8Array;\nfunction aggregatePublicKeys(publicKeys: PointG1[]): PointG1;\n```\n- `publicKeys: (Uint8Array | string | PointG1)[]` - e.g. that have been generated from `privateKey` by `getPublicKey`\n- Returns `Uint8Array | PointG1`: one aggregated public key which calculated from public keys\n\n##### `aggregateSignatures(signatures)`\n```typescript\nfunction aggregateSignatures(signatures: (Uint8Array | string)[]): Uint8Array;\nfunction aggregateSignatures(signatures: PointG2[]): PointG2;\n```\n- `signatures: (Uint8Array | string | PointG2)[]` - e.g. that have been generated by `sign`\n- Returns `Uint8Array | PointG2`: one aggregated signature which calculated from signatures\n\n##### `verifyBatch(signature, messages, publicKeys)`\n```typescript\nfunction verifyBatch(\n  signature: Uint8Array | string | PointG2,\n  messages: (Uint8Array | string | PointG2)[],\n  publicKeys: (Uint8Array | string | PointG1)[]\n): Promise<boolean>\n```\n- `signature: Uint8Array | string | PointG2` - object returned by the `aggregateSignatures` function\n- `messages: (Uint8Array | string | PointG2)[]` - messages hashes that needs to be verified\n- `publicKeys: (Uint8Array | string | PointG1)[]` - e.g. that were generated from `privateKeys` by `getPublicKey`\n- Returns `Promise<boolean>`: `true` / `false` whether the signature matches hashes\n\n##### `pairing(pointG1, pointG2)`\n```typescript\nfunction pairing(\n  pointG1: PointG1,\n  pointG2: PointG2,\n  withFinalExponent: boolean = true\n): Fp12\n```\n- `pointG1: PointG1` - simple point, `x, y` are bigints\n- `pointG2: PointG2` - point over curve with complex numbers (`(x₁, x₂+i), (y₁, y₂+i)`) - pairs of bigints\n- `withFinalExponent: boolean` - should the result be powered by curve order; very slow\n- Returns `Fp12`: paired point over 12-degree extension field.\n\n### Utilities\n\nResources that help to understand bls12-381:\n\n- [BLS12-381 for the rest of us](https://hackmd.io/@benjaminion/bls12-381)\n- [Key concepts of pairings](https://medium.com/@alonmuroch_65570/bls-signatures-part-2-key-concepts-of-pairings-27a8a9533d0c)\n- Pairing over bls12-381: [part 1](https://research.nccgroup.com/2020/07/06/pairing-over-bls12-381-part-1-fields/),\n  [part 2](https://research.nccgroup.com/2020/07/13/pairing-over-bls12-381-part-2-curves/),\n  [part 3](https://research.nccgroup.com/2020/08/13/pairing-over-bls12-381-part-3-pairing/)\n- [Estimating the bit security of pairing-friendly curves](https://research.nccgroup.com/2022/02/03/estimating-the-bit-security-of-pairing-friendly-curves/)\n- Check out [the online demo](https://paulmillr.com/ecc) and [threshold sigs demo](https://genthresh.com)\n\nThe library uses G1 for public keys and G2 for signatures. Adding support for G1 signatures is planned.\n\n- BLS Relies on Bilinear Pairing (expensive)\n- Private Keys: 32 bytes\n- Public Keys: 48 bytes: 381 bit affine x coordinate, encoded into 48 big-endian bytes.\n- Signatures: 96 bytes: two 381 bit integers (affine x coordinate), encoded into two 48 big-endian byte arrays.\n    - The signature is a point on the G2 subgroup, which is defined over a finite field\n    with elements twice as big as the G1 curve (G2 is over Fp2 rather than Fp. Fp2 is analogous to the complex numbers).\n- The 12 stands for the Embedding degree.\n\nFormulas:\n\n- `P = pk x G` - public keys\n- `S = pk x H(m)` - signing\n- `e(P, H(m)) == e(G, S)` - verification using pairings\n- `e(G, S) = e(G, SUM(n)(Si)) = MUL(n)(e(G, Si))` - signature aggregation\n\nThe BLS parameters for the library are:\n\n- `PK_IN` `G1`\n- `HASH_OR_ENCODE` `true`\n- `DST` `BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_` - use `bls.utils.getDSTLabel()` & `bls.utils.setDSTLabel(\"...\")` to read/change the Domain Separation Tag label\n- `RAND_BITS` `64`\n\nFilecoin uses little endian byte arrays for private keys - so ensure to reverse byte order if you'll use it with FIL.\n\n```typescript\n// Exports `CURVE`, `utils`, `PointG1`, `PointG2`, `Fp`, `Fp2`, `Fp12` helpers\n\nconst utils: {\n  hashToField(msg: Uint8Array, count: number, options = {}): Promise<bigint[][]>;\n  bytesToHex: (bytes: Uint8Array): string;\n  randomBytes: (bytesLength?: number) => Uint8Array;\n  randomPrivateKey: () => Uint8Array;\n  sha256: (message: Uint8Array) => Promise<Uint8Array>;\n  mod: (a: bigint, b = CURVE.P): bigint;\n  getDSTLabel(): string;\n  setDSTLabel(newLabel: string): void;\n};\n\n// characteristic; z + (z⁴ - z² + 1)(z - 1)²/3\nCURVE.P // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab\nCURVE.r // curve order; z⁴ − z² + 1, 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001\ncurve.h // cofactor; (z - 1)²/3, 0x396c8c005555e1568c00aaab0000aaab\nCURVE.Gx, CURVE.Gy   // G1 base point coordinates (x, y)\nCURVE.G2x, CURVE.G2y // G2 base point coordinates (x₁, x₂+i), (y₁, y₂+i)\n\n// Classes\nbls.Fp   // field over Fp\nbls.Fp2  // field over Fp₂\nbls.Fp12 // finite extension field over irreducible polynominal\n\n// for hashToCurve static method\ndeclare const htfDefaults: {\n  DST: string;\n  p: bigint;\n  m: number;\n  k: number;\n  expand: boolean;\n  hash: Hash;\n};\n\n// projective point (xyz) at G1\nclass PointG1 extends ProjectivePoint<Fp> {\n  constructor(x: Fp, y: Fp, z?: Fp);\n  static BASE: PointG1;\n  static ZERO: PointG1;\n  static fromHex(bytes: Bytes): PointG1;\n  static fromPrivateKey(privateKey: PrivateKey): PointG1;\n  static hashToCurve(msg: Hex, options?: Partial<typeof htfDefaults>): Promise<PointG1>;\n  toRawBytes(isCompressed?: boolean): Uint8Array;\n  toHex(isCompressed?: boolean): string;\n  assertValidity(): this;\n  millerLoop(P: PointG2): Fp12;\n  clearCofactor(): PointG1;\n}\n// projective point (xyz) at G2\nclass PointG2 extends ProjectivePoint<Fp2> {\n  constructor(x: Fp2, y: Fp2, z?: Fp2);\n  static BASE: PointG2;\n  static ZERO: PointG2;\n  static hashToCurve(msg: Hex, options?: Partial<typeof htfDefaults>): Promise<PointG2>;\n  static fromSignature(hex: Bytes): PointG2;\n  static fromHex(bytes: Bytes): PointG2;\n  static fromPrivateKey(privateKey: PrivateKey): PointG2;\n  toSignature(): Uint8Array;\n  toRawBytes(isCompressed?: boolean): Uint8Array;\n  toHex(isCompressed?: boolean): string;\n  assertValidity(): this;\n  clearCofactor(): PointG2;\n}\n```\n\n## Speed\n\nTo achieve the best speed out of all JS / Python implementations, the library employs different optimizations:\n\n- cyclotomic exponentation\n- endomorphism for clearing cofactor\n- pairing precomputation\n\nBenchmarks measured with Apple M2 on macOS 12.5 with node.js 18.8:\n\n```\ngetPublicKey x 818 ops/sec @ 1ms/op\nsign x 44 ops/sec @ 22ms/op\nverify x 34 ops/sec @ 29ms/op\npairing x 84 ops/sec @ 11ms/op\naggregatePublicKeys/8 x 117 ops/sec @ 8ms/op\naggregateSignatures/8 x 45 ops/sec @ 21ms/op\n\nwith compression / decompression disabled:\nsign/nc x 60 ops/sec @ 16ms/op\nverify/nc x 57 ops/sec @ 17ms/op ± 1.05% (min: 17ms, max: 19ms)\naggregatePublicKeys/32 x 1,163 ops/sec @ 859μs/op\naggregatePublicKeys/128 x 758 ops/sec @ 1ms/op\naggregatePublicKeys/512 x 318 ops/sec @ 3ms/op\naggregatePublicKeys/2048 x 96 ops/sec @ 10ms/op\naggregateSignatures/32 x 516 ops/sec @ 1ms/op\naggregateSignatures/128 x 269 ops/sec @ 3ms/op\naggregateSignatures/512 x 93 ops/sec @ 10ms/op\naggregateSignatures/2048 x 25 ops/sec @ 38ms/op\n```\n\n## Security\n\nNoble is production-ready.\n\n1. No public audits have been done yet. Our goal is to crowdfund the audit.\n2. It was developed in a similar fashion to\n[noble-secp256k1](https://github.com/paulmillr/noble-secp256k1), which **was** audited by a third-party firm.\n3. It was fuzzed by [Guido Vranken's cryptofuzz](https://github.com/guidovranken/cryptofuzz),\nno serious issues have been found. You can run the fuzzer by yourself to check it.\n\nWe're using built-in JS `BigInt`, which is potentially vulnerable to [timing attacks](https://en.wikipedia.org/wiki/Timing_attack) as [per official spec](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#cryptography). But, *JIT-compiler* and *Garbage Collector* make \"constant time\" extremely hard to achieve in a scripting language. Which means *any other JS library doesn't use constant-time bigints*. Including bn.js or anything else. Even statically typed Rust, a language without GC, [makes it harder to achieve constant-time](https://www.chosenplaintext.ca/open-source/rust-timing-shield/security) for some cases. If your goal is absolute security, don't use any JS lib — including bindings to native ones. Use low-level libraries & languages.\n\nWe however consider infrastructure attacks like rogue NPM modules very important; that's why it's crucial to minimize the amount of 3rd-party dependencies & native bindings. If your app uses 500 dependencies, any dep could get hacked and you'll be downloading malware with every `npm install`. Our goal is to minimize this attack vector.\n\n## Contributing\n\n1. Clone the repository.\n2. `npm install` to install build dependencies like TypeScript\n3. `npm run build` to compile TypeScript code\n4. `npm run test` to run jest on `test/index.ts`\n\nSpecial thanks to [Roman Koblov](https://github.com/romankoblov), who have helped to improve pairing speed.\n\n## License\n\nMIT (c) 2019 Paul Miller [(https://paulmillr.com)](https://paulmillr.com), see LICENSE file.\n","readmeFilename":"README.md"}