meteor-node-stubs 1.2.17 → 1.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@meteorjs/browserify-sign/browser/sign.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/browser/verify.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/jodid.js +82 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/secp256k1.js +41 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/index.js +153 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/package.json +21 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/.gitkeep +0 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.js +8961 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.min.js +1 -0
- package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/api-test.js +20 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/curve-test.js +357 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdh-test.js +43 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdsa-test.js +547 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ed25519-test.js +138 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/sign.input +1024 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/index.js +10 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/unittests.html +39 -0
- package/node_modules/@meteorjs/browserify-sign/package.json +22 -5
- package/node_modules/@meteorjs/create-ecdh/browser.js +1 -1
- package/node_modules/@meteorjs/create-ecdh/elliptic/README.md +238 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/jodid.js +82 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/secp256k1.js +41 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/index.js +153 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/package.json +21 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/.gitkeep +0 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.js +8961 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.min.js +1 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/base.js +381 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/edwards.js +435 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/index.js +8 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/mont.js +178 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/short.js +938 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curves.js +206 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/index.js +278 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/key.js +121 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/signature.js +176 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/index.js +121 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/key.js +95 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/signature.js +66 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/precomputed/secp256k1.js +780 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/utils.js +122 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic.js +13 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/api-test.js +20 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/curve-test.js +357 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdh-test.js +43 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdsa-test.js +547 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ed25519-test.js +138 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/sign.input +1024 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/index.js +10 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/unittests.html +39 -0
- package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/lib/bn.js +1 -0
- package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/package.json +1 -1
- package/node_modules/@meteorjs/create-ecdh/package.json +23 -5
- package/node_modules/asn1.js/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/asn1.js/node_modules/bn.js/package.json +1 -1
- package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/available-typed-arrays/.eslintrc +0 -4
- package/node_modules/available-typed-arrays/CHANGELOG.md +21 -0
- package/node_modules/available-typed-arrays/README.md +16 -13
- package/node_modules/available-typed-arrays/index.d.ts +8 -0
- package/node_modules/available-typed-arrays/index.js +4 -14
- package/node_modules/available-typed-arrays/package.json +26 -15
- package/node_modules/available-typed-arrays/tsconfig.json +49 -0
- package/node_modules/bn.js/README.md +11 -5
- package/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/bn.js/package.json +1 -1
- package/node_modules/browserify-rsa/CHANGELOG.md +98 -0
- package/node_modules/browserify-rsa/README.md +0 -2
- package/node_modules/browserify-rsa/index.js +31 -28
- package/node_modules/browserify-rsa/package.json +64 -29
- package/node_modules/call-bind/CHANGELOG.md +13 -0
- package/node_modules/call-bind/index.js +6 -17
- package/node_modules/call-bind/package.json +14 -16
- package/node_modules/call-bind/test/index.js +4 -10
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/{has-proto → call-bind-apply-helpers}/LICENSE +1 -1
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/{@meteorjs/browserify-sign/node_modules/bn.js → call-bound}/LICENSE +3 -1
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/cipher-base/.eslintrc +24 -1
- package/node_modules/cipher-base/.github/FUNDING.yml +12 -0
- package/node_modules/cipher-base/CHANGELOG.md +66 -0
- package/node_modules/cipher-base/index.js +145 -77
- package/node_modules/cipher-base/package.json +60 -30
- package/node_modules/cipher-base/test/index.js +221 -0
- package/node_modules/des.js/lib/des/cipher.js +1 -0
- package/node_modules/des.js/lib/des/des.js +8 -0
- package/node_modules/des.js/package.json +3 -4
- package/node_modules/des.js/test/cbc-test.js +5 -5
- package/node_modules/des.js/test/des-test.js +9 -9
- package/node_modules/des.js/test/ede-test.js +39 -6
- package/node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/diffie-hellman/node_modules/bn.js/package.json +1 -1
- package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/{@meteorjs/crypto-browserify/node_modules/hash-base → dunder-proto}/LICENSE +6 -6
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +14 -0
- package/node_modules/es-define-property/index.js +1 -3
- package/node_modules/es-define-property/package.json +12 -12
- package/node_modules/es-define-property/test/index.js +1 -0
- package/node_modules/es-define-property/tsconfig.json +2 -42
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/{elliptic/node_modules/bn.js → es-object-atoms}/LICENSE +3 -1
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/for-each/.eslintrc +16 -2
- package/node_modules/{has-proto → for-each}/.github/FUNDING.yml +1 -1
- package/node_modules/for-each/.github/SECURITY.md +3 -0
- package/node_modules/for-each/.nycrc +8 -0
- package/node_modules/for-each/CHANGELOG.md +107 -0
- package/node_modules/for-each/README.md +0 -4
- package/node_modules/for-each/index.d.ts +35 -0
- package/node_modules/for-each/index.js +11 -4
- package/node_modules/for-each/package.json +47 -36
- package/node_modules/for-each/test/test.js +54 -12
- package/node_modules/for-each/tsconfig.json +8 -0
- package/node_modules/get-intrinsic/.eslintrc +4 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +43 -0
- package/node_modules/get-intrinsic/index.js +40 -21
- package/node_modules/get-intrinsic/package.json +24 -20
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/{has-proto → get-proto}/package.json +33 -26
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/CHANGELOG.md +20 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +2 -3
- package/node_modules/gopd/package.json +16 -10
- package/node_modules/gopd/test/index.js +2 -1
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +16 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +1 -0
- package/node_modules/has-symbols/package.json +19 -9
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +5 -2
- package/node_modules/has-symbols/test/shams/core-js.js +1 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +1 -0
- package/node_modules/has-symbols/test/tests.js +4 -2
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +0 -6
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +22 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +1 -0
- package/node_modules/has-tostringtag/package.json +37 -13
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +1 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +3 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +2 -0
- package/node_modules/has-tostringtag/test/tests.js +2 -1
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hash-base/README.md +15 -15
- package/node_modules/hash-base/index.js +52 -9
- package/node_modules/hash-base/package.json +40 -40
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/index.d.ts +3 -3
- package/node_modules/hasown/index.js +1 -1
- package/node_modules/hasown/package.json +16 -15
- package/node_modules/hasown/tsconfig.json +3 -46
- package/node_modules/is-arguments/.eslintrc +0 -1
- package/node_modules/is-arguments/CHANGELOG.md +22 -0
- package/node_modules/is-arguments/README.md +11 -11
- package/node_modules/is-arguments/index.d.ts +6 -0
- package/node_modules/is-arguments/index.js +19 -8
- package/node_modules/is-arguments/package.json +25 -11
- package/node_modules/is-arguments/test/index.js +4 -1
- package/node_modules/is-arguments/tsconfig.json +9 -0
- package/node_modules/is-generator-function/.eslintrc +1 -1
- package/node_modules/is-generator-function/CHANGELOG.md +21 -0
- package/node_modules/is-generator-function/index.d.ts +3 -0
- package/node_modules/is-generator-function/index.js +16 -7
- package/node_modules/is-generator-function/package.json +30 -11
- package/node_modules/is-generator-function/test/corejs.js +1 -0
- package/node_modules/is-generator-function/test/index.js +4 -7
- package/node_modules/is-generator-function/test/uglified.js +1 -0
- package/node_modules/is-generator-function/tsconfig.json +9 -0
- package/node_modules/is-regex/.editorconfig +23 -0
- package/node_modules/is-regex/.eslintrc +10 -0
- package/node_modules/is-regex/.nycrc +10 -0
- package/node_modules/is-regex/CHANGELOG.md +233 -0
- package/node_modules/is-regex/LICENSE +20 -0
- package/node_modules/is-regex/README.md +52 -0
- package/node_modules/is-regex/index.d.ts +3 -0
- package/node_modules/is-regex/index.js +69 -0
- package/node_modules/is-regex/package.json +104 -0
- package/node_modules/is-regex/test/index.js +121 -0
- package/node_modules/is-regex/tsconfig.json +9 -0
- package/node_modules/is-typed-array/CHANGELOG.md +32 -0
- package/node_modules/is-typed-array/index.d.ts +9 -0
- package/node_modules/is-typed-array/index.js +1 -0
- package/node_modules/is-typed-array/package.json +23 -10
- package/node_modules/is-typed-array/test/index.js +9 -1
- package/node_modules/is-typed-array/tsconfig.json +6 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/miller-rabin/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/miller-rabin/node_modules/bn.js/package.json +1 -1
- package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/object-inspect/CHANGELOG.md +20 -0
- package/node_modules/object-inspect/index.js +27 -10
- package/node_modules/object-inspect/package.json +9 -8
- package/node_modules/object-inspect/test/quoteStyle.js +9 -0
- package/node_modules/object-inspect/test/values.js +50 -0
- package/node_modules/object-is/.eslintrc +1 -1
- package/node_modules/object-is/.nycrc +0 -4
- package/node_modules/object-is/CHANGELOG.md +25 -0
- package/node_modules/object-is/README.md +20 -20
- package/node_modules/object-is/package.json +23 -14
- package/node_modules/object.assign/CHANGELOG.md +21 -0
- package/node_modules/object.assign/dist/browser.js +495 -135
- package/node_modules/object.assign/implementation.js +6 -6
- package/node_modules/object.assign/package.json +14 -14
- package/node_modules/object.assign/test/tests.js +2 -2
- package/node_modules/possible-typed-array-names/.eslintrc +5 -0
- package/node_modules/possible-typed-array-names/.github/FUNDING.yml +12 -0
- package/node_modules/possible-typed-array-names/CHANGELOG.md +29 -0
- package/node_modules/possible-typed-array-names/LICENSE +21 -0
- package/node_modules/possible-typed-array-names/README.md +50 -0
- package/node_modules/possible-typed-array-names/index.d.ts +16 -0
- package/node_modules/possible-typed-array-names/index.js +17 -0
- package/node_modules/possible-typed-array-names/package.json +84 -0
- package/node_modules/possible-typed-array-names/test/index.js +19 -0
- package/node_modules/possible-typed-array-names/tsconfig.json +9 -0
- package/node_modules/public-encrypt/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/public-encrypt/node_modules/bn.js/package.json +1 -1
- package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/qs/.eslintrc +1 -0
- package/node_modules/qs/CHANGELOG.md +22 -0
- package/node_modules/qs/README.md +25 -1
- package/node_modules/qs/dist/qs.js +95 -44
- package/node_modules/qs/lib/parse.js +44 -12
- package/node_modules/qs/lib/stringify.js +11 -6
- package/node_modules/qs/lib/utils.js +7 -4
- package/node_modules/qs/package.json +9 -7
- package/node_modules/qs/test/parse.js +133 -27
- package/node_modules/qs/test/stringify.js +19 -11
- package/node_modules/qs/test/utils.js +126 -0
- package/node_modules/safe-regex-test/.eslintrc +9 -0
- package/node_modules/safe-regex-test/.github/FUNDING.yml +12 -0
- package/node_modules/safe-regex-test/.nycrc +13 -0
- package/node_modules/safe-regex-test/CHANGELOG.md +55 -0
- package/node_modules/safe-regex-test/LICENSE +21 -0
- package/node_modules/safe-regex-test/README.md +46 -0
- package/node_modules/safe-regex-test/index.d.ts +3 -0
- package/node_modules/safe-regex-test/index.js +17 -0
- package/node_modules/safe-regex-test/package.json +87 -0
- package/node_modules/safe-regex-test/test/index.js +41 -0
- package/node_modules/safe-regex-test/tsconfig.json +9 -0
- package/node_modules/side-channel/.eslintrc +1 -0
- package/node_modules/side-channel/CHANGELOG.md +15 -0
- package/node_modules/side-channel/README.md +60 -1
- package/node_modules/side-channel/index.d.ts +9 -22
- package/node_modules/side-channel/index.js +20 -106
- package/node_modules/side-channel/package.json +20 -19
- package/node_modules/side-channel/test/index.js +76 -55
- package/node_modules/side-channel/tsconfig.json +2 -43
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/which-typed-array/.eslintrc +1 -0
- package/node_modules/which-typed-array/CHANGELOG.md +57 -0
- package/node_modules/which-typed-array/index.d.ts +62 -0
- package/node_modules/which-typed-array/index.js +50 -25
- package/node_modules/which-typed-array/package.json +28 -13
- package/node_modules/which-typed-array/test/index.js +7 -1
- package/node_modules/which-typed-array/tsconfig.json +9 -0
- package/package.json +2 -3
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/README.md +0 -214
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/lib/bn.js +0 -3547
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/package.json +0 -39
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/LICENSE +0 -21
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/README.md +0 -48
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/index.js +0 -138
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/package.json +0 -42
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/README.md +0 -48
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/index.js +0 -95
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/package.json +0 -41
- package/node_modules/available-typed-arrays/.eslintignore +0 -1
- package/node_modules/bn.js/CHANGELOG.md +0 -51
- package/node_modules/cipher-base/.npmignore +0 -1
- package/node_modules/cipher-base/.travis.yml +0 -6
- package/node_modules/cipher-base/test.js +0 -111
- package/node_modules/elliptic/node_modules/bn.js/README.md +0 -200
- package/node_modules/elliptic/node_modules/bn.js/lib/bn.js +0 -3446
- package/node_modules/elliptic/node_modules/bn.js/package.json +0 -36
- package/node_modules/elliptic/package.json +0 -56
- package/node_modules/for-each/.travis.yml +0 -45
- package/node_modules/for-each/test/.eslintrc +0 -8
- package/node_modules/has-proto/CHANGELOG.md +0 -23
- package/node_modules/has-proto/README.md +0 -38
- package/node_modules/has-proto/index.js +0 -11
- package/node_modules/has-proto/test/index.js +0 -19
- package/node_modules/hasown/index.d.ts.map +0 -1
- package/node_modules/is-arguments/.eslintignore +0 -1
- package/node_modules/is-generator-function/.eslintignore +0 -1
- package/node_modules/object-is/.eslintignore +0 -1
- package/node_modules/object.assign/test.html +0 -18458
- package/node_modules/parse-asn1/node_modules/hash-base/LICENSE +0 -21
- package/node_modules/parse-asn1/node_modules/hash-base/README.md +0 -48
- package/node_modules/parse-asn1/node_modules/hash-base/index.js +0 -95
- package/node_modules/parse-asn1/node_modules/hash-base/package.json +0 -41
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/README.md +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/base.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/edwards.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/mont.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/short.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curves.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/key.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/signature.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/key.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/signature.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/precomputed/secp256k1.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/utils.js +0 -0
- /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>scrypt-async Unit Tests</title>
|
|
6
|
+
<link rel="stylesheet" href="lib/mocha.css" />
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="mocha"></div>
|
|
10
|
+
<script src="lib/mocha.js"></script>
|
|
11
|
+
<script>
|
|
12
|
+
mocha.setup('bdd');
|
|
13
|
+
mocha.timeout(20000);
|
|
14
|
+
</script>
|
|
15
|
+
<script src="lib/unittests-bundle.js"></script>
|
|
16
|
+
<script>
|
|
17
|
+
mocha.setup('bdd');
|
|
18
|
+
mocha.timeout(20000);
|
|
19
|
+
|
|
20
|
+
var runner = mocha.run();
|
|
21
|
+
var failedTests = [];
|
|
22
|
+
runner.on('end', function(){
|
|
23
|
+
window.mochaResults = runner.stats;
|
|
24
|
+
window.mochaResults.reports = failedTests;
|
|
25
|
+
});
|
|
26
|
+
runner.on('fail', function(test, err) {
|
|
27
|
+
var flattenTitles = function(test) {
|
|
28
|
+
var titles = [];
|
|
29
|
+
while (test.parent.title) {
|
|
30
|
+
titles.push(test.parent.title);
|
|
31
|
+
test = test.parent;
|
|
32
|
+
}
|
|
33
|
+
return titles.reverse();
|
|
34
|
+
};
|
|
35
|
+
failedTests.push({name: test.title, result: false, message: err.message, stack: err.stack, titles: flattenTitles(test)});
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meteorjs/browserify-sign",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.6",
|
|
4
4
|
"description": "adds node crypto signing for browsers",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/crypto-browserify/browserify-sign/issues"
|
|
7
7
|
},
|
|
8
8
|
"license": "ISC",
|
|
9
9
|
"files": [
|
|
10
|
+
"elliptic",
|
|
10
11
|
"browser",
|
|
11
12
|
"index.js",
|
|
12
13
|
"algos.js"
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
"scripts": {
|
|
20
21
|
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
21
22
|
"lint": "eslint --ext=js,mjs .",
|
|
22
|
-
"tests-only": "nyc tape 'test/**/*.js'",
|
|
23
|
+
"tests-only": "nyc --exclude='elliptic/**' tape 'test/**/*.js'",
|
|
23
24
|
"pretest": "npm run lint",
|
|
24
25
|
"test": "npm run tests-only",
|
|
25
26
|
"posttest": "aud --production",
|
|
@@ -31,12 +32,16 @@
|
|
|
31
32
|
"browserify-rsa": "^4.1.0",
|
|
32
33
|
"create-hash": "^1.2.0",
|
|
33
34
|
"create-hmac": "^1.1.7",
|
|
34
|
-
"elliptic": "^6.6.1",
|
|
35
35
|
"hash-base": "~3.0",
|
|
36
36
|
"inherits": "^2.0.4",
|
|
37
37
|
"parse-asn1": "^5.1.7",
|
|
38
38
|
"readable-stream": "^2.3.8",
|
|
39
|
-
"safe-buffer": "^5.2.1"
|
|
39
|
+
"safe-buffer": "^5.2.1",
|
|
40
|
+
"brorand": "^1.1.0",
|
|
41
|
+
"hash.js": "^1.0.0",
|
|
42
|
+
"hmac-drbg": "^1.0.1",
|
|
43
|
+
"minimalistic-assert": "^1.0.1",
|
|
44
|
+
"minimalistic-crypto-utils": "^1.0.1"
|
|
40
45
|
},
|
|
41
46
|
"devDependencies": {
|
|
42
47
|
"@ljharb/eslint-config": "^21.1.0",
|
|
@@ -47,7 +52,19 @@
|
|
|
47
52
|
"npmignore": "^0.3.1",
|
|
48
53
|
"nyc": "^10.3.2",
|
|
49
54
|
"semver": "^6.3.1",
|
|
50
|
-
"tape": "^5.7.5"
|
|
55
|
+
"tape": "^5.7.5",
|
|
56
|
+
"brfs": "^2.0.2",
|
|
57
|
+
"coveralls": "^3.1.0",
|
|
58
|
+
"grunt": "^1.2.1",
|
|
59
|
+
"grunt-browserify": "^5.3.0",
|
|
60
|
+
"grunt-cli": "^1.3.2",
|
|
61
|
+
"grunt-contrib-connect": "^3.0.0",
|
|
62
|
+
"grunt-contrib-copy": "^1.0.0",
|
|
63
|
+
"grunt-contrib-uglify": "^5.0.0",
|
|
64
|
+
"grunt-mocha-istanbul": "^5.0.2",
|
|
65
|
+
"grunt-saucelabs": "^9.0.1",
|
|
66
|
+
"istanbul": "^0.4.5",
|
|
67
|
+
"mocha": "^8.0.1"
|
|
51
68
|
},
|
|
52
69
|
"browser": "browser/index.js",
|
|
53
70
|
"engines": {
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Elliptic [](http://travis-ci.org/indutny/elliptic) [](https://coveralls.io/github/indutny/elliptic?branch=master) [](https://codeclimate.com/github/indutny/elliptic)
|
|
2
|
+
|
|
3
|
+
[](https://saucelabs.com/u/gh-indutny-elliptic)
|
|
4
|
+
|
|
5
|
+
Fast elliptic-curve cryptography in a plain javascript implementation.
|
|
6
|
+
|
|
7
|
+
NOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve
|
|
8
|
+
for your cryptography operations.
|
|
9
|
+
|
|
10
|
+
## Incentive
|
|
11
|
+
|
|
12
|
+
ECC is much slower than regular RSA cryptography, the JS implementations are
|
|
13
|
+
even more slower.
|
|
14
|
+
|
|
15
|
+
## Benchmarks
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
$ node benchmarks/index.js
|
|
19
|
+
Benchmarking: sign
|
|
20
|
+
elliptic#sign x 262 ops/sec ±0.51% (177 runs sampled)
|
|
21
|
+
eccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled)
|
|
22
|
+
------------------------
|
|
23
|
+
Fastest is elliptic#sign
|
|
24
|
+
========================
|
|
25
|
+
Benchmarking: verify
|
|
26
|
+
elliptic#verify x 113 ops/sec ±0.50% (166 runs sampled)
|
|
27
|
+
eccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled)
|
|
28
|
+
------------------------
|
|
29
|
+
Fastest is elliptic#verify
|
|
30
|
+
========================
|
|
31
|
+
Benchmarking: gen
|
|
32
|
+
elliptic#gen x 294 ops/sec ±0.43% (176 runs sampled)
|
|
33
|
+
eccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled)
|
|
34
|
+
------------------------
|
|
35
|
+
Fastest is elliptic#gen
|
|
36
|
+
========================
|
|
37
|
+
Benchmarking: ecdh
|
|
38
|
+
elliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled)
|
|
39
|
+
------------------------
|
|
40
|
+
Fastest is elliptic#ecdh
|
|
41
|
+
========================
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## API
|
|
45
|
+
|
|
46
|
+
### ECDSA
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
var EC = require('elliptic').ec;
|
|
50
|
+
|
|
51
|
+
// Create and initialize EC context
|
|
52
|
+
// (better do it once and reuse it)
|
|
53
|
+
var ec = new EC('secp256k1');
|
|
54
|
+
|
|
55
|
+
// Generate keys
|
|
56
|
+
var key = ec.genKeyPair();
|
|
57
|
+
|
|
58
|
+
// Sign the message's hash (input must be an array, or a hex-string)
|
|
59
|
+
var msgHash = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
|
|
60
|
+
var signature = key.sign(msgHash);
|
|
61
|
+
|
|
62
|
+
// Export DER encoded signature in Array
|
|
63
|
+
var derSign = signature.toDER();
|
|
64
|
+
|
|
65
|
+
// Verify signature
|
|
66
|
+
console.log(key.verify(msgHash, derSign));
|
|
67
|
+
|
|
68
|
+
// CHECK WITH NO PRIVATE KEY
|
|
69
|
+
|
|
70
|
+
var pubPoint = key.getPublic();
|
|
71
|
+
var x = pubPoint.getX();
|
|
72
|
+
var y = pubPoint.getY();
|
|
73
|
+
|
|
74
|
+
// Public Key MUST be either:
|
|
75
|
+
// 1) '04' + hex string of x + hex string of y; or
|
|
76
|
+
// 2) object with two hex string properties (x and y); or
|
|
77
|
+
// 3) object with two buffer properties (x and y)
|
|
78
|
+
var pub = pubPoint.encode('hex'); // case 1
|
|
79
|
+
var pub = { x: x.toString('hex'), y: y.toString('hex') }; // case 2
|
|
80
|
+
var pub = { x: x.toBuffer(), y: y.toBuffer() }; // case 3
|
|
81
|
+
var pub = { x: x.toArrayLike(Buffer), y: y.toArrayLike(Buffer) }; // case 3
|
|
82
|
+
|
|
83
|
+
// Import public key
|
|
84
|
+
var key = ec.keyFromPublic(pub, 'hex');
|
|
85
|
+
|
|
86
|
+
// Signature MUST be either:
|
|
87
|
+
// 1) DER-encoded signature as hex-string; or
|
|
88
|
+
// 2) DER-encoded signature as buffer; or
|
|
89
|
+
// 3) object with two hex-string properties (r and s); or
|
|
90
|
+
// 4) object with two buffer properties (r and s)
|
|
91
|
+
|
|
92
|
+
var signature = '3046022100...'; // case 1
|
|
93
|
+
var signature = new Buffer('...'); // case 2
|
|
94
|
+
var signature = { r: 'b1fc...', s: '9c42...' }; // case 3
|
|
95
|
+
|
|
96
|
+
// Verify signature
|
|
97
|
+
console.log(key.verify(msgHash, signature));
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### EdDSA
|
|
101
|
+
|
|
102
|
+
```javascript
|
|
103
|
+
var EdDSA = require('elliptic').eddsa;
|
|
104
|
+
|
|
105
|
+
// Create and initialize EdDSA context
|
|
106
|
+
// (better do it once and reuse it)
|
|
107
|
+
var ec = new EdDSA('ed25519');
|
|
108
|
+
|
|
109
|
+
// Create key pair from secret
|
|
110
|
+
var key = ec.keyFromSecret('693e3c...'); // hex string, array or Buffer
|
|
111
|
+
|
|
112
|
+
// Sign the message's hash (input must be an array, or a hex-string)
|
|
113
|
+
var msgHash = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
|
|
114
|
+
var signature = key.sign(msgHash).toHex();
|
|
115
|
+
|
|
116
|
+
// Verify signature
|
|
117
|
+
console.log(key.verify(msgHash, signature));
|
|
118
|
+
|
|
119
|
+
// CHECK WITH NO PRIVATE KEY
|
|
120
|
+
|
|
121
|
+
// Import public key
|
|
122
|
+
var pub = '0a1af638...';
|
|
123
|
+
var key = ec.keyFromPublic(pub, 'hex');
|
|
124
|
+
|
|
125
|
+
// Verify signature
|
|
126
|
+
var signature = '70bed1...';
|
|
127
|
+
console.log(key.verify(msgHash, signature));
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### ECDH
|
|
131
|
+
|
|
132
|
+
```javascript
|
|
133
|
+
var EC = require('elliptic').ec;
|
|
134
|
+
var ec = new EC('curve25519');
|
|
135
|
+
|
|
136
|
+
// Generate keys
|
|
137
|
+
var key1 = ec.genKeyPair();
|
|
138
|
+
var key2 = ec.genKeyPair();
|
|
139
|
+
|
|
140
|
+
var shared1 = key1.derive(key2.getPublic());
|
|
141
|
+
var shared2 = key2.derive(key1.getPublic());
|
|
142
|
+
|
|
143
|
+
console.log('Both shared secrets are BN instances');
|
|
144
|
+
console.log(shared1.toString(16));
|
|
145
|
+
console.log(shared2.toString(16));
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
three and more members:
|
|
149
|
+
```javascript
|
|
150
|
+
var EC = require('elliptic').ec;
|
|
151
|
+
var ec = new EC('curve25519');
|
|
152
|
+
|
|
153
|
+
var A = ec.genKeyPair();
|
|
154
|
+
var B = ec.genKeyPair();
|
|
155
|
+
var C = ec.genKeyPair();
|
|
156
|
+
|
|
157
|
+
var AB = A.getPublic().mul(B.getPrivate())
|
|
158
|
+
var BC = B.getPublic().mul(C.getPrivate())
|
|
159
|
+
var CA = C.getPublic().mul(A.getPrivate())
|
|
160
|
+
|
|
161
|
+
var ABC = AB.mul(C.getPrivate())
|
|
162
|
+
var BCA = BC.mul(A.getPrivate())
|
|
163
|
+
var CAB = CA.mul(B.getPrivate())
|
|
164
|
+
|
|
165
|
+
console.log(ABC.getX().toString(16))
|
|
166
|
+
console.log(BCA.getX().toString(16))
|
|
167
|
+
console.log(CAB.getX().toString(16))
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
NOTE: `.derive()` returns a [BN][1] instance.
|
|
171
|
+
|
|
172
|
+
## Supported curves
|
|
173
|
+
|
|
174
|
+
Elliptic.js support following curve types:
|
|
175
|
+
|
|
176
|
+
* Short Weierstrass
|
|
177
|
+
* Montgomery
|
|
178
|
+
* Edwards
|
|
179
|
+
* Twisted Edwards
|
|
180
|
+
|
|
181
|
+
Following curve 'presets' are embedded into the library:
|
|
182
|
+
|
|
183
|
+
* `secp256k1`
|
|
184
|
+
* `p192`
|
|
185
|
+
* `p224`
|
|
186
|
+
* `p256`
|
|
187
|
+
* `p384`
|
|
188
|
+
* `p521`
|
|
189
|
+
* `curve25519`
|
|
190
|
+
* `ed25519`
|
|
191
|
+
|
|
192
|
+
NOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead.
|
|
193
|
+
|
|
194
|
+
### Implementation details
|
|
195
|
+
|
|
196
|
+
ECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of
|
|
197
|
+
the curve operations are performed on non-affine coordinates (either projective
|
|
198
|
+
or extended), various windowing techniques are used for different cases.
|
|
199
|
+
|
|
200
|
+
All operations are performed in reduction context using [bn.js][1], hashing is
|
|
201
|
+
provided by [hash.js][2]
|
|
202
|
+
|
|
203
|
+
### Related projects
|
|
204
|
+
|
|
205
|
+
* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both
|
|
206
|
+
browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for
|
|
207
|
+
node)
|
|
208
|
+
|
|
209
|
+
#### LICENSE
|
|
210
|
+
|
|
211
|
+
This software is licensed under the MIT License.
|
|
212
|
+
|
|
213
|
+
Copyright Fedor Indutny, 2014.
|
|
214
|
+
|
|
215
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
216
|
+
copy of this software and associated documentation files (the
|
|
217
|
+
"Software"), to deal in the Software without restriction, including
|
|
218
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
219
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
220
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
221
|
+
following conditions:
|
|
222
|
+
|
|
223
|
+
The above copyright notice and this permission notice shall be included
|
|
224
|
+
in all copies or substantial portions of the Software.
|
|
225
|
+
|
|
226
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
227
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
228
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
229
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
230
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
231
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
232
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
233
|
+
|
|
234
|
+
[0]: http://tools.ietf.org/html/rfc6979
|
|
235
|
+
[1]: https://github.com/indutny/bn.js
|
|
236
|
+
[2]: https://github.com/indutny/hash.js
|
|
237
|
+
[3]: https://github.com/bitchan/eccrypto
|
|
238
|
+
[4]: https://github.com/wanderer/secp256k1-node
|