diff --git a/specs/test_formats/bls/msg_hash_g2_compressed.md b/specs/test_formats/bls/msg_hash_g2_compressed.md index 44ea8ded7..bbc1b82fe 100644 --- a/specs/test_formats/bls/msg_hash_g2_compressed.md +++ b/specs/test_formats/bls/msg_hash_g2_compressed.md @@ -6,8 +6,8 @@ A BLS compressed-hash to G2. ```yaml input: - message: bytes32, - domain: uint64 -- the BLS domain + message: bytes32 + domain: bytes8 -- the BLS domain output: List[bytes48] -- length of two ``` diff --git a/specs/test_formats/bls/msg_hash_g2_uncompressed.md b/specs/test_formats/bls/msg_hash_g2_uncompressed.md index 847b5f61d..8337baaab 100644 --- a/specs/test_formats/bls/msg_hash_g2_uncompressed.md +++ b/specs/test_formats/bls/msg_hash_g2_uncompressed.md @@ -7,7 +7,7 @@ A BLS uncompressed-hash to G2. ```yaml input: message: bytes32 - domain: uint64 -- the BLS domain + domain: bytes8 -- the BLS domain output: List[List[bytes48]] -- 3 lists, each a length of two ``` diff --git a/specs/test_formats/bls/sign_msg.md b/specs/test_formats/bls/sign_msg.md index b17e6246d..8c6b8cdd0 100644 --- a/specs/test_formats/bls/sign_msg.md +++ b/specs/test_formats/bls/sign_msg.md @@ -8,7 +8,7 @@ Message signing with BLS should produce a signature. input: privkey: bytes32 -- the private key used for signing message: bytes32 -- input message to sign (a hash) - domain: uint64 -- the BLS domain + domain: bytes8 -- the BLS domain output: bytes96 -- expected signature ``` diff --git a/test_generators/bls/main.py b/test_generators/bls/main.py index a792dda9a..284cf68b0 100644 --- a/test_generators/bls/main.py +++ b/test_generators/bls/main.py @@ -89,7 +89,7 @@ def case01_message_hash_G2_uncompressed(): yield { 'input': { 'message': '0x' + msg.hex(), - 'domain': domain + 'domain': int_to_hex(domain, byte_length=8) }, 'output': hash_message(msg, domain) } @@ -101,7 +101,7 @@ def case02_message_hash_G2_compressed(): yield { 'input': { 'message': '0x' + msg.hex(), - 'domain': domain + 'domain': int_to_hex(domain, byte_length=8) }, 'output': hash_message_compressed(msg, domain) } @@ -126,7 +126,7 @@ def case04_sign_messages(): 'input': { 'privkey': int_to_hex(privkey), 'message': '0x' + message.hex(), - 'domain': domain + 'domain': int_to_hex(domain, byte_length=8) }, 'output': '0x' + sig.hex() }