pairing-0.1.4: Optimal ate pairing over Barreto-Naehrig curves

Safe HaskellNone
LanguageHaskell2010

Pairing.Fr

Description

Prime field from which exponents should be chosen

Synopsis

Documentation

newtype Fr Source #

Prime field with characteristic _r

Constructors

Fr Integer

Use new instead of this constructor

Instances
Eq Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

(==) :: Fr -> Fr -> Bool #

(/=) :: Fr -> Fr -> Bool #

Fractional Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

(/) :: Fr -> Fr -> Fr #

recip :: Fr -> Fr #

fromRational :: Rational -> Fr #

Num Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

(+) :: Fr -> Fr -> Fr #

(-) :: Fr -> Fr -> Fr #

(*) :: Fr -> Fr -> Fr #

negate :: Fr -> Fr #

abs :: Fr -> Fr #

signum :: Fr -> Fr #

fromInteger :: Integer -> Fr #

Ord Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

compare :: Fr -> Fr -> Ordering #

(<) :: Fr -> Fr -> Bool #

(<=) :: Fr -> Fr -> Bool #

(>) :: Fr -> Fr -> Bool #

(>=) :: Fr -> Fr -> Bool #

max :: Fr -> Fr -> Fr #

min :: Fr -> Fr -> Fr #

Show Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

showsPrec :: Int -> Fr -> ShowS #

show :: Fr -> String #

showList :: [Fr] -> ShowS #

Bits Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

(.&.) :: Fr -> Fr -> Fr #

(.|.) :: Fr -> Fr -> Fr #

xor :: Fr -> Fr -> Fr #

complement :: Fr -> Fr #

shift :: Fr -> Int -> Fr #

rotate :: Fr -> Int -> Fr #

zeroBits :: Fr #

bit :: Int -> Fr #

setBit :: Fr -> Int -> Fr #

clearBit :: Fr -> Int -> Fr #

complementBit :: Fr -> Int -> Fr #

testBit :: Fr -> Int -> Bool #

bitSizeMaybe :: Fr -> Maybe Int #

bitSize :: Fr -> Int #

isSigned :: Fr -> Bool #

shiftL :: Fr -> Int -> Fr #

unsafeShiftL :: Fr -> Int -> Fr #

shiftR :: Fr -> Int -> Fr #

unsafeShiftR :: Fr -> Int -> Fr #

rotateL :: Fr -> Int -> Fr #

rotateR :: Fr -> Int -> Fr #

popCount :: Fr -> Int #

NFData Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

rnf :: Fr -> () #

Pretty Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

pretty :: Fr -> Doc #

prettyList :: [Fr] -> Doc #

AsInteger Fr Source # 
Instance details

Defined in Pairing.Fr

Methods

asInteger :: Fr -> Integer Source #

new :: Integer -> Fr Source #

Turn an integer into an Fr number, should be used instead of the Fr constructor.

primitiveRootOfUnity Source #

Arguments

:: Int

exponent of 2 for which we want to get the primitive root of unity

-> Fr 

Compute primitive roots of unity for 2^0, 2^1, ..., 2^28. (2^28 is the largest power of two that divides _r - 1, therefore there are no primitive roots of unity for higher powers of 2 in Fr.)