|
AES-DH Implementation
|
The namespace for prime number related operations. More...
Functions | |
| bool | is (const uint64_t &num) |
| Checks if any given number is prime. | |
| template<typename T = uint64_t> | |
| void | next (T &num) |
| Find the next prime greater than the provided number. | |
| uint64_t | raise (uint64_t value, uint64_t exp, const uint64_t &mod) |
| A O(logn) raise operation that works within modulus to prevent overflow. | |
| std::pair< uint64_t, uint64_t > | generate () |
| Generates a prime number. | |
The namespace for prime number related operations.
|
inline |
Generates a prime number.
|
inline |
Checks if any given number is prime.
| num | The number. |
|
inline |
Find the next prime greater than the provided number.
| T | The type of number. Generating a prime uses half-width. |
| num | The number (Does not need to be prime itself) |
|
inline |
A O(logn) raise operation that works within modulus to prevent overflow.
| value | The value to raise. |
| exp | The exponent to raise the value by. |
| mod | The mod space |