Decrease iterations of ECC tests
This commit is contained in:
parent
b8b59be5a5
commit
e8f1bc08c8
@ -147,7 +147,7 @@ arbitraryPoint aCurve =
|
|||||||
|
|
||||||
eccTests = testGroup "ECC"
|
eccTests = testGroup "ECC"
|
||||||
[ testGroup "valid-point" $ map doPointValidTest (zip [katZero..] vectorsPoint)
|
[ testGroup "valid-point" $ map doPointValidTest (zip [katZero..] vectorsPoint)
|
||||||
, testGroup "property"
|
, localOption (QuickCheckTests 20) $ testGroup "property"
|
||||||
[ testProperty "point-add" $ \aCurve (QAInteger r1) (QAInteger r2) ->
|
[ testProperty "point-add" $ \aCurve (QAInteger r1) (QAInteger r2) ->
|
||||||
let curveN = ECC.ecc_n . ECC.common_curve $ aCurve
|
let curveN = ECC.ecc_n . ECC.common_curve $ aCurve
|
||||||
curveGen = ECC.ecc_g . ECC.common_curve $ aCurve
|
curveGen = ECC.ecc_g . ECC.common_curve $ aCurve
|
||||||
@ -162,14 +162,12 @@ eccTests = testGroup "ECC"
|
|||||||
, testProperty "point-negate-negate" $ \aCurve -> do
|
, testProperty "point-negate-negate" $ \aCurve -> do
|
||||||
p <- arbitraryPoint aCurve
|
p <- arbitraryPoint aCurve
|
||||||
return $ p `propertyEq` ECC.pointNegate aCurve (ECC.pointNegate aCurve p)
|
return $ p `propertyEq` ECC.pointNegate aCurve (ECC.pointNegate aCurve p)
|
||||||
, localOption (QuickCheckTests 20) $
|
, testProperty "point-mul-mul" $ \aCurve (QAInteger n1) (QAInteger n2) -> do
|
||||||
testProperty "point-mul-mul" $ \aCurve (QAInteger n1) (QAInteger n2) -> do
|
|
||||||
p <- arbitraryPoint aCurve
|
p <- arbitraryPoint aCurve
|
||||||
let pRes = ECC.pointMul aCurve (n1 * n2) p
|
let pRes = ECC.pointMul aCurve (n1 * n2) p
|
||||||
let pDef = ECC.pointMul aCurve n1 (ECC.pointMul aCurve n2 p)
|
let pDef = ECC.pointMul aCurve n1 (ECC.pointMul aCurve n2 p)
|
||||||
return $ pRes `propertyEq` pDef
|
return $ pRes `propertyEq` pDef
|
||||||
, localOption (QuickCheckTests 20) $
|
, testProperty "double-scalar-mult" $ \aCurve (QAInteger n1) (QAInteger n2) -> do
|
||||||
testProperty "double-scalar-mult" $ \aCurve (QAInteger n1) (QAInteger n2) -> do
|
|
||||||
p1 <- arbitraryPoint aCurve
|
p1 <- arbitraryPoint aCurve
|
||||||
p2 <- arbitraryPoint aCurve
|
p2 <- arbitraryPoint aCurve
|
||||||
let pRes = ECC.pointAddTwoMuls aCurve n1 p1 n2 p2
|
let pRes = ECC.pointAddTwoMuls aCurve n1 p1 n2 p2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user