public class BLS12_381Eth2KatTest
extends junit.framework.TestCase
The Eth2 BLS suite is the ProofOfPossession variant
BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_, with public keys
in G1 and signatures in G2, both encoded in Zcash compressed format.
| Constructor and Description |
|---|
BLS12_381Eth2KatTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testAggregateByteCompatibilityWithEth2()
Eth2 aggregate vector: aggregating three published Eth2 signatures
must produce a specific compressed G2 byte string.
|
void |
testEth2VectorRoundTripVerify() |
void |
testFastAggregateVerifyTamperedRejected()
Eth2 fast_aggregate_verify tampered case: same pubkeys / message but
with the trailing bytes of the signature flipped — verify must reject.
|
void |
testFastAggregateVerifyValid()
Eth2 fast_aggregate_verify valid case: three pubkeys and one
aggregated signature over the same message must verify.
|
void |
testSignByteCompatibilityWithEth2()
Run all valid Eth2 sign vectors.
|
void |
testZeroPrivkeyRejected()
Eth2 zero-privkey sign vector: the spec mandates that signing with
sk = 0 must fail.
|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toStringpublic void testSignByteCompatibilityWithEth2()
compress(BLS12_381ProofOfPossession.sign(sk, msg)) == expected_sig
byte-for-byte. A pass is direct interoperability evidence with
Lighthouse / Prysm / Teku / Nimbus / Lodestar and any other Eth2
BLS implementation that uses these vectors.public void testZeroPrivkeyRejected()
BLS12_381BasicScheme.skToPk(java.math.BigInteger) and the underlying scheme
helpers, so we expect an exception.public void testAggregateByteCompatibilityWithEth2()
public void testFastAggregateVerifyValid()
public void testFastAggregateVerifyTamperedRejected()
public void testEth2VectorRoundTripVerify()