module Curve.Weierstrass.SECP128R2
( module Curve.Weierstrass
, module Curve.Weierstrass.SECP128R2
, Point(..)
) where
import Protolude
import PrimeField
import Curve.Weierstrass
data SECP128R2
type Fq = PrimeField 0xfffffffdffffffffffffffffffffffff
type Fr = PrimeField 0x3fffffff7fffffffbe0024720613b5a3
instance Curve 'Weierstrass c SECP128R2 Fq Fr => WCurve c SECP128R2 Fq Fr where
a_ = const _a
{-# INLINABLE a_ #-}
b_ = const _b
{-# INLINABLE b_ #-}
h_ = const _h
{-# INLINABLE h_ #-}
q_ = const _q
{-# INLINABLE q_ #-}
r_ = const _r
{-# INLINABLE r_ #-}
x_ = const _x
{-# INLINABLE x_ #-}
y_ = const _y
{-# INLINABLE y_ #-}
type PA = WAPoint SECP128R2 Fq Fr
instance WACurve SECP128R2 Fq Fr where
gA_ = gA
{-# INLINABLE gA_ #-}
type PJ = WJPoint SECP128R2 Fq Fr
instance WJCurve SECP128R2 Fq Fr where
gJ_ = gJ
{-# INLINABLE gJ_ #-}
type PP = WPPoint SECP128R2 Fq Fr
instance WPCurve SECP128R2 Fq Fr where
gP_ = gP
{-# INLINABLE gP_ #-}
_a :: Fq
_a = 0xd6031998d1b3bbfebf59cc9bbff9aee1
{-# INLINABLE _a #-}
_b :: Fq
_b = 0x5eeefca380d02919dc2c6558bb6d8a5d
{-# INLINABLE _b #-}
_h :: Integer
_h = 0x4
{-# INLINABLE _h #-}
_q :: Integer
_q = 0xfffffffdffffffffffffffffffffffff
{-# INLINABLE _q #-}
_r :: Integer
_r = 0x3fffffff7fffffffbe0024720613b5a3
{-# INLINABLE _r #-}
_x :: Fq
_x = 0x7b6aa5d85e572983e6fb32a7cdebc140
{-# INLINABLE _x #-}
_y :: Fq
_y = 0x27b6916a894d3aee7106fe805fc34b44
{-# INLINABLE _y #-}
gA :: PA
gA = A _x _y
{-# INLINABLE gA #-}
gJ :: PJ
gJ = J _x _y 1
{-# INLINABLE gJ #-}
gP :: PP
gP = P _x _y 1
{-# INLINABLE gP #-}