This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Pseudo-code implementation of | |
https://crypto.stackexchange.com/questions/24014/what-are-the-computational-benefits-of-primes-close-to-the-power-of-2 | |
The prime must be of the form m = 2^e - k, where k is less than the bigint base (and should be as small as possible) | |
*/ | |
/** | |
* Calculates n % m | |
* @param {Array<Integer>} n - Number to calculate modulo (remainder) of, must be less than m^2 |