Crypto: add check on signature path lengths

This commit is contained in:
Marco Stronati 2019-02-13 19:50:23 +01:00 committed by Grégoire Henry
parent fd4f435e2e
commit 1e6a8e1874
No known key found for this signature in database
GPG Key ID: 827A020B224844F1

View File

@ -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 *)