module Curve.Weierstrass.BN462T
( module Curve.Weierstrass
, module Curve.Weierstrass.BN462T
, Point(..)
) where
import Protolude
import ExtensionField
import PrimeField
import Curve.Weierstrass
import Curve.Weierstrass.BN462 (Fq)
data BN462T
data PolynomialU
instance IrreducibleMonic Fq PolynomialU where
split _ = X2 + 1
type Fq2 = ExtensionField Fq PolynomialU
type Fr = PrimeField 0x240480360120023ffffffffff6ff0cf6b7d9bfca0000000000d812908ee1c201f7fffffffff6ff66fc7bf717f7c0000000002401b007e010800d
instance Curve 'Weierstrass c BN462T Fq2 Fr => WCurve c BN462T Fq2 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 BN462T Fq2 Fr
instance WACurve BN462T Fq2 Fr where
gA_ = gA
{-# INLINABLE gA_ #-}
type PJ = WJPoint BN462T Fq2 Fr
instance WJCurve BN462T Fq2 Fr where
gJ_ = gJ
{-# INLINABLE gJ_ #-}
type PP = WPPoint BN462T Fq2 Fr
instance WPCurve BN462T Fq2 Fr where
gP_ = gP
{-# INLINABLE gP_ #-}
_a :: Fq2
_a = toField [
]
{-# INLINABLE _a #-}
_b :: Fq2
_b = toField [ 0x2
, 0x240480360120023ffffffffff6ff0cf6b7d9bfca0000000000d812908f41c8020ffffffffff6ff66fc6ff687f640000000002401b00840138012
]
{-# INLINABLE _b #-}
_h :: Integer
_h = 0x240480360120023ffffffffff6ff0cf6b7d9bfca0000000000d812908fa1ce0227fffffffff6ff66fc63f5f7f4c0000000002401b008a0168019
{-# INLINABLE _h #-}
_q :: Integer
_q = 0x240480360120023ffffffffff6ff0cf6b7d9bfca0000000000d812908f41c8020ffffffffff6ff66fc6ff687f640000000002401b00840138013
{-# INLINABLE _q #-}
_r :: Integer
_r = 0x240480360120023ffffffffff6ff0cf6b7d9bfca0000000000d812908ee1c201f7fffffffff6ff66fc7bf717f7c0000000002401b007e010800d
{-# INLINABLE _r #-}
_x :: Fq2
_x = toField [ 0x257ccc85b58dda0dfb38e3a8cbdc5482e0337e7c1cd96ed61c913820408208f9ad2699bad92e0032ae1f0aa6a8b48807695468e3d934ae1e4df
, 0x1d2e4343e8599102af8edca849566ba3c98e2a354730cbed9176884058b18134dd86bae555b783718f50af8b59bf7e850e9b73108ba6aa8cd283
]
{-# INLINABLE _x #-}
_y :: Fq2
_y = toField [ 0xa0650439da22c1979517427a20809eca035634706e23c3fa7a6bb42fe810f1399a1f41c9ddae32e03695a140e7b11d7c3376e5b68df0db7154e
, 0x73ef0cbd438cbe0172c8ae37306324d44d5e6b0c69ac57b393f1ab370fd725cc647692444a04ef87387aa68d53743493b9eba14cc552ca2a93a
]
{-# 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 #-}