{-# OPTIONS_GHC -O2 -feager-blackholing #-}
{-# LANGUAGE Safe, DeriveDataTypeable, NoImplicitPrelude #-}
module Crypto.ECC.Weierstrass.StandardCurves
where
import safe Prelude(Int)
import safe Crypto.ECC.Weierstrass.Internal (FPrime)
import safe qualified Crypto.Fi as FP (fromInteger)
import safe Data.Typeable(Typeable)
data StandardCurve =
StandardCurve {stdc_l::Int,stdc_p::FPrime,stdc_r::FPrime,stdc_b::FPrime,stdc_xp::FPrime,stdc_yp::FPrime}
deriving (Typeable)
p192:: StandardCurve
p192 = StandardCurve {
stdc_l = 192,
stdc_p = FP.fromInteger 192 6277101735386680763835789423207666416083908700390324961279,
stdc_r = FP.fromInteger 192 6277101735386680763835789423176059013767194773182842284081,
stdc_b = FP.fromInteger 192 2455155546008943817740293915197451784769108058161191238065,
stdc_xp = FP.fromInteger 192 602046282375688656758213480587526111916698976636884684818,
stdc_yp = FP.fromInteger 192 174050332293622031404857552280219410364023488927386650641
}
p224:: StandardCurve
p224 = StandardCurve {
stdc_l = 224,
stdc_p = FP.fromInteger 224 26959946667150639794667015087019630673557916260026308143510066298881,
stdc_r = FP.fromInteger 224 26959946667150639794667015087019625940457807714424391721682722368061,
stdc_b = FP.fromInteger 224 18958286285566608000408668544493926415504680968679321075787234672564,
stdc_xp = FP.fromInteger 224 19277929113566293071110308034699488026831934219452440156649784352033,
stdc_yp = FP.fromInteger 224 19926808758034470970197974370888749184205991990603949537637343198772
}
p256:: StandardCurve
p256 = StandardCurve {
stdc_l = 256,
stdc_p = FP.fromInteger 256 115792089210356248762697446949407573530086143415290314195533631308867097853951,
stdc_r = FP.fromInteger 256 115792089210356248762697446949407573529996955224135760342422259061068512044369,
stdc_b = FP.fromInteger 256 41058363725152142129326129780047268409114441015993725554835256314039467401291,
stdc_xp = FP.fromInteger 256 48439561293906451759052585252797914202762949526041747995844080717082404635286,
stdc_yp = FP.fromInteger 256 36134250956749795798585127919587881956611106672985015071877198253568414405109
}
p384:: StandardCurve
p384 = StandardCurve {
stdc_l = 384,
stdc_p = FP.fromInteger 384 39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319,
stdc_r = FP.fromInteger 384 39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643,
stdc_b = FP.fromInteger 384 27580193559959705877849011840389048093056905856361568521428707301988689241309860865136260764883745107765439761230575,
stdc_xp = FP.fromInteger 384 26247035095799689268623156744566981891852923491109213387815615900925518854738050089022388053975719786650872476732087,
stdc_yp = FP.fromInteger 384 8325710961489029985546751289520108179287853048861315594709205902480503199884419224438643760392947333078086511627871
}
p521:: StandardCurve
p521 = StandardCurve {
stdc_l = 521,
stdc_p = FP.fromInteger 521 6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151,
stdc_r = FP.fromInteger 521 6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449,
stdc_b = FP.fromInteger 521 1093849038073734274511112390766805569936207598951683748994586394495953116150735016013708737573759623248592132296706313309438452531591012912142327488478985984,
stdc_xp = FP.fromInteger 521 2661740802050217063228768716723360960729859168756973147706671368418802944996427808491545080627771902352094241225065558662157113545570916814161637315895999846,
stdc_yp = FP.fromInteger 521 3757180025770020463545507224491183603594455134769762486694567779615544477440556316691234405012945539562144444537289428522585666729196580810124344277578376784
}