diff --git a/README.md b/README.md index 093c286..6ed17bd 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Arbitrary precision modular arithmetic, cryptographically secure random numbers It relies on the native JS implementation of ([BigInt](https://tc39.es/ecma262/#sec-bigint-objects)). It can be used by any [Web Browser or webview supporting BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) and with Node.js (>=10.4.0). The bundles can be imported directly by the browser or in Angular projects, React apps, Node.js, etc. -Secure random numbers are generated using the native crypto implementation of the browsers ([Web Cryptography API](https://w3c.github.io/webcrypto/)) or [Node.js Crypto](https://nodejs.org/dist/latest/docs/api/crypto.html)). Strong probable prime generation and testing use Miller-Rabin primality tests and are automatically sped up using parallel workers both in browsers and Node.js. +Secure random numbers are generated using the native crypto implementation of the browsers ([Web Cryptography API](https://w3c.github.io/webcrypto/)) or [Node.js Crypto](https://nodejs.org/dist/latest/docs/api/crypto.html). Strong probable prime generation and testing use Miller-Rabin primality tests and are automatically sped up using parallel workers both in browsers and Node.js. > The operations supported on BigInts are not constant time. BigInt can be therefore **[unsuitable for use in cryptography](https://www.chosenplaintext.ca/articles/beginners-guide-constant-time-cryptography.html).** Many platforms provide native support for cryptography, such as [Web Cryptography API](https://w3c.github.io/webcrypto/) or [Node.js Crypto](https://nodejs.org/dist/latest/docs/api/crypto.html). diff --git a/docs/API.md b/docs/API.md index f6349c2..6991890 100644 --- a/docs/API.md +++ b/docs/API.md @@ -133,7 +133,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/d38c20a/src/ts/isProbablyPrime.ts#L21) +Defined in: [src/ts/isProbablyPrime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/5bba6de/src/ts/isProbablyPrime.ts#L21) ___ @@ -273,7 +273,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/d38c20a/src/ts/prime.ts#L21) +Defined in: [src/ts/prime.ts:21](https://github.com/juanelas/bigint-crypto-utils/blob/5bba6de/src/ts/prime.ts#L21) ___ @@ -298,7 +298,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/d38c20a/src/ts/prime.ts#L100) +Defined in: [src/ts/prime.ts:100](https://github.com/juanelas/bigint-crypto-utils/blob/5bba6de/src/ts/prime.ts#L100) ___ @@ -322,7 +322,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/d38c20a/src/ts/randBetween.ts#L15) +Defined in: [src/ts/randBetween.ts:15](https://github.com/juanelas/bigint-crypto-utils/blob/5bba6de/src/ts/randBetween.ts#L15) ___ @@ -346,7 +346,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/d38c20a/src/ts/randBits.ts#L14) +Defined in: [src/ts/randBits.ts:14](https://github.com/juanelas/bigint-crypto-utils/blob/5bba6de/src/ts/randBits.ts#L14) ___ @@ -370,7 +370,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/d38c20a/src/ts/randBits.ts#L45) +Defined in: [src/ts/randBits.ts:45](https://github.com/juanelas/bigint-crypto-utils/blob/5bba6de/src/ts/randBits.ts#L45) ___ @@ -394,7 +394,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/d38c20a/src/ts/randBytes.ts#L12) +Defined in: [src/ts/randBytes.ts:12](https://github.com/juanelas/bigint-crypto-utils/blob/5bba6de/src/ts/randBytes.ts#L12) ___ @@ -418,7 +418,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/d38c20a/src/ts/randBytes.ts#L46) +Defined in: [src/ts/randBytes.ts:46](https://github.com/juanelas/bigint-crypto-utils/blob/5bba6de/src/ts/randBytes.ts#L46) ___