From 4322e3a8628c307f78297d7c87bf32f8603533eb Mon Sep 17 00:00:00 2001 From: Juanra Dikal Date: Wed, 21 Apr 2021 11:14:04 +0200 Subject: [PATCH] browser defaults to a not minified bundle --- build/rollup.config.js | 29 +- dist/bundles/bigint-crypto-utils.esm.js | 2 +- dist/bundles/bigint-crypto-utils.iife.js | 2 +- dist/bundles/bigint-crypto-utils.umd.js | 2 +- dist/cjs/index.node.cjs | 6 +- dist/esm/index.browser.js | 852 +++++++++++++++++++++ dist/esm/index.node.js | 6 +- dist/esm/types/ts/isProbablyPrime.d.ts | 2 +- dist/esm/types/ts/isProbablyPrime.d.ts.map | 2 +- docs/API.md | 16 +- package.json | 6 +- src/ts/fromBuffer.ts | 2 +- src/ts/isProbablyPrime.ts | 15 +- 13 files changed, 901 insertions(+), 41 deletions(-) create mode 100644 dist/esm/index.browser.js diff --git a/build/rollup.config.js b/build/rollup.config.js index 87ee1a2..5a573f6 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -11,7 +11,6 @@ const fs = require('fs') const pkgJson = require('../package.json') const rootDir = path.join(__dirname, '..') -const dstDir = path.join(rootDir, pkgJson.directories.dist) const srcDir = path.join(rootDir, 'src') function camelise (str) { @@ -40,20 +39,39 @@ const sourcemapOutputOptions = { } module.exports = [ + { // Browser ESM + input: input, + output: { + file: path.join(rootDir, pkgJson.browser), + format: 'es', + ...sourcemapOutputOptions + }, + plugins: [ + replace({ + IS_BROWSER: true, + preventAssignment: true + }), + typescriptPlugin(tsBundleOptions), + resolve({ // For the workers to properly load all the functions when minified (e.g. by webpack), bigint-mod-arith should be resolved + browser: true, + exportConditions: ['browser', 'module', 'import', 'default'] + }) + ] + }, { // Browser bundles input: input, output: [ { - file: path.join(dstDir, `bundles/${name}.iife.js`), + file: path.join(rootDir, pkgJson.exports['./iife-browser-bundle']), format: 'iife', name: pkgCamelisedName }, { - file: path.join(dstDir, `bundles/${name}.esm.js`), + file: path.join(rootDir, pkgJson.exports['./esm-browser-bundle']), format: 'es' }, { - file: path.join(dstDir, `bundles/${name}.umd.js`), + file: path.join(rootDir, pkgJson.exports['./umd-browser-bundle']), format: 'umd', name: pkgCamelisedName } @@ -110,6 +128,7 @@ module.exports = [ }), typescriptPlugin(tsBundleOptions), commonjs({ extensions: ['.js', '.ts'] }) // the ".ts" extension is required - ] + ], + external } ] diff --git a/dist/bundles/bigint-crypto-utils.esm.js b/dist/bundles/bigint-crypto-utils.esm.js index ce62644..3a1d1cc 100644 --- a/dist/bundles/bigint-crypto-utils.esm.js +++ b/dist/bundles/bigint-crypto-utils.esm.js @@ -1 +1 @@ -function n(n){return n>=0?n:-n}function t(n){if("number"==typeof n&&(n=BigInt(n)),1n===n)return 1;let t=1;do{t++}while((n>>=1n)>1n);return t}function e(n,t){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof t&&(t=BigInt(t)),n<=0n||t<=0n)throw new RangeError("a and b MUST be > 0");let e=0n,r=1n,o=1n,i=0n;for(;0n!==n;){const s=t/n,u=t%n,f=e-o*s,a=r-i*s;t=n,n=u,e=o,r=i,o=f,i=a}return{g:t,x:e,y:r}}function r(t,e){let r="number"==typeof t?BigInt(n(t)):n(t),o="number"==typeof e?BigInt(n(e)):n(e);if(0n===r)return o;if(0n===o)return r;let i=0n;for(;0n===(1n&(r|o));)r>>=1n,o>>=1n,i++;for(;0n===(1n&r);)r>>=1n;do{for(;0n===(1n&o);)o>>=1n;if(r>o){const n=r;r=o,o=n}o-=r}while(0n!==o);return r<=t?n:t}function s(n,t){return n>=t?t:n}function u(n,t){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof t&&(t=BigInt(t)),t<=0n)throw new RangeError("n must be > 0");const e=n%t;return e<0n?e+t:e}function f(n,t){const r=e(u(n,t),t);if(1n!==r.g)throw new RangeError(`${n.toString()} does not have inverse modulo ${t.toString()}`);return u(r.x,t)}function a(t,e,r){if("number"==typeof t&&(t=BigInt(t)),"number"==typeof e&&(e=BigInt(e)),"number"==typeof r&&(r=BigInt(r)),r<=0n)throw new RangeError("n must be > 0");if(1n===r)return 0n;if(t=u(t,r),e<0n)return f(a(t,n(e),r),r);let o=1n;for(;e>0;)e%2n===1n&&(o=o*t%r),e/=2n,t=t**2n%r;return o}function c(n){let t=0n;for(const e of n.values()){const n=BigInt(e);t=(t< 0");return new Promise((function(e,r){{const r=new Uint8Array(n);self.crypto.getRandomValues(r),t&&(r[0]=128|r[0]),e(r)}}))}function m(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");{const e=new Uint8Array(n);return self.crypto.getRandomValues(e),t&&(e[0]=128|e[0]),e}}function l(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=Math.ceil(n/8),r=n%8;return new Promise(((n,o)=>{g(e,!1).then((function(e){if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}n(e)}))}))}function w(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=m(Math.ceil(n/8),!1),r=n%8;if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}return e}function h(n,e=1n){if(n<=0n||e<0n||n<=e)throw new RangeError("Arguments MUST be: max > 0 && min >=0 && max > min");const r=n-e,o=t(r);let i;do{i=c(w(o))}while(i>r);return i+e}let b=!1;function d(n,t=16,e=!1){if("number"==typeof n&&(n=BigInt(n)),n<0n)throw RangeError("w MUST be >= 0");return new Promise(((e,r)=>{const o=new Worker(y());o.onmessage=n=>{o.terminate(),e(n.data.isPrime)},o.onmessageerror=n=>{r(n)};const i={rnd:n,iterations:t,id:0};o.postMessage(i)}))}function p(n,t=16){if(2n===n)return!0;if(0n===(1n&n)||1n===n)return!1;const e=[3n,5n,7n,11n,13n,17n,19n,23n,29n,31n,37n,41n,43n,47n,53n,59n,61n,67n,71n,73n,79n,83n,89n,97n,101n,103n,107n,109n,113n,127n,131n,137n,139n,149n,151n,157n,163n,167n,173n,179n,181n,191n,193n,197n,199n,211n,223n,227n,229n,233n,239n,241n,251n,257n,263n,269n,271n,277n,281n,283n,293n,307n,311n,313n,317n,331n,337n,347n,349n,353n,359n,367n,373n,379n,383n,389n,397n,401n,409n,419n,421n,431n,433n,439n,443n,449n,457n,461n,463n,467n,479n,487n,491n,499n,503n,509n,521n,523n,541n,547n,557n,563n,569n,571n,577n,587n,593n,599n,601n,607n,613n,617n,619n,631n,641n,643n,647n,653n,659n,661n,673n,677n,683n,691n,701n,709n,719n,727n,733n,739n,743n,751n,757n,761n,769n,773n,787n,797n,809n,811n,821n,823n,827n,829n,839n,853n,857n,859n,863n,877n,881n,883n,887n,907n,911n,919n,929n,937n,941n,947n,953n,967n,971n,977n,983n,991n,997n,1009n,1013n,1019n,1021n,1031n,1033n,1039n,1049n,1051n,1061n,1063n,1069n,1087n,1091n,1093n,1097n,1103n,1109n,1117n,1123n,1129n,1151n,1153n,1163n,1171n,1181n,1187n,1193n,1201n,1213n,1217n,1223n,1229n,1231n,1237n,1249n,1259n,1277n,1279n,1283n,1289n,1291n,1297n,1301n,1303n,1307n,1319n,1321n,1327n,1361n,1367n,1373n,1381n,1399n,1409n,1423n,1427n,1429n,1433n,1439n,1447n,1451n,1453n,1459n,1471n,1481n,1483n,1487n,1489n,1493n,1499n,1511n,1523n,1531n,1543n,1549n,1553n,1559n,1567n,1571n,1579n,1583n,1597n];for(let t=0;t, iterations: }\n const isPrime = await ${d.name}(event.data.rnd, event.data.iterations);\n const msg = {\n isPrime: isPrime,\n value: event.data.rnd,\n id: event.data.id\n };\n postMessage(msg);\n }\n `,function(n){n=`(() => {${n}})()`;const t=new Blob([n],{type:"text/javascript"});return window.URL.createObjectURL(t)}(n)}function $(n,t=16){if(n<1)throw new RangeError("bitLength MUST be > 0");if(!b){let e=0n;do{e=c(w(n,!0))}while(!p(e,t));return new Promise((n=>{n(e)}))}return new Promise(((e,r)=>{const o=[],i=(r,i)=>{if(r.isPrime){for(let n=0;n0;)o.pop();e(r.value)}else{const e=c(w(n,!0));try{const n={rnd:e,iterations:t,id:r.id};i.postMessage(n)}catch(n){}}};{const n=y();for(let t=0;ti(n.data,t),o.push(t)}}for(let e=0;e 0");let e=0n;do{e=c(w(n,!0))}while(!p(e,t));return e}void 0!==self.Worker&&(b=!0);export{n as abs,t as bitLength,e as eGcd,r as gcd,d as isProbablyPrime,o as lcm,i as max,s as min,f as modInv,a as modPow,$ as prime,S as primeSync,h as randBetween,l as randBits,w as randBitsSync,g as randBytes,m as randBytesSync,u as toZn}; +function n(n){return n>=0?n:-n}function t(n){if("number"==typeof n&&(n=BigInt(n)),1n===n)return 1;let t=1;do{t++}while((n>>=1n)>1n);return t}function e(n,t){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof t&&(t=BigInt(t)),n<=0n||t<=0n)throw new RangeError("a and b MUST be > 0");let e=0n,r=1n,o=1n,i=0n;for(;0n!==n;){const f=t/n,u=t%n,s=e-o*f,c=r-i*f;t=n,n=u,e=o,r=i,o=s,i=c}return{g:t,x:e,y:r}}function r(t,e){let r="number"==typeof t?BigInt(n(t)):n(t),o="number"==typeof e?BigInt(n(e)):n(e);if(0n===r)return o;if(0n===o)return r;let i=0n;for(;0n===(1n&(r|o));)r>>=1n,o>>=1n,i++;for(;0n===(1n&r);)r>>=1n;do{for(;0n===(1n&o);)o>>=1n;if(r>o){const n=r;r=o,o=n}o-=r}while(0n!==o);return r<=t?n:t}function f(n,t){return n>=t?t:n}function u(n,t){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof t&&(t=BigInt(t)),t<=0n)throw new RangeError("n must be > 0");const e=n%t;return e<0n?e+t:e}function s(n,t){const r=e(u(n,t),t);if(1n!==r.g)throw new RangeError(`${n.toString()} does not have inverse modulo ${t.toString()}`);return u(r.x,t)}function c(t,e,r){if("number"==typeof t&&(t=BigInt(t)),"number"==typeof e&&(e=BigInt(e)),"number"==typeof r&&(r=BigInt(r)),r<=0n)throw new RangeError("n must be > 0");if(1n===r)return 0n;if(t=u(t,r),e<0n)return s(c(t,n(e),r),r);let o=1n;for(;e>0;)e%2n===1n&&(o=o*t%r),e/=2n,t=t**2n%r;return o}function a(n){let t=0n;for(const e of n.values()){t=(t<<8n)+BigInt(e)}return t}function g(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");return new Promise((function(e,r){{const r=new Uint8Array(n);self.crypto.getRandomValues(r),t&&(r[0]=128|r[0]),e(r)}}))}function m(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");{const e=new Uint8Array(n);return self.crypto.getRandomValues(e),t&&(e[0]=128|e[0]),e}}function w(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=Math.ceil(n/8),r=n%8;return new Promise(((n,o)=>{g(e,!1).then((function(e){if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}n(e)}))}))}function l(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=m(Math.ceil(n/8),!1),r=n%8;if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}return e}function h(n,e=1n){if(n<=0n||e<0n||n<=e)throw new RangeError("Arguments MUST be: max > 0 && min >=0 && max > min");const r=n-e,o=t(r);let i;do{i=a(l(o))}while(i>r);return i+e}let b=!1;function d(n,t=16,e=!1){if("number"==typeof n&&(n=BigInt(n)),n<0n)throw RangeError("w MUST be >= 0");return new Promise(((e,r)=>{const o=new Worker(y());o.onmessage=n=>{o.terminate(),e(n.data.isPrime)},o.onmessageerror=n=>{r(n)};const i={rnd:n,iterations:t,id:0};o.postMessage(i)}))}function p(n,t){if(2n===n)return!0;if(0n===(1n&n)||1n===n)return!1;const e=[3n,5n,7n,11n,13n,17n,19n,23n,29n,31n,37n,41n,43n,47n,53n,59n,61n,67n,71n,73n,79n,83n,89n,97n,101n,103n,107n,109n,113n,127n,131n,137n,139n,149n,151n,157n,163n,167n,173n,179n,181n,191n,193n,197n,199n,211n,223n,227n,229n,233n,239n,241n,251n,257n,263n,269n,271n,277n,281n,283n,293n,307n,311n,313n,317n,331n,337n,347n,349n,353n,359n,367n,373n,379n,383n,389n,397n,401n,409n,419n,421n,431n,433n,439n,443n,449n,457n,461n,463n,467n,479n,487n,491n,499n,503n,509n,521n,523n,541n,547n,557n,563n,569n,571n,577n,587n,593n,599n,601n,607n,613n,617n,619n,631n,641n,643n,647n,653n,659n,661n,673n,677n,683n,691n,701n,709n,719n,727n,733n,739n,743n,751n,757n,761n,769n,773n,787n,797n,809n,811n,821n,823n,827n,829n,839n,853n,857n,859n,863n,877n,881n,883n,887n,907n,911n,919n,929n,937n,941n,947n,953n,967n,971n,977n,983n,991n,997n,1009n,1013n,1019n,1021n,1031n,1033n,1039n,1049n,1051n,1061n,1063n,1069n,1087n,1091n,1093n,1097n,1103n,1109n,1117n,1123n,1129n,1151n,1153n,1163n,1171n,1181n,1187n,1193n,1201n,1213n,1217n,1223n,1229n,1231n,1237n,1249n,1259n,1277n,1279n,1283n,1289n,1291n,1297n,1301n,1303n,1307n,1319n,1321n,1327n,1361n,1367n,1373n,1381n,1399n,1409n,1423n,1427n,1429n,1433n,1439n,1447n,1451n,1453n,1459n,1471n,1481n,1483n,1487n,1489n,1493n,1499n,1511n,1523n,1531n,1543n,1549n,1553n,1559n,1567n,1571n,1579n,1583n,1597n];for(let t=0;t {${n}})()`;const t=new Blob([n],{type:"text/javascript"});return window.URL.createObjectURL(t)}(n)}function $(n,t=16){if(n<1)throw new RangeError("bitLength MUST be > 0");if(!b){let e=0n;do{e=a(l(n,!0))}while(!p(e,t));return new Promise((n=>{n(e)}))}return new Promise(((e,r)=>{const o=[],i=(r,i)=>{if(r.isPrime){for(let n=0;n0;)o.pop();e(r.value)}else{const e=a(l(n,!0));try{const n={rnd:e,iterations:t,id:r.id};i.postMessage(n)}catch(n){}}};{const n=y();for(let t=0;ti(n.data,t),o.push(t)}}for(let e=0;e 0");let e=0n;do{e=a(l(n,!0))}while(!p(e,t));return e}void 0!==self.Worker&&(b=!0);export{n as abs,t as bitLength,e as eGcd,r as gcd,d as isProbablyPrime,o as lcm,i as max,f as min,s as modInv,c as modPow,$ as prime,S as primeSync,h as randBetween,w as randBits,l as randBitsSync,g as randBytes,m as randBytesSync,u as toZn}; diff --git a/dist/bundles/bigint-crypto-utils.iife.js b/dist/bundles/bigint-crypto-utils.iife.js index 8797435..2a2fc7d 100644 --- a/dist/bundles/bigint-crypto-utils.iife.js +++ b/dist/bundles/bigint-crypto-utils.iife.js @@ -1 +1 @@ -var bigintCryptoUtils=function(n){"use strict";function t(n){return n>=0?n:-n}function e(n){if("number"==typeof n&&(n=BigInt(n)),1n===n)return 1;let t=1;do{t++}while((n>>=1n)>1n);return t}function r(n,t){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof t&&(t=BigInt(t)),n<=0n||t<=0n)throw new RangeError("a and b MUST be > 0");let e=0n,r=1n,o=1n,i=0n;for(;0n!==n;){const s=t/n,u=t%n,a=e-o*s,c=r-i*s;t=n,n=u,e=o,r=i,o=a,i=c}return{g:t,x:e,y:r}}function o(n,e){let r="number"==typeof n?BigInt(t(n)):t(n),o="number"==typeof e?BigInt(t(e)):t(e);if(0n===r)return o;if(0n===o)return r;let i=0n;for(;0n===(1n&(r|o));)r>>=1n,o>>=1n,i++;for(;0n===(1n&r);)r>>=1n;do{for(;0n===(1n&o);)o>>=1n;if(r>o){const n=r;r=o,o=n}o-=r}while(0n!==o);return r< 0");const e=n%t;return e<0n?e+t:e}function s(n,t){const e=r(i(n,t),t);if(1n!==e.g)throw new RangeError(`${n.toString()} does not have inverse modulo ${t.toString()}`);return i(e.x,t)}function u(n,e,r){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof e&&(e=BigInt(e)),"number"==typeof r&&(r=BigInt(r)),r<=0n)throw new RangeError("n must be > 0");if(1n===r)return 0n;if(n=i(n,r),e<0n)return s(u(n,t(e),r),r);let o=1n;for(;e>0;)e%2n===1n&&(o=o*n%r),e/=2n,n=n**2n%r;return o}function a(n){let t=0n;for(const e of n.values()){const n=BigInt(e);t=(t< 0");return new Promise((function(e,r){{const r=new Uint8Array(n);self.crypto.getRandomValues(r),t&&(r[0]=128|r[0]),e(r)}}))}function f(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");{const e=new Uint8Array(n);return self.crypto.getRandomValues(e),t&&(e[0]=128|e[0]),e}}function g(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=Math.ceil(n/8),r=n%8;return new Promise(((n,o)=>{c(e,!1).then((function(e){if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}n(e)}))}))}function m(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=f(Math.ceil(n/8),!1),r=n%8;if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}return e}function l(n,t=1n){if(n<=0n||t<0n||n<=t)throw new RangeError("Arguments MUST be: max > 0 && min >=0 && max > min");const r=n-t,o=e(r);let i;do{i=a(m(o))}while(i>r);return i+t}let w=!1;function d(n,t=16,e=!1){if("number"==typeof n&&(n=BigInt(n)),n<0n)throw RangeError("w MUST be >= 0");return new Promise(((e,r)=>{const o=new Worker(h());o.onmessage=n=>{o.terminate(),e(n.data.isPrime)},o.onmessageerror=n=>{r(n)};const i={rnd:n,iterations:t,id:0};o.postMessage(i)}))}function b(n,t=16){if(2n===n)return!0;if(0n===(1n&n)||1n===n)return!1;const e=[3n,5n,7n,11n,13n,17n,19n,23n,29n,31n,37n,41n,43n,47n,53n,59n,61n,67n,71n,73n,79n,83n,89n,97n,101n,103n,107n,109n,113n,127n,131n,137n,139n,149n,151n,157n,163n,167n,173n,179n,181n,191n,193n,197n,199n,211n,223n,227n,229n,233n,239n,241n,251n,257n,263n,269n,271n,277n,281n,283n,293n,307n,311n,313n,317n,331n,337n,347n,349n,353n,359n,367n,373n,379n,383n,389n,397n,401n,409n,419n,421n,431n,433n,439n,443n,449n,457n,461n,463n,467n,479n,487n,491n,499n,503n,509n,521n,523n,541n,547n,557n,563n,569n,571n,577n,587n,593n,599n,601n,607n,613n,617n,619n,631n,641n,643n,647n,653n,659n,661n,673n,677n,683n,691n,701n,709n,719n,727n,733n,739n,743n,751n,757n,761n,769n,773n,787n,797n,809n,811n,821n,823n,827n,829n,839n,853n,857n,859n,863n,877n,881n,883n,887n,907n,911n,919n,929n,937n,941n,947n,953n,967n,971n,977n,983n,991n,997n,1009n,1013n,1019n,1021n,1031n,1033n,1039n,1049n,1051n,1061n,1063n,1069n,1087n,1091n,1093n,1097n,1103n,1109n,1117n,1123n,1129n,1151n,1153n,1163n,1171n,1181n,1187n,1193n,1201n,1213n,1217n,1223n,1229n,1231n,1237n,1249n,1259n,1277n,1279n,1283n,1289n,1291n,1297n,1301n,1303n,1307n,1319n,1321n,1327n,1361n,1367n,1373n,1381n,1399n,1409n,1423n,1427n,1429n,1433n,1439n,1447n,1451n,1453n,1459n,1471n,1481n,1483n,1487n,1489n,1493n,1499n,1511n,1523n,1531n,1543n,1549n,1553n,1559n,1567n,1571n,1579n,1583n,1597n];for(let t=0;t, iterations: }\n const isPrime = await ${d.name}(event.data.rnd, event.data.iterations);\n const msg = {\n isPrime: isPrime,\n value: event.data.rnd,\n id: event.data.id\n };\n postMessage(msg);\n }\n `,function(n){n=`(() => {${n}})()`;const t=new Blob([n],{type:"text/javascript"});return window.URL.createObjectURL(t)}(n)}return void 0!==self.Worker&&(w=!0),n.abs=t,n.bitLength=e,n.eGcd=r,n.gcd=o,n.isProbablyPrime=d,n.lcm=function(n,e){return"number"==typeof n&&(n=BigInt(n)),"number"==typeof e&&(e=BigInt(e)),0n===n&&0n===e?BigInt(0):t(n*e)/o(n,e)},n.max=function(n,t){return n>=t?n:t},n.min=function(n,t){return n>=t?t:n},n.modInv=s,n.modPow=u,n.prime=function(n,t=16){if(n<1)throw new RangeError("bitLength MUST be > 0");if(!w){let e=0n;do{e=a(m(n,!0))}while(!b(e,t));return new Promise((n=>{n(e)}))}return new Promise(((e,r)=>{const o=[],i=(r,i)=>{if(r.isPrime){for(let n=0;n0;)o.pop();e(r.value)}else{const e=a(m(n,!0));try{const n={rnd:e,iterations:t,id:r.id};i.postMessage(n)}catch(n){}}};{const n=h();for(let t=0;ti(n.data,t),o.push(t)}}for(let e=0;e 0");let e=0n;do{e=a(m(n,!0))}while(!b(e,t));return e},n.randBetween=l,n.randBits=g,n.randBitsSync=m,n.randBytes=c,n.randBytesSync=f,n.toZn=i,Object.defineProperty(n,"__esModule",{value:!0}),n}({}); +var bigintCryptoUtils=function(n){"use strict";function t(n){return n>=0?n:-n}function e(n){if("number"==typeof n&&(n=BigInt(n)),1n===n)return 1;let t=1;do{t++}while((n>>=1n)>1n);return t}function r(n,t){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof t&&(t=BigInt(t)),n<=0n||t<=0n)throw new RangeError("a and b MUST be > 0");let e=0n,r=1n,o=1n,i=0n;for(;0n!==n;){const s=t/n,u=t%n,f=e-o*s,a=r-i*s;t=n,n=u,e=o,r=i,o=f,i=a}return{g:t,x:e,y:r}}function o(n,e){let r="number"==typeof n?BigInt(t(n)):t(n),o="number"==typeof e?BigInt(t(e)):t(e);if(0n===r)return o;if(0n===o)return r;let i=0n;for(;0n===(1n&(r|o));)r>>=1n,o>>=1n,i++;for(;0n===(1n&r);)r>>=1n;do{for(;0n===(1n&o);)o>>=1n;if(r>o){const n=r;r=o,o=n}o-=r}while(0n!==o);return r< 0");const e=n%t;return e<0n?e+t:e}function s(n,t){const e=r(i(n,t),t);if(1n!==e.g)throw new RangeError(`${n.toString()} does not have inverse modulo ${t.toString()}`);return i(e.x,t)}function u(n,e,r){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof e&&(e=BigInt(e)),"number"==typeof r&&(r=BigInt(r)),r<=0n)throw new RangeError("n must be > 0");if(1n===r)return 0n;if(n=i(n,r),e<0n)return s(u(n,t(e),r),r);let o=1n;for(;e>0;)e%2n===1n&&(o=o*n%r),e/=2n,n=n**2n%r;return o}function f(n){let t=0n;for(const e of n.values()){t=(t<<8n)+BigInt(e)}return t}function a(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");return new Promise((function(e,r){{const r=new Uint8Array(n);self.crypto.getRandomValues(r),t&&(r[0]=128|r[0]),e(r)}}))}function c(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");{const e=new Uint8Array(n);return self.crypto.getRandomValues(e),t&&(e[0]=128|e[0]),e}}function g(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=Math.ceil(n/8),r=n%8;return new Promise(((n,o)=>{a(e,!1).then((function(e){if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}n(e)}))}))}function m(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=c(Math.ceil(n/8),!1),r=n%8;if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}return e}function l(n,t=1n){if(n<=0n||t<0n||n<=t)throw new RangeError("Arguments MUST be: max > 0 && min >=0 && max > min");const r=n-t,o=e(r);let i;do{i=f(m(o))}while(i>r);return i+t}let w=!1;function d(n,t=16,e=!1){if("number"==typeof n&&(n=BigInt(n)),n<0n)throw RangeError("w MUST be >= 0");return new Promise(((e,r)=>{const o=new Worker(h());o.onmessage=n=>{o.terminate(),e(n.data.isPrime)},o.onmessageerror=n=>{r(n)};const i={rnd:n,iterations:t,id:0};o.postMessage(i)}))}function b(n,t){if(2n===n)return!0;if(0n===(1n&n)||1n===n)return!1;const e=[3n,5n,7n,11n,13n,17n,19n,23n,29n,31n,37n,41n,43n,47n,53n,59n,61n,67n,71n,73n,79n,83n,89n,97n,101n,103n,107n,109n,113n,127n,131n,137n,139n,149n,151n,157n,163n,167n,173n,179n,181n,191n,193n,197n,199n,211n,223n,227n,229n,233n,239n,241n,251n,257n,263n,269n,271n,277n,281n,283n,293n,307n,311n,313n,317n,331n,337n,347n,349n,353n,359n,367n,373n,379n,383n,389n,397n,401n,409n,419n,421n,431n,433n,439n,443n,449n,457n,461n,463n,467n,479n,487n,491n,499n,503n,509n,521n,523n,541n,547n,557n,563n,569n,571n,577n,587n,593n,599n,601n,607n,613n,617n,619n,631n,641n,643n,647n,653n,659n,661n,673n,677n,683n,691n,701n,709n,719n,727n,733n,739n,743n,751n,757n,761n,769n,773n,787n,797n,809n,811n,821n,823n,827n,829n,839n,853n,857n,859n,863n,877n,881n,883n,887n,907n,911n,919n,929n,937n,941n,947n,953n,967n,971n,977n,983n,991n,997n,1009n,1013n,1019n,1021n,1031n,1033n,1039n,1049n,1051n,1061n,1063n,1069n,1087n,1091n,1093n,1097n,1103n,1109n,1117n,1123n,1129n,1151n,1153n,1163n,1171n,1181n,1187n,1193n,1201n,1213n,1217n,1223n,1229n,1231n,1237n,1249n,1259n,1277n,1279n,1283n,1289n,1291n,1297n,1301n,1303n,1307n,1319n,1321n,1327n,1361n,1367n,1373n,1381n,1399n,1409n,1423n,1427n,1429n,1433n,1439n,1447n,1451n,1453n,1459n,1471n,1481n,1483n,1487n,1489n,1493n,1499n,1511n,1523n,1531n,1543n,1549n,1553n,1559n,1567n,1571n,1579n,1583n,1597n];for(let t=0;t {${n}})()`;const t=new Blob([n],{type:"text/javascript"});return window.URL.createObjectURL(t)}(n)}return void 0!==self.Worker&&(w=!0),n.abs=t,n.bitLength=e,n.eGcd=r,n.gcd=o,n.isProbablyPrime=d,n.lcm=function(n,e){return"number"==typeof n&&(n=BigInt(n)),"number"==typeof e&&(e=BigInt(e)),0n===n&&0n===e?BigInt(0):t(n*e)/o(n,e)},n.max=function(n,t){return n>=t?n:t},n.min=function(n,t){return n>=t?t:n},n.modInv=s,n.modPow=u,n.prime=function(n,t=16){if(n<1)throw new RangeError("bitLength MUST be > 0");if(!w){let e=0n;do{e=f(m(n,!0))}while(!b(e,t));return new Promise((n=>{n(e)}))}return new Promise(((e,r)=>{const o=[],i=(r,i)=>{if(r.isPrime){for(let n=0;n0;)o.pop();e(r.value)}else{const e=f(m(n,!0));try{const n={rnd:e,iterations:t,id:r.id};i.postMessage(n)}catch(n){}}};{const n=h();for(let t=0;ti(n.data,t),o.push(t)}}for(let e=0;e 0");let e=0n;do{e=f(m(n,!0))}while(!b(e,t));return e},n.randBetween=l,n.randBits=g,n.randBitsSync=m,n.randBytes=a,n.randBytesSync=c,n.toZn=i,Object.defineProperty(n,"__esModule",{value:!0}),n}({}); diff --git a/dist/bundles/bigint-crypto-utils.umd.js b/dist/bundles/bigint-crypto-utils.umd.js index 3d248b7..c1e8e3c 100644 --- a/dist/bundles/bigint-crypto-utils.umd.js +++ b/dist/bundles/bigint-crypto-utils.umd.js @@ -1 +1 @@ -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self).bigintCryptoUtils={})}(this,(function(n){"use strict";function t(n){return n>=0?n:-n}function e(n){if("number"==typeof n&&(n=BigInt(n)),1n===n)return 1;let t=1;do{t++}while((n>>=1n)>1n);return t}function r(n,t){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof t&&(t=BigInt(t)),n<=0n||t<=0n)throw new RangeError("a and b MUST be > 0");let e=0n,r=1n,o=1n,i=0n;for(;0n!==n;){const s=t/n,f=t%n,u=e-o*s,a=r-i*s;t=n,n=f,e=o,r=i,o=u,i=a}return{g:t,x:e,y:r}}function o(n,e){let r="number"==typeof n?BigInt(t(n)):t(n),o="number"==typeof e?BigInt(t(e)):t(e);if(0n===r)return o;if(0n===o)return r;let i=0n;for(;0n===(1n&(r|o));)r>>=1n,o>>=1n,i++;for(;0n===(1n&r);)r>>=1n;do{for(;0n===(1n&o);)o>>=1n;if(r>o){const n=r;r=o,o=n}o-=r}while(0n!==o);return r< 0");const e=n%t;return e<0n?e+t:e}function s(n,t){const e=r(i(n,t),t);if(1n!==e.g)throw new RangeError(`${n.toString()} does not have inverse modulo ${t.toString()}`);return i(e.x,t)}function f(n,e,r){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof e&&(e=BigInt(e)),"number"==typeof r&&(r=BigInt(r)),r<=0n)throw new RangeError("n must be > 0");if(1n===r)return 0n;if(n=i(n,r),e<0n)return s(f(n,t(e),r),r);let o=1n;for(;e>0;)e%2n===1n&&(o=o*n%r),e/=2n,n=n**2n%r;return o}function u(n){let t=0n;for(const e of n.values()){const n=BigInt(e);t=(t< 0");return new Promise((function(e,r){{const r=new Uint8Array(n);self.crypto.getRandomValues(r),t&&(r[0]=128|r[0]),e(r)}}))}function c(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");{const e=new Uint8Array(n);return self.crypto.getRandomValues(e),t&&(e[0]=128|e[0]),e}}function g(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=Math.ceil(n/8),r=n%8;return new Promise(((n,o)=>{a(e,!1).then((function(e){if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}n(e)}))}))}function m(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=c(Math.ceil(n/8),!1),r=n%8;if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}return e}function l(n,t=1n){if(n<=0n||t<0n||n<=t)throw new RangeError("Arguments MUST be: max > 0 && min >=0 && max > min");const r=n-t,o=e(r);let i;do{i=u(m(o))}while(i>r);return i+t}let d=!1;function w(n,t=16,e=!1){if("number"==typeof n&&(n=BigInt(n)),n<0n)throw RangeError("w MUST be >= 0");return new Promise(((e,r)=>{const o=new Worker(h());o.onmessage=n=>{o.terminate(),e(n.data.isPrime)},o.onmessageerror=n=>{r(n)};const i={rnd:n,iterations:t,id:0};o.postMessage(i)}))}function b(n,t=16){if(2n===n)return!0;if(0n===(1n&n)||1n===n)return!1;const e=[3n,5n,7n,11n,13n,17n,19n,23n,29n,31n,37n,41n,43n,47n,53n,59n,61n,67n,71n,73n,79n,83n,89n,97n,101n,103n,107n,109n,113n,127n,131n,137n,139n,149n,151n,157n,163n,167n,173n,179n,181n,191n,193n,197n,199n,211n,223n,227n,229n,233n,239n,241n,251n,257n,263n,269n,271n,277n,281n,283n,293n,307n,311n,313n,317n,331n,337n,347n,349n,353n,359n,367n,373n,379n,383n,389n,397n,401n,409n,419n,421n,431n,433n,439n,443n,449n,457n,461n,463n,467n,479n,487n,491n,499n,503n,509n,521n,523n,541n,547n,557n,563n,569n,571n,577n,587n,593n,599n,601n,607n,613n,617n,619n,631n,641n,643n,647n,653n,659n,661n,673n,677n,683n,691n,701n,709n,719n,727n,733n,739n,743n,751n,757n,761n,769n,773n,787n,797n,809n,811n,821n,823n,827n,829n,839n,853n,857n,859n,863n,877n,881n,883n,887n,907n,911n,919n,929n,937n,941n,947n,953n,967n,971n,977n,983n,991n,997n,1009n,1013n,1019n,1021n,1031n,1033n,1039n,1049n,1051n,1061n,1063n,1069n,1087n,1091n,1093n,1097n,1103n,1109n,1117n,1123n,1129n,1151n,1153n,1163n,1171n,1181n,1187n,1193n,1201n,1213n,1217n,1223n,1229n,1231n,1237n,1249n,1259n,1277n,1279n,1283n,1289n,1291n,1297n,1301n,1303n,1307n,1319n,1321n,1327n,1361n,1367n,1373n,1381n,1399n,1409n,1423n,1427n,1429n,1433n,1439n,1447n,1451n,1453n,1459n,1471n,1481n,1483n,1487n,1489n,1493n,1499n,1511n,1523n,1531n,1543n,1549n,1553n,1559n,1567n,1571n,1579n,1583n,1597n];for(let t=0;t, iterations: }\n const isPrime = await ${w.name}(event.data.rnd, event.data.iterations);\n const msg = {\n isPrime: isPrime,\n value: event.data.rnd,\n id: event.data.id\n };\n postMessage(msg);\n }\n `,function(n){n=`(() => {${n}})()`;const t=new Blob([n],{type:"text/javascript"});return window.URL.createObjectURL(t)}(n)}void 0!==self.Worker&&(d=!0),n.abs=t,n.bitLength=e,n.eGcd=r,n.gcd=o,n.isProbablyPrime=w,n.lcm=function(n,e){return"number"==typeof n&&(n=BigInt(n)),"number"==typeof e&&(e=BigInt(e)),0n===n&&0n===e?BigInt(0):t(n*e)/o(n,e)},n.max=function(n,t){return n>=t?n:t},n.min=function(n,t){return n>=t?t:n},n.modInv=s,n.modPow=f,n.prime=function(n,t=16){if(n<1)throw new RangeError("bitLength MUST be > 0");if(!d){let e=0n;do{e=u(m(n,!0))}while(!b(e,t));return new Promise((n=>{n(e)}))}return new Promise(((e,r)=>{const o=[],i=(r,i)=>{if(r.isPrime){for(let n=0;n0;)o.pop();e(r.value)}else{const e=u(m(n,!0));try{const n={rnd:e,iterations:t,id:r.id};i.postMessage(n)}catch(n){}}};{const n=h();for(let t=0;ti(n.data,t),o.push(t)}}for(let e=0;e 0");let e=0n;do{e=u(m(n,!0))}while(!b(e,t));return e},n.randBetween=l,n.randBits=g,n.randBitsSync=m,n.randBytes=a,n.randBytesSync=c,n.toZn=i,Object.defineProperty(n,"__esModule",{value:!0})})); +!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self).bigintCryptoUtils={})}(this,(function(n){"use strict";function t(n){return n>=0?n:-n}function e(n){if("number"==typeof n&&(n=BigInt(n)),1n===n)return 1;let t=1;do{t++}while((n>>=1n)>1n);return t}function r(n,t){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof t&&(t=BigInt(t)),n<=0n||t<=0n)throw new RangeError("a and b MUST be > 0");let e=0n,r=1n,o=1n,i=0n;for(;0n!==n;){const s=t/n,f=t%n,u=e-o*s,c=r-i*s;t=n,n=f,e=o,r=i,o=u,i=c}return{g:t,x:e,y:r}}function o(n,e){let r="number"==typeof n?BigInt(t(n)):t(n),o="number"==typeof e?BigInt(t(e)):t(e);if(0n===r)return o;if(0n===o)return r;let i=0n;for(;0n===(1n&(r|o));)r>>=1n,o>>=1n,i++;for(;0n===(1n&r);)r>>=1n;do{for(;0n===(1n&o);)o>>=1n;if(r>o){const n=r;r=o,o=n}o-=r}while(0n!==o);return r< 0");const e=n%t;return e<0n?e+t:e}function s(n,t){const e=r(i(n,t),t);if(1n!==e.g)throw new RangeError(`${n.toString()} does not have inverse modulo ${t.toString()}`);return i(e.x,t)}function f(n,e,r){if("number"==typeof n&&(n=BigInt(n)),"number"==typeof e&&(e=BigInt(e)),"number"==typeof r&&(r=BigInt(r)),r<=0n)throw new RangeError("n must be > 0");if(1n===r)return 0n;if(n=i(n,r),e<0n)return s(f(n,t(e),r),r);let o=1n;for(;e>0;)e%2n===1n&&(o=o*n%r),e/=2n,n=n**2n%r;return o}function u(n){let t=0n;for(const e of n.values()){t=(t<<8n)+BigInt(e)}return t}function c(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");return new Promise((function(e,r){{const r=new Uint8Array(n);self.crypto.getRandomValues(r),t&&(r[0]=128|r[0]),e(r)}}))}function a(n,t=!1){if(n<1)throw new RangeError("byteLength MUST be > 0");{const e=new Uint8Array(n);return self.crypto.getRandomValues(e),t&&(e[0]=128|e[0]),e}}function g(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=Math.ceil(n/8),r=n%8;return new Promise(((n,o)=>{c(e,!1).then((function(e){if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}n(e)}))}))}function m(n,t=!1){if(n<1)throw new RangeError("bitLength MUST be > 0");const e=a(Math.ceil(n/8),!1),r=n%8;if(0!==r&&(e[0]=e[0]&2**r-1),t){const n=0!==r?2**(r-1):128;e[0]=e[0]|n}return e}function l(n,t=1n){if(n<=0n||t<0n||n<=t)throw new RangeError("Arguments MUST be: max > 0 && min >=0 && max > min");const r=n-t,o=e(r);let i;do{i=u(m(o))}while(i>r);return i+t}let d=!1;function w(n,t=16,e=!1){if("number"==typeof n&&(n=BigInt(n)),n<0n)throw RangeError("w MUST be >= 0");return new Promise(((e,r)=>{const o=new Worker(h());o.onmessage=n=>{o.terminate(),e(n.data.isPrime)},o.onmessageerror=n=>{r(n)};const i={rnd:n,iterations:t,id:0};o.postMessage(i)}))}function b(n,t){if(2n===n)return!0;if(0n===(1n&n)||1n===n)return!1;const e=[3n,5n,7n,11n,13n,17n,19n,23n,29n,31n,37n,41n,43n,47n,53n,59n,61n,67n,71n,73n,79n,83n,89n,97n,101n,103n,107n,109n,113n,127n,131n,137n,139n,149n,151n,157n,163n,167n,173n,179n,181n,191n,193n,197n,199n,211n,223n,227n,229n,233n,239n,241n,251n,257n,263n,269n,271n,277n,281n,283n,293n,307n,311n,313n,317n,331n,337n,347n,349n,353n,359n,367n,373n,379n,383n,389n,397n,401n,409n,419n,421n,431n,433n,439n,443n,449n,457n,461n,463n,467n,479n,487n,491n,499n,503n,509n,521n,523n,541n,547n,557n,563n,569n,571n,577n,587n,593n,599n,601n,607n,613n,617n,619n,631n,641n,643n,647n,653n,659n,661n,673n,677n,683n,691n,701n,709n,719n,727n,733n,739n,743n,751n,757n,761n,769n,773n,787n,797n,809n,811n,821n,823n,827n,829n,839n,853n,857n,859n,863n,877n,881n,883n,887n,907n,911n,919n,929n,937n,941n,947n,953n,967n,971n,977n,983n,991n,997n,1009n,1013n,1019n,1021n,1031n,1033n,1039n,1049n,1051n,1061n,1063n,1069n,1087n,1091n,1093n,1097n,1103n,1109n,1117n,1123n,1129n,1151n,1153n,1163n,1171n,1181n,1187n,1193n,1201n,1213n,1217n,1223n,1229n,1231n,1237n,1249n,1259n,1277n,1279n,1283n,1289n,1291n,1297n,1301n,1303n,1307n,1319n,1321n,1327n,1361n,1367n,1373n,1381n,1399n,1409n,1423n,1427n,1429n,1433n,1439n,1447n,1451n,1453n,1459n,1471n,1481n,1483n,1487n,1489n,1493n,1499n,1511n,1523n,1531n,1543n,1549n,1553n,1559n,1567n,1571n,1579n,1583n,1597n];for(let t=0;t {${n}})()`;const t=new Blob([n],{type:"text/javascript"});return window.URL.createObjectURL(t)}(n)}void 0!==self.Worker&&(d=!0),n.abs=t,n.bitLength=e,n.eGcd=r,n.gcd=o,n.isProbablyPrime=w,n.lcm=function(n,e){return"number"==typeof n&&(n=BigInt(n)),"number"==typeof e&&(e=BigInt(e)),0n===n&&0n===e?BigInt(0):t(n*e)/o(n,e)},n.max=function(n,t){return n>=t?n:t},n.min=function(n,t){return n>=t?t:n},n.modInv=s,n.modPow=f,n.prime=function(n,t=16){if(n<1)throw new RangeError("bitLength MUST be > 0");if(!d){let e=0n;do{e=u(m(n,!0))}while(!b(e,t));return new Promise((n=>{n(e)}))}return new Promise(((e,r)=>{const o=[],i=(r,i)=>{if(r.isPrime){for(let n=0;n0;)o.pop();e(r.value)}else{const e=u(m(n,!0));try{const n={rnd:e,iterations:t,id:r.id};i.postMessage(n)}catch(n){}}};{const n=h();for(let t=0;ti(n.data,t),o.push(t)}}for(let e=0;e 0");let e=0n;do{e=u(m(n,!0))}while(!b(e,t));return e},n.randBetween=l,n.randBits=g,n.randBitsSync=m,n.randBytes=c,n.randBytesSync=a,n.toZn=i,Object.defineProperty(n,"__esModule",{value:!0})})); diff --git a/dist/cjs/index.node.cjs b/dist/cjs/index.node.cjs index 84daa0f..401e46c 100644 --- a/dist/cjs/index.node.cjs +++ b/dist/cjs/index.node.cjs @@ -8,7 +8,7 @@ function fromBuffer(buf) { let ret = 0n; for (const i of buf.values()) { const bi = BigInt(i); - ret = (ret << BigInt(8)) + bi; + ret = (ret << 8n) + bi; } return ret; } @@ -209,7 +209,7 @@ function isProbablyPrime(w, iterations = 16, disableWorkers = false) { } } } -function _isProbablyPrime(w, iterations = 16) { +function _isProbablyPrime(w, iterations) { /* PREFILTERING. Even values but 2 are not primes, so don't test. 1 is not a prime and the M-R algorithm needs w>1. @@ -709,4 +709,4 @@ exports.randBits = randBits; exports.randBitsSync = randBitsSync; exports.randBytes = randBytes; exports.randBytesSync = randBytesSync; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgubm9kZS5janMiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90cy9mcm9tQnVmZmVyLnRzIiw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yxDQUFDO29CQUN4QixHQUFHLEVBQUUsR0FBRztvQkFDUixVQUFVLEVBQUUsVUFBVTtvQkFDdEIsRUFBRSxFQUFFLENBQUM7aUJBQ04sQ0FBQyxDQUFBO2FBQ0gsQ0FBQyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQTtTQUNqQjtLQUNGLENBQUMsQ0FBQTtBQUNKLENBQUM7QUFFRDs7Ozs7Ozs7Ozs7O1NBWWdCLFNBQVMsQ0FBRSxTQUFpQixFQUFFLGFBQXFCLEVBQUU7SUFDbkUsSUFBSSxTQUFTLEdBQUcsQ0FBQztRQUFFLE1BQU0sSUFBSSxVQUFVLENBQUMsdUJBQXVCLENBQUMsQ0FBQTtJQUNoRSxJQUFJLEdBQUcsR0FBRyxFQUFFLENBQUE7SUFDWixHQUFHO1FBQ0QsR0FBRyxHQUFHLFVBQVUsQ0FBQyxZQUFZLENBQUMsU0FBUyxFQUFFLElBQUksQ0FBQyxDQUFDLENBQUE7S0FDaEQsUUFBUSxDQUFDLGdCQUFnQixDQUFDLEdBQUcsRUFBRSxVQUFVLENBQUMsRUFBQztJQUM1QyxPQUFPLEdBQUcsQ0FBQTtBQUNaOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ== diff --git a/dist/esm/index.browser.js b/dist/esm/index.browser.js new file mode 100644 index 0000000..4ee0174 --- /dev/null +++ b/dist/esm/index.browser.js @@ -0,0 +1,852 @@ +/** + * Absolute value. abs(a)==a if a>=0. abs(a)==-a if a<0 + * + * @param a + * + * @returns The absolute value of a + */ +function abs(a) { + return (a >= 0) ? a : -a; +} + +/** + * Returns the bitlength of a number + * + * @param a + * @returns The bit length + */ +function bitLength(a) { + if (typeof a === 'number') + a = BigInt(a); + if (a === 1n) { + return 1; + } + let bits = 1; + do { + bits++; + } while ((a >>= 1n) > 1n); + return bits; +} + +/** + * An iterative implementation of the extended euclidean algorithm or extended greatest common divisor algorithm. + * Take positive integers a, b as input, and return a triple (g, x, y), such that ax + by = g = gcd(a, b). + * + * @param a + * @param b + * + * @throws {RangeError} + * This excepction is thrown if a or b are less than 0 + * + * @returns A triple (g, x, y), such that ax + by = g = gcd(a, b). + */ +function eGcd(a, b) { + if (typeof a === 'number') + a = BigInt(a); + if (typeof b === 'number') + b = BigInt(b); + if (a <= 0n || b <= 0n) + throw new RangeError('a and b MUST be > 0'); // a and b MUST be positive + let x = 0n; + let y = 1n; + let u = 1n; + let v = 0n; + while (a !== 0n) { + const q = b / a; + const r = b % a; + const m = x - (u * q); + const n = y - (v * q); + b = a; + a = r; + x = u; + y = v; + u = m; + v = n; + } + return { + g: b, + x: x, + y: y + }; +} + +/** + * Greatest-common divisor of two integers based on the iterative binary algorithm. + * + * @param a + * @param b + * + * @returns The greatest common divisor of a and b + */ +function gcd(a, b) { + let aAbs = (typeof a === 'number') ? BigInt(abs(a)) : abs(a); + let bAbs = (typeof b === 'number') ? BigInt(abs(b)) : abs(b); + if (aAbs === 0n) { + return bAbs; + } + else if (bAbs === 0n) { + return aAbs; + } + let shift = 0n; + while (((aAbs | bAbs) & 1n) === 0n) { + aAbs >>= 1n; + bAbs >>= 1n; + shift++; + } + while ((aAbs & 1n) === 0n) + aAbs >>= 1n; + do { + while ((bAbs & 1n) === 0n) + bAbs >>= 1n; + if (aAbs > bAbs) { + const x = aAbs; + aAbs = bAbs; + bAbs = x; + } + bAbs -= aAbs; + } while (bAbs !== 0n); + // rescale + return aAbs << shift; +} + +/** + * The least common multiple computed as abs(a*b)/gcd(a,b) + * @param a + * @param b + * + * @returns The least common multiple of a and b + */ +function lcm(a, b) { + if (typeof a === 'number') + a = BigInt(a); + if (typeof b === 'number') + b = BigInt(b); + if (a === 0n && b === 0n) + return BigInt(0); + return abs(a * b) / gcd(a, b); +} + +/** + * Maximum. max(a,b)==a if a>=b. max(a,b)==b if a<=b + * + * @param a + * @param b + * + * @returns Maximum of numbers a and b + */ +function max(a, b) { + return (a >= b) ? a : b; +} + +/** + * Minimum. min(a,b)==b if a>=b. min(a,b)==a if a<=b + * + * @param a + * @param b + * + * @returns Minimum of numbers a and b + */ +function min(a, b) { + return (a >= b) ? b : a; +} + +/** + * Finds the smallest positive element that is congruent to a in modulo n + * + * @remarks + * a and b must be the same type, either number or bigint + * + * @param a - An integer + * @param n - The modulo + * + * @throws {RangeError} + * Excpeption thrown when n is not > 0 + * + * @returns A bigint with the smallest positive representation of a modulo n + */ +function toZn(a, n) { + if (typeof a === 'number') + a = BigInt(a); + if (typeof n === 'number') + n = BigInt(n); + if (n <= 0n) { + throw new RangeError('n must be > 0'); + } + const aZn = a % n; + return (aZn < 0n) ? aZn + n : aZn; +} + +/** + * Modular inverse. + * + * @param a The number to find an inverse for + * @param n The modulo + * + * @throws {RangeError} + * Excpeption thorwn when a does not have inverse modulo n + * + * @returns The inverse modulo n + */ +function modInv(a, n) { + const egcd = eGcd(toZn(a, n), n); + if (egcd.g !== 1n) { + throw new RangeError(`${a.toString()} does not have inverse modulo ${n.toString()}`); // modular inverse does not exist + } + else { + return toZn(egcd.x, n); + } +} + +/** + * Modular exponentiation b**e mod n. Currently using the right-to-left binary method + * + * @param b base + * @param e exponent + * @param n modulo + * + * @throws {RangeError} + * Excpeption thrown when n is not > 0 + * + * @returns b**e mod n + */ +function modPow(b, e, n) { + if (typeof b === 'number') + b = BigInt(b); + if (typeof e === 'number') + e = BigInt(e); + if (typeof n === 'number') + n = BigInt(n); + if (n <= 0n) { + throw new RangeError('n must be > 0'); + } + else if (n === 1n) { + return 0n; + } + b = toZn(b, n); + if (e < 0n) { + return modInv(modPow(b, abs(e), n), n); + } + let r = 1n; + while (e > 0) { + if ((e % 2n) === 1n) { + r = r * b % n; + } + e = e / 2n; + b = b ** 2n % n; + } + return r; +} + +function fromBuffer(buf) { + let ret = 0n; + for (const i of buf.values()) { + const bi = BigInt(i); + ret = (ret << 8n) + bi; + } + return ret; +} + +/** + * Secure random bytes for both node and browsers. Node version uses crypto.randomBytes() and browser one self.crypto.getRandomValues() + * + * @param byteLength - The desired number of random bytes + * @param forceLength - If we want to force the output to have a bit length of 8*byteLength. It basically forces the msb to be 1 + * + * @throws {RangeError} + * byteLength MUST be > 0 + * + * @returns A promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure random bytes + */ +function randBytes(byteLength, forceLength = false) { + if (byteLength < 1) + throw new RangeError('byteLength MUST be > 0'); + return new Promise(function (resolve, reject) { + { // browser + const buf = new Uint8Array(byteLength); + self.crypto.getRandomValues(buf); + // If fixed length is required we put the first bit to 1 -> to get the necessary bitLength + if (forceLength) + buf[0] = buf[0] | 128; + resolve(buf); + } + }); +} +/** + * Secure random bytes for both node and browsers. Node version uses crypto.randomFill() and browser one self.crypto.getRandomValues() + * + * @param byteLength - The desired number of random bytes + * @param forceLength - If we want to force the output to have a bit length of 8*byteLength. It basically forces the msb to be 1 + * + * @throws {RangeError} + * byteLength MUST be > 0 + * + * @returns A UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure random bytes + */ +function randBytesSync(byteLength, forceLength = false) { + if (byteLength < 1) + throw new RangeError('byteLength MUST be > 0'); + /* eslint-disable no-lone-blocks */ + { // browser + const buf = new Uint8Array(byteLength); + self.crypto.getRandomValues(buf); + // If fixed length is required we put the first bit to 1 -> to get the necessary bitLength + if (forceLength) + buf[0] = buf[0] | 128; + return buf; + } + /* eslint-enable no-lone-blocks */ +} + +/** + * Secure random bits for both node and browsers. Node version uses crypto.randomFill() and browser one self.crypto.getRandomValues() + * + * @param bitLength - The desired number of random bits + * @param forceLength - If we want to force the output to have a specific bit length. It basically forces the msb to be 1 + * + * @throws {RangeError} + * bitLength MUST be > 0 + * + * @returns A Promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure random bits + */ +function randBits(bitLength, forceLength = false) { + if (bitLength < 1) + throw new RangeError('bitLength MUST be > 0'); + const byteLength = Math.ceil(bitLength / 8); + const bitLengthMod8 = bitLength % 8; + return new Promise((resolve, reject) => { + randBytes(byteLength, false).then(function (rndBytes) { + if (bitLengthMod8 !== 0) { + // Fill with 0's the extra bits + rndBytes[0] = rndBytes[0] & (2 ** bitLengthMod8 - 1); + } + if (forceLength) { + const mask = (bitLengthMod8 !== 0) ? 2 ** (bitLengthMod8 - 1) : 128; + rndBytes[0] = rndBytes[0] | mask; + } + resolve(rndBytes); + }); + }); +} +/** + * Secure random bits for both node and browsers. Node version uses crypto.randomFill() and browser one self.crypto.getRandomValues() + * @param bitLength - The desired number of random bits + * @param forceLength - If we want to force the output to have a specific bit length. It basically forces the msb to be 1 + * + * @throws {RangeError} + * bitLength MUST be > 0 + * + * @returns A Uint8Array/Buffer (Browser/Node.js) filled with cryptographically secure random bits + */ +function randBitsSync(bitLength, forceLength = false) { + if (bitLength < 1) + throw new RangeError('bitLength MUST be > 0'); + const byteLength = Math.ceil(bitLength / 8); + const rndBytes = randBytesSync(byteLength, false); + const bitLengthMod8 = bitLength % 8; + if (bitLengthMod8 !== 0) { + // Fill with 0's the extra bits + rndBytes[0] = rndBytes[0] & (2 ** bitLengthMod8 - 1); + } + if (forceLength) { + const mask = (bitLengthMod8 !== 0) ? 2 ** (bitLengthMod8 - 1) : 128; + rndBytes[0] = rndBytes[0] | mask; + } + return rndBytes; +} + +/** + * Returns a cryptographically secure random integer between [min,max]. Both numbers must be >=0 + * @param max Returned value will be <= max + * @param min Returned value will be >= min + * + * @throws {RangeError} + * Arguments MUST be: max > 0 && min >=0 && max > min + * + * @returns A cryptographically secure random bigint between [min,max] + */ +function randBetween(max, min = 1n) { + if (max <= 0n || min < 0n || max <= min) + throw new RangeError('Arguments MUST be: max > 0 && min >=0 && max > min'); + const interval = max - min; + const bitLen = bitLength(interval); + let rnd; + do { + const buf = randBitsSync(bitLen); + rnd = fromBuffer(buf); + } while (rnd > interval); + return rnd + min; +} + +function _workerUrl(workerCode) { + workerCode = `(() => {${workerCode}})()`; // encapsulate IIFE + const _blob = new Blob([workerCode], { type: 'text/javascript' }); + return window.URL.createObjectURL(_blob); +} +let _useWorkers = false; // The following is just to check whether we can use workers +/* eslint-disable no-lone-blocks */ +{ // Native JS + if (self.Worker !== undefined) + _useWorkers = true; +} + +/** + * The test first tries if any of the first 250 small primes are a factor of the input number and then passes several + * iterations of Miller-Rabin Probabilistic Primality Test (FIPS 186-4 C.3.1) + * + * @param w - A positive integer to be tested for primality + * @param iterations - The number of iterations for the primality test. The value shall be consistent with Table C.1, C.2 or C.3 + * @param disableWorkers - Disable the use of workers for the primality test + * + * @throws {RangeError} + * w MUST be >= 0 + * + * @returns A promise that resolves to a boolean that is either true (a probably prime number) or false (definitely composite) + */ +function isProbablyPrime(w, iterations = 16, disableWorkers = false) { + if (typeof w === 'number') { + w = BigInt(w); + } + if (w < 0n) + throw RangeError('w MUST be >= 0'); + { // browser + return new Promise((resolve, reject) => { + const worker = new Worker(_isProbablyPrimeWorkerUrl()); + worker.onmessage = (event) => { + worker.terminate(); + resolve(event.data.isPrime); + }; + worker.onmessageerror = (event) => { + reject(event); + }; + const msg = { + rnd: w, + iterations: iterations, + id: 0 + }; + worker.postMessage(msg); + }); + } +} +function _isProbablyPrime(w, iterations) { + /* + PREFILTERING. Even values but 2 are not primes, so don't test. + 1 is not a prime and the M-R algorithm needs w>1. + */ + if (w === 2n) + return true; + else if ((w & 1n) === 0n || w === 1n) + return false; + /* + Test if any of the first 250 small primes are a factor of w. 2 is not tested because it was already tested above. + */ + const firstPrimes = [ + 3n, + 5n, + 7n, + 11n, + 13n, + 17n, + 19n, + 23n, + 29n, + 31n, + 37n, + 41n, + 43n, + 47n, + 53n, + 59n, + 61n, + 67n, + 71n, + 73n, + 79n, + 83n, + 89n, + 97n, + 101n, + 103n, + 107n, + 109n, + 113n, + 127n, + 131n, + 137n, + 139n, + 149n, + 151n, + 157n, + 163n, + 167n, + 173n, + 179n, + 181n, + 191n, + 193n, + 197n, + 199n, + 211n, + 223n, + 227n, + 229n, + 233n, + 239n, + 241n, + 251n, + 257n, + 263n, + 269n, + 271n, + 277n, + 281n, + 283n, + 293n, + 307n, + 311n, + 313n, + 317n, + 331n, + 337n, + 347n, + 349n, + 353n, + 359n, + 367n, + 373n, + 379n, + 383n, + 389n, + 397n, + 401n, + 409n, + 419n, + 421n, + 431n, + 433n, + 439n, + 443n, + 449n, + 457n, + 461n, + 463n, + 467n, + 479n, + 487n, + 491n, + 499n, + 503n, + 509n, + 521n, + 523n, + 541n, + 547n, + 557n, + 563n, + 569n, + 571n, + 577n, + 587n, + 593n, + 599n, + 601n, + 607n, + 613n, + 617n, + 619n, + 631n, + 641n, + 643n, + 647n, + 653n, + 659n, + 661n, + 673n, + 677n, + 683n, + 691n, + 701n, + 709n, + 719n, + 727n, + 733n, + 739n, + 743n, + 751n, + 757n, + 761n, + 769n, + 773n, + 787n, + 797n, + 809n, + 811n, + 821n, + 823n, + 827n, + 829n, + 839n, + 853n, + 857n, + 859n, + 863n, + 877n, + 881n, + 883n, + 887n, + 907n, + 911n, + 919n, + 929n, + 937n, + 941n, + 947n, + 953n, + 967n, + 971n, + 977n, + 983n, + 991n, + 997n, + 1009n, + 1013n, + 1019n, + 1021n, + 1031n, + 1033n, + 1039n, + 1049n, + 1051n, + 1061n, + 1063n, + 1069n, + 1087n, + 1091n, + 1093n, + 1097n, + 1103n, + 1109n, + 1117n, + 1123n, + 1129n, + 1151n, + 1153n, + 1163n, + 1171n, + 1181n, + 1187n, + 1193n, + 1201n, + 1213n, + 1217n, + 1223n, + 1229n, + 1231n, + 1237n, + 1249n, + 1259n, + 1277n, + 1279n, + 1283n, + 1289n, + 1291n, + 1297n, + 1301n, + 1303n, + 1307n, + 1319n, + 1321n, + 1327n, + 1361n, + 1367n, + 1373n, + 1381n, + 1399n, + 1409n, + 1423n, + 1427n, + 1429n, + 1433n, + 1439n, + 1447n, + 1451n, + 1453n, + 1459n, + 1471n, + 1481n, + 1483n, + 1487n, + 1489n, + 1493n, + 1499n, + 1511n, + 1523n, + 1531n, + 1543n, + 1549n, + 1553n, + 1559n, + 1567n, + 1571n, + 1579n, + 1583n, + 1597n + ]; + for (let i = 0; i < firstPrimes.length && (firstPrimes[i] <= w); i++) { + const p = firstPrimes[i]; + if (w === p) + return true; + else if (w % p === 0n) + return false; + } + /* + 1. Let a be the largest integer such that 2**a divides w−1. + 2. m = (w−1) / 2**a. + 3. wlen = len (w). + 4. For i = 1 to iterations do + 4.1 Obtain a string b of wlen bits from an RBG. + Comment: Ensure that 1 < b < w−1. + 4.2 If ((b ≤ 1) or (b ≥ w−1)), then go to step 4.1. + 4.3 z = b**m mod w. + 4.4 If ((z = 1) or (z = w − 1)), then go to step 4.7. + 4.5 For j = 1 to a − 1 do. + 4.5.1 z = z**2 mod w. + 4.5.2 If (z = w−1), then go to step 4.7. + 4.5.3 If (z = 1), then go to step 4.6. + 4.6 Return COMPOSITE. + 4.7 Continue. + Comment: Increment i for the do-loop in step 4. + 5. Return PROBABLY PRIME. + */ + let a = 0n; + const d = w - 1n; + let aux = d; + while (aux % 2n === 0n) { + aux /= 2n; + ++a; + } + const m = d / (2n ** a); + do { + const b = randBetween(d, 2n); + let z = modPow(b, m, w); + if (z === 1n || z === d) + continue; + let j = 1; + while (j < a) { + z = modPow(z, 2n, w); + if (z === d) + break; + if (z === 1n) + return false; + j++; + } + if (z !== d) + return false; + } while (--iterations !== 0); + return true; +} +function _isProbablyPrimeWorkerUrl() { + // Let's us first add all the required functions + let workerCode = `'use strict';const ${eGcd.name}=${eGcd.toString()};const ${modInv.name}=${modInv.toString()};const ${modPow.name}=${modPow.toString()};const ${toZn.name}=${toZn.toString()};const ${randBitsSync.name}=${randBitsSync.toString()};const ${randBytesSync.name}=${randBytesSync.toString()};const ${randBetween.name}=${randBetween.toString()};const ${isProbablyPrime.name}=${_isProbablyPrime.toString()};${bitLength.toString()};${fromBuffer.toString()};`; + workerCode += `onmessage=async function(e){const m={isPrime:await ${isProbablyPrime.name}(e.data.rnd,e.data.iterations),value:e.data.rnd,id:e.data.id};postMessage(m);}`; + return _workerUrl(workerCode); +} + +/** + * A probably-prime (Miller-Rabin), cryptographically-secure, random-number generator. + * The browser version uses web workers to parallelise prime look up. Therefore, it does not lock the UI + * main process, and it can be much faster (if several cores or cpu are available). + * The node version can also use worker_threads if they are available (enabled by default with Node 11 and + * and can be enabled at runtime executing node --experimental-worker with node >=10.5.0). + * + * @param bitLength - The required bit length for the generated prime + * @param iterations - The number of iterations for the Miller-Rabin Probabilistic Primality Test + * + * @throws {RangeError} + * bitLength MUST be > 0 + * + * @returns A promise that resolves to a bigint probable prime of bitLength bits. + */ +function prime(bitLength, iterations = 16) { + if (bitLength < 1) + throw new RangeError('bitLength MUST be > 0'); + /* istanbul ignore if */ + if (!_useWorkers) { // If there is no support for workers + let rnd = 0n; + do { + rnd = fromBuffer(randBitsSync(bitLength, true)); + } while (!_isProbablyPrime(rnd, iterations)); + return new Promise((resolve) => { resolve(rnd); }); + } + return new Promise((resolve, reject) => { + const workerList = []; + const _onmessage = (msg, newWorker) => { + if (msg.isPrime) { + // if a prime number has been found, stop all the workers, and return it + for (let j = 0; j < workerList.length; j++) { + workerList[j].terminate(); + } + while (workerList.length > 0) { + workerList.pop(); + } + resolve(msg.value); + } + else { // if a composite is found, make the worker test another random number + const buf = randBitsSync(bitLength, true); + const rnd = fromBuffer(buf); + try { + const msgToWorker = { + rnd: rnd, + iterations: iterations, + id: msg.id + }; + newWorker.postMessage(msgToWorker); + } + catch (error) { + // The worker has already terminated. There is nothing to handle here + } + } + }; + { // browser + const workerURL = _isProbablyPrimeWorkerUrl(); + for (let i = 0; i < self.navigator.hardwareConcurrency - 1; i++) { + const newWorker = new Worker(workerURL); + newWorker.onmessage = (event) => _onmessage(event.data, newWorker); + workerList.push(newWorker); + } + } + for (let i = 0; i < workerList.length; i++) { + randBits(bitLength, true).then(function (buf) { + const rnd = fromBuffer(buf); + workerList[i].postMessage({ + rnd: rnd, + iterations: iterations, + id: i + }); + }).catch(reject); + } + }); +} +/** + * A probably-prime (Miller-Rabin), cryptographically-secure, random-number generator. + * The sync version is NOT RECOMMENDED since it won't use workers and thus it'll be slower and may freeze thw window in browser's javascript. Please consider using prime() instead. + * + * @param bitLength - The required bit length for the generated prime + * @param iterations - The number of iterations for the Miller-Rabin Probabilistic Primality Test + * + * @throws {RangeError} + * bitLength MUST be > 0 + * + * @returns A bigint probable prime of bitLength bits. + */ +function primeSync(bitLength, iterations = 16) { + if (bitLength < 1) + throw new RangeError('bitLength MUST be > 0'); + let rnd = 0n; + do { + rnd = fromBuffer(randBitsSync(bitLength, true)); + } while (!_isProbablyPrime(rnd, iterations)); + return rnd; +} + +export { abs, bitLength, eGcd, gcd, isProbablyPrime, lcm, max, min, modInv, modPow, prime, primeSync, randBetween, randBits, randBitsSync, randBytes, randBytesSync, toZn }; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguYnJvd3Nlci5qcyIsInNvdXJjZXMiOlsiLi4vLi4vbm9kZV9tb2R1bGVzL2JpZ2ludC1tb2QtYXJpdGgvZGlzdC9lc20vaW5kZXguYnJvd3Nlci5qcyIsIi4uLy4uL3NyYy90cy9mcm9tQnVmZmVyLnRzIiwiLi4vLi4vc3JjL3RzL3JhbmRCeXRlcy50cyIsIi4uLy4uL3NyYy90cy9yYW5kQml0cy50cyIsIi4uLy4uL3NyYy90cy9yYW5kQmV0d2Vlbi50cyIsIi4uLy4uL3NyYy90cy93b3JrZXJVdGlscy50cyIsIi4uLy4uL3NyYy90cy9pc1Byb2JhYmx5UHJpbWUudHMiLCIuLi8uLi9zcmMvdHMvcHJpbWUudHMiXSwic291cmNlc0NvbnRlbnQiOm51bGwsIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUyxHQUFHLENBQUMsQ0FBQyxFQUFFO0FBQ2hCLElBQUksT0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SUFDNUMsT0FBTyxHQUFHLENBQUE7QUFDWjs7OzsifQ== diff --git a/dist/esm/index.node.js b/dist/esm/index.node.js index 79c6407..34b70f0 100644 --- a/dist/esm/index.node.js +++ b/dist/esm/index.node.js @@ -5,7 +5,7 @@ function fromBuffer(buf) { let ret = 0n; for (const i of buf.values()) { const bi = BigInt(i); - ret = (ret << BigInt(8)) + bi; + ret = (ret << 8n) + bi; } return ret; } @@ -206,7 +206,7 @@ function isProbablyPrime(w, iterations = 16, disableWorkers = false) { } } } -function _isProbablyPrime(w, iterations = 16) { +function _isProbablyPrime(w, iterations) { /* PREFILTERING. Even values but 2 are not primes, so don't test. 1 is not a prime and the M-R algorithm needs w>1. @@ -639,4 +639,4 @@ function primeSync(bitLength, iterations = 16) { } export { isProbablyPrime, prime, primeSync, randBetween, randBits, randBitsSync, randBytes, randBytesSync }; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgubm9kZS5qcyIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RzL2Zyb21CdWZmZXIudHMiLCIuLi8uLi8uLi9zcmMvdHMvcmFuZEJ5dGVzLnRzIiwiLi4vLi4vLi4vc3JjL3RzL3JhbmRCaXRzLnRzIiwiLi4vLi4vLi4vc3JjL3RzL3JhbmRCZXR3ZWVuLnRzIiwiLi4vLi4vLi4vc3JjL3RzL3dvcmtlclV0aWxzLnRzIiwiLi4vLi4vLi4vc3JjL3RzL2lzUHJvYmFibHlQcmltZS50cyIsIi4uLy4uLy4uL3NyYy90cy9wcmltZS50cyJdLCJzb3VyY2VzQ29udGVudCI6bnVsbCwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O1NBQWdCLFVBQVUsQ0FBRSxHQUFzQjtJQUNoRCxJQUFJLEdBQUcsR0FBRyxFQUFFLENBQUE7SUFDWixLQUFLLE1BQU0sQ0FBQyxJQUFJLEdBQUcsQ0FBQyxNQUFNLEVBQUUsRUFBR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BQUMsRUFBQztJQUM1QyxPQUFPLEdBQUcsQ0FBQTtBQUNaOzs7OyJ9 diff --git a/dist/esm/types/ts/isProbablyPrime.d.ts b/dist/esm/types/ts/isProbablyPrime.d.ts index d757b7e..aa2e70d 100644 --- a/dist/esm/types/ts/isProbablyPrime.d.ts +++ b/dist/esm/types/ts/isProbablyPrime.d.ts @@ -12,6 +12,6 @@ * @returns A promise that resolves to a boolean that is either true (a probably prime number) or false (definitely composite) */ export declare function isProbablyPrime(w: number | bigint, iterations?: number, disableWorkers?: boolean): Promise; -export declare function _isProbablyPrime(w: bigint, iterations?: number): boolean; +export declare function _isProbablyPrime(w: bigint, iterations: number): boolean; export declare function _isProbablyPrimeWorkerUrl(): string; //# sourceMappingURL=isProbablyPrime.d.ts.map \ No newline at end of file diff --git a/dist/esm/types/ts/isProbablyPrime.d.ts.map b/dist/esm/types/ts/isProbablyPrime.d.ts.map index 1c5567c..08abe0c 100644 --- a/dist/esm/types/ts/isProbablyPrime.d.ts.map +++ b/dist/esm/types/ts/isProbablyPrime.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"isProbablyPrime.d.ts","sourceRoot":"","sources":["../../../../src/ts/isProbablyPrime.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,UAAU,GAAE,MAAW,EAAE,cAAc,GAAE,OAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAqD7H;AAED,wBAAgB,gBAAgB,CAAE,CAAC,EAAE,MAAM,EAAE,UAAU,GAAE,MAAW,GAAG,OAAO,CA0T7E;AAED,wBAAgB,yBAAyB,IAAK,MAAM,CAkBnD"} \ No newline at end of file +{"version":3,"file":"isProbablyPrime.d.ts","sourceRoot":"","sources":["../../../../src/ts/isProbablyPrime.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAE,CAAC,EAAE,MAAM,GAAC,MAAM,EAAE,UAAU,GAAE,MAAW,EAAE,cAAc,GAAE,OAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAqD7H;AAED,wBAAgB,gBAAgB,CAAE,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CA0TxE;AAED,wBAAgB,yBAAyB,IAAK,MAAM,CAOnD"} \ No newline at end of file diff --git a/docs/API.md b/docs/API.md index 833652f..4058f84 100644 --- a/docs/API.md +++ b/docs/API.md @@ -135,7 +135,7 @@ w MUST be >= 0 A promise that resolves to a boolean that is either true (a probably prime number) or false (definitely composite) -Defined in: [src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/8580d40/src/ts/isProbablyPrime.ts#L21) +Defined in: [src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/d7f4950/src/ts/isProbablyPrime.ts#L21) ___ @@ -275,7 +275,7 @@ bitLength MUST be > 0 A promise that resolves to a bigint probable prime of bitLength bits. -Defined in: [src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/8580d40/src/ts/prime.ts#L21) +Defined in: [src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/d7f4950/src/ts/prime.ts#L21) ___ @@ -300,7 +300,7 @@ bitLength MUST be > 0 A bigint probable prime of bitLength bits. -Defined in: [src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/8580d40/src/ts/prime.ts#L100) +Defined in: [src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/d7f4950/src/ts/prime.ts#L100) ___ @@ -324,7 +324,7 @@ Arguments MUST be: max > 0 && min >=0 && max > min A cryptographically secure random bigint between [min,max] -Defined in: [src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/8580d40/src/ts/randBetween.ts#L15) +Defined in: [src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/d7f4950/src/ts/randBetween.ts#L15) ___ @@ -348,7 +348,7 @@ bitLength MUST be > 0 A Promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure random bits -Defined in: [src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/8580d40/src/ts/randBits.ts#L14) +Defined in: [src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/d7f4950/src/ts/randBits.ts#L14) ___ @@ -372,7 +372,7 @@ bitLength MUST be > 0 A Uint8Array/Buffer (Browser/Node.js) filled with cryptographically secure random bits -Defined in: [src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/8580d40/src/ts/randBits.ts#L45) +Defined in: [src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/d7f4950/src/ts/randBits.ts#L45) ___ @@ -396,7 +396,7 @@ byteLength MUST be > 0 A promise that resolves to a UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure random bytes -Defined in: [src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/8580d40/src/ts/randBytes.ts#L12) +Defined in: [src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/d7f4950/src/ts/randBytes.ts#L12) ___ @@ -420,7 +420,7 @@ byteLength MUST be > 0 A UInt8Array/Buffer (Browser/Node.js) filled with cryptographically secure random bytes -Defined in: [src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/8580d40/src/ts/randBytes.ts#L46) +Defined in: [src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/d7f4950/src/ts/randBytes.ts#L46) ___ diff --git a/package.json b/package.json index 20b19de..9412b46 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ }, "types": "./dist/esm/types/index.d.ts", "main": "./dist/cjs/index.node.cjs", - "browser": "./dist/bundles/bigint-crypto-utils.esm.js", + "browser": "./dist/esm/index.browser.js", "module": "./dist/esm/index.node.js", "exports": { ".": { @@ -34,12 +34,12 @@ "require": "./dist/cjs/index.node.cjs", "import": "./dist/esm/index.node.js" }, - "default": "./dist/bundles/bigint-crypto-utils.esm.js" + "default": "./dist/esm/index.browser.js" }, "./esm-browser-bundle": "./dist/bundles/bigint-crypto-utils.esm.js", "./iife-browser-bundle": "./dist/bundles/bigint-crypto-utils.iife.js", "./umd-browser-bundle": "./dist/bundles/bigint-crypto-utils.umd.js", - "./types/": "./dist/esm/types/" + "./types": "./dist/esm/types/index.d.ts" }, "directories": { "build": "./build", diff --git a/src/ts/fromBuffer.ts b/src/ts/fromBuffer.ts index 03dd8e5..7e7c1cf 100644 --- a/src/ts/fromBuffer.ts +++ b/src/ts/fromBuffer.ts @@ -2,7 +2,7 @@ export function fromBuffer (buf: Uint8Array|Buffer): bigint { let ret = 0n for (const i of buf.values()) { const bi = BigInt(i) - ret = (ret << BigInt(8)) + bi + ret = (ret << 8n) + bi } return ret } diff --git a/src/ts/isProbablyPrime.ts b/src/ts/isProbablyPrime.ts index 82aa1cd..941579a 100644 --- a/src/ts/isProbablyPrime.ts +++ b/src/ts/isProbablyPrime.ts @@ -73,7 +73,7 @@ export function isProbablyPrime (w: number|bigint, iterations: number = 16, disa } } -export function _isProbablyPrime (w: bigint, iterations: number = 16): boolean { +export function _isProbablyPrime (w: bigint, iterations: number): boolean { /* PREFILTERING. Even values but 2 are not primes, so don't test. 1 is not a prime and the M-R algorithm needs w>1. @@ -393,18 +393,7 @@ export function _isProbablyPrimeWorkerUrl (): string { // Let's us first add all the required functions let workerCode = `'use strict';const ${eGcd.name}=${eGcd.toString()};const ${modInv.name}=${modInv.toString()};const ${modPow.name}=${modPow.toString()};const ${toZn.name}=${toZn.toString()};const ${randBitsSync.name}=${randBitsSync.toString()};const ${randBytesSync.name}=${randBytesSync.toString()};const ${randBetween.name}=${randBetween.toString()};const ${isProbablyPrime.name}=${_isProbablyPrime.toString()};${bitLength.toString()};${fromBuffer.toString()};` - workerCode += ` - onmessage = async function (event) { // Let's start once we are called - // event.data = {rnd: , iterations: } - const isPrime = await ${isProbablyPrime.name}(event.data.rnd, event.data.iterations); - const msg = { - isPrime: isPrime, - value: event.data.rnd, - id: event.data.id - }; - postMessage(msg); - } - ` + workerCode += `onmessage=async function(e){const m={isPrime:await ${isProbablyPrime.name}(e.data.rnd,e.data.iterations),value:e.data.rnd,id:e.data.id};postMessage(m);}` return _workerUrl(workerCode) }