Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInIntervalLEps ¶
IsInIntervalLEps returns true if n ∈ [-2ˡ⁺ᵉ,…,2ˡ⁺ᵉ].
func IsInIntervalLPrimeEps ¶
IsInIntervalLPrimeEps returns true if n ∈ [-2ˡ'⁺ᵉ,…,2ˡ'⁺ᵉ].
func IsValidBigModN ¶
IsValidBigModN checks that ints are all in the range [1,…,N-1] and co-prime to N.
Types ¶
type Modulus ¶
type Modulus struct {
	// represents modulus n
	*safenum.Modulus
	// contains filtered or unexported fields
}
    Modulus wraps a safenum.Modulus and enables faster modular exponentiation when the factorization is known. When n = p⋅q, xᵉ (mod n) can be computed with only two exponentiations with p and q respectively.
func ModulusFromFactors ¶
ModulusFromFactors creates the necessary cached values to accelerate exponentiation mod n.
func ModulusFromN ¶
ModulusFromN creates a simple wrapper around a given modulus n. The modulus is not copied.
 Click to show internal directories. 
   Click to hide internal directories.