From e8f1bc08c8098d253882be56e9e191a1318995fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Ch=C3=A9ron?= Date: Fri, 10 Nov 2017 13:13:19 +0100 Subject: [PATCH] Decrease iterations of ECC tests --- tests/KAT_PubKey/ECC.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/KAT_PubKey/ECC.hs b/tests/KAT_PubKey/ECC.hs index 59e43c2..7a97428 100644 --- a/tests/KAT_PubKey/ECC.hs +++ b/tests/KAT_PubKey/ECC.hs @@ -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