From 1e6a8e1874ab63804d5a2fcf8ccfbb3f06e72c61 Mon Sep 17 00:00:00 2001 From: Marco Stronati Date: Wed, 13 Feb 2019 19:50:23 +0100 Subject: [PATCH] Crypto: add check on signature path lengths --- src/lib_crypto/signature.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib_crypto/signature.ml b/src/lib_crypto/signature.ml index 70a89d080..bc7f17967 100644 --- a/src/lib_crypto/signature.ml +++ b/src/lib_crypto/signature.ml @@ -162,8 +162,10 @@ module Public_key_hash = struct let path_length = let l1 = Ed25519.Public_key_hash.path_length - and l2 = Secp256k1.Public_key_hash.path_length in + and l2 = Secp256k1.Public_key_hash.path_length + and l3 = P256.Public_key_hash.path_length in assert Compare.Int.(l1 = l2) ; + assert Compare.Int.(l1 = l3) ; 1 + l1 let prefix_path _ = assert false (* unused *)