hunit :: Reifies v Version => Proxy v -> TestTree
hunit _v = testGroup "FFC"
- [ testGroup "inv"
+ [ testGroup "inverse"
[ hunitInv weakFFC
, hunitInv beleniosFFC
]
hunitInv ::
forall crypto.
- Group crypto => Key crypto =>
+ ReifyCrypto crypto => Key crypto =>
crypto -> TestTree
hunitInv crypto =
testGroup (Text.unpack $ cryptoName crypto)
[ testCase "groupGen" $
- reify crypto $ \case
- (c::Proxy c) | Dict <- groupDict c ->
- inv (groupGen :: G crypto c) @?=
+ reifyCrypto crypto $ \(_c::Proxy c) ->
+ inverse (groupGen :: G crypto c) @?=
groupGen ^ E (fromJust $ groupOrder (Proxy @c) `minusNaturalMaybe` one)
]