File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
deku-p/src/core/crypto/tests Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,16 @@ struct
5151 (fun sk ->
5252 List. map (fun hash -> (Signature. sign sk hash, hash)) to_sign)
5353 secret_keys
54+
55+ let verified_normal_signatures =
56+ let check_sig pk signatures =
57+ List. map
58+ (fun (signature , hash ) -> Signature. verify pk signature hash)
59+ signatures
60+ in
61+ List. map2
62+ (fun key signatures -> check_sig key signatures)
63+ public_keys signatures
5464 end
5565
5666 module Test_secret_key_data = struct
@@ -145,5 +155,11 @@ struct
145155 Alcotest. (check' string )
146156 ~msg: " signatures are equal" ~expected: Tezos_data. signatures
147157 ~actual: signatures
158+
159+ let verified_normal_signatures () =
160+ Alcotest. (check' (list (list bool )))
161+ ~msg: " verified normal signatures are equal"
162+ ~expected: Tezos_data. verified_normal_signatures
163+ ~actual: Signature_data. verified_normal_signatures
148164 end
149165end
Original file line number Diff line number Diff line change @@ -102,5 +102,7 @@ let run () =
102102 [
103103 test_case " to sign" `Quick Test_signature_data. to_sign;
104104 test_case " signatures" `Quick Test_signature_data. signatures;
105+ test_case " verified normal signatures" `Quick
106+ Test_signature_data. verified_normal_signatures;
105107 ] );
106108 ]
You can’t perform that action at this time.
0 commit comments