public class BLS12_381G2HashToCurveTest
extends junit.framework.TestCase
| Constructor and Description |
|---|
BLS12_381G2HashToCurveTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testClearCofactorMatchesHEff()
The endomorphism-based cofactor clearing used by hash-to-curve must equal
the plain multiplication by h_eff it replaces, for points outside and
inside the subgroup and for infinity.
|
void |
testFp2Sgn0SpecVectors() |
void |
testFp2Sqrt() |
void |
testFp2SqrtNullForAnotherNonSquare() |
void |
testFp2SqrtNullForNonSquare() |
void |
testFp2SqrtOfZeroIsZero() |
void |
testGenerator() |
void |
testJ101Vectors() |
void |
testSqrtOrSqrtZ()
The Fp-based square root used by map-to-curve: for squares it returns a
root of w, otherwise a root of Z*w, and its verdict agrees with the
independent
Fp2Element.isSquare(). |
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 testJ101Vectors()
public void testClearCofactorMatchesHEff()
public void testGenerator()
public void testFp2Sqrt()
public void testFp2SqrtNullForNonSquare()
public void testFp2SqrtNullForAnotherNonSquare()
public void testFp2SqrtOfZeroIsZero()
public void testFp2Sgn0SpecVectors()
public void testSqrtOrSqrtZ()
Fp2Element.isSquare(). Covers the purely real inputs
(square and non-square in Fp, so the root may be purely imaginary), zero,
purely imaginary inputs and random ones.