Update BLS test format: output null for invalid case

This commit is contained in:
Hsiao-Wei Wang 2022-09-21 01:20:20 +08:00
parent 00a8a13491
commit 93b7ae299d
No known key found for this signature in database
GPG Key ID: AE3D6B174F971DE4
3 changed files with 11 additions and 6 deletions

View File

@ -8,11 +8,11 @@ The test data is declared in a `data.yaml` file:
```yaml
input: List[BLS Signature] -- list of input BLS signatures
output: BLS Signature -- expected output, single BLS signature or empty.
output: BLS Signature -- expected output, single BLS signature or `null`.
```
- `BLS Signature` here is encoded as a string: hexadecimal encoding of 96 bytes (192 nibbles), prefixed with `0x`.
- No output value if the input is invalid.
- output value is `null` if the input is invalid.
All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.

View File

@ -8,11 +8,11 @@ The test data is declared in a `data.yaml` file:
```yaml
input: List[BLS Pubkey] -- list of input BLS pubkeys
output: BLSPubkey -- expected output, single BLS pubkeys or empty.
output: BLSPubkey -- expected output, single BLS pubkeys or `null`.
```
- `BLS Pubkey` here is encoded as a string: hexadecimal encoding of 48 bytes (96 nibbles), prefixed with `0x`.
- No output value if the input is invalid.
- output value is `null` if the input is invalid.
## Condition

View File

@ -10,7 +10,12 @@ The test data is declared in a `data.yaml` file:
input:
privkey: bytes32 -- the private key used for signing
message: bytes32 -- input message to sign (a hash)
output: BLS Signature -- expected output, single BLS signature or empty.
output: BLS Signature -- expected output, single BLS signature or `null`.
```
All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.
- All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.
- output value is `null` if the input is invalid.
## Condition
The `sign` handler should sign `message` with `privkey`, and the resulting signature should match the expected `output`.