Decrease iterations of ECC tests

This commit is contained in:
Olivier Chéron 2017-11-10 13:13:19 +01:00
parent b8b59be5a5
commit e8f1bc08c8

View File

@ -147,7 +147,7 @@ arbitraryPoint aCurve =
eccTests = testGroup "ECC"
[ testGroup "valid-point" $ map doPointValidTest (zip [katZero..] vectorsPoint)
, testGroup "property"
, localOption (QuickCheckTests 20) $ testGroup "property"
[ testProperty "point-add" $ \aCurve (QAInteger r1) (QAInteger r2) ->
let curveN = ECC.ecc_n . 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
p <- arbitraryPoint aCurve
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
let pRes = ECC.pointMul aCurve (n1 * n2) p
let pDef = ECC.pointMul aCurve n1 (ECC.pointMul aCurve n2 p)
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
p2 <- arbitraryPoint aCurve
let pRes = ECC.pointAddTwoMuls aCurve n1 p1 n2 p2