commit dc0d51fa2a751bc71bc43433c7421cbae9af58fd
parent f126b8f2067d19a4e9432ae6a93680a56716e4bd
Author: Jared Tobin <jared@jtobin.io>
Date: Mon, 14 Oct 2024 21:25:52 +0400
test: most bip0340 vectors passing
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/test/BIP340.hs b/test/BIP340.hs
@@ -41,8 +41,7 @@ execute :: Case -> TestTree
execute Case {..} = testCase ("bip0340 " <> show c_index) $
case parse_point c_pk of
Nothing -> assertFailure "no parse"
- Just p -> do
- let pk = affine p
+ Just (affine -> pk) -> do
if c_sk == mempty
then do -- no signature; test verification
let ver = verify_schnorr c_msg pk c_sig
@@ -68,13 +67,13 @@ test_case :: AT.Parser Case
test_case = do
c_index <- AT.decimal AT.<?> "index"
_ <- AT.char ','
- c_sk <- fmap B16.decodeLenient (AT.takeWhile1 (/= ',') AT.<?> "sk")
+ c_sk <- fmap B16.decodeLenient (AT.takeWhile (/= ',') AT.<?> "sk")
_ <- AT.char ','
c_pk <- AT.takeWhile1 (/= ',') AT.<?> "pk"
_ <- AT.char ','
- c_aux <- fmap B16.decodeLenient (AT.takeWhile1 (/= ',') AT.<?> "aux")
+ c_aux <- fmap B16.decodeLenient (AT.takeWhile (/= ',') AT.<?> "aux")
_ <- AT.char ','
- c_msg <- fmap B16.decodeLenient (AT.takeWhile1 (/= ',') AT.<?> "msg")
+ c_msg <- fmap B16.decodeLenient (AT.takeWhile (/= ',') AT.<?> "msg")
_ <- AT.char ','
c_sig <- fmap B16.decodeLenient (AT.takeWhile1 (/= ',') AT.<?> "sig")
_ <- AT.char ','