public abstract class BarretoNaehrigSourceGroupImpl extends PairingSourceGroupImpl
This class implements a subgroup of \(E:y^2=x^3+b\).
cofactor, field, generator, size| Constructor and Description |
|---|
BarretoNaehrigSourceGroupImpl(java.math.BigInteger size,
java.math.BigInteger cofactor,
ExtensionFieldElement a6) |
BarretoNaehrigSourceGroupImpl(Representation r) |
| Modifier and Type | Method and Description |
|---|---|
FieldElement |
decompressX(FieldElement y,
int sel)
Retrieves the x-coordinate from the compressed point and its corresponding y-coordinate.
|
BarretoNaehrigSourceGroupElementImpl |
getUniformlyRandomElement()
Generates a uniformly random element of this group.
|
protected PairingSourceGroupElement |
getUniformlyRandomElementOblivious() |
boolean |
hasPrimeSize()
Returns true if the size of this structure is known and prime.
|
boolean |
isShortForm() |
PairingSourceGroupElement |
mapToPoint(FieldElement y,
int sel)
Decompresses a point by mapping y coordinate of point (x,y) back to curve.
|
PairingSourceGroupElement |
mapToSubgroup(FieldElement y,
int sel)
Maps a given y coordinate to a point in this subgroup.
|
protected PairingSourceGroupElement |
superGetUniformlyRandomElement() |
java.lang.String |
toString() |
cofactorMultiplication, equals, getA1, getA2, getA3, getA4, getA6, getCofactor, getElement, getFieldOfDefinition, getGenerator, getRepresentation, getSize, getUniqueByteLength, hashCode, isMember, isOnCurve, restoreElement, setGenerator, sizeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisCommutativeestimateCostInvPerOp, exp, getNeutralElement, getUniformlyRandomNonNeutral, implementsOwnExp, implementsOwnMultiExp, multiexp, restoreFromRepresentationpublic BarretoNaehrigSourceGroupImpl(java.math.BigInteger size,
java.math.BigInteger cofactor,
ExtensionFieldElement a6)
public BarretoNaehrigSourceGroupImpl(Representation r)
protected PairingSourceGroupElement getUniformlyRandomElementOblivious() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationExceptionpublic PairingSourceGroupElement mapToSubgroup(FieldElement y, int sel)
As opposed to mapToPoint(FieldElement, int), this function includes cofactor multiplication.
y - y coordinate of pointsel - selection of x coordinatepublic PairingSourceGroupElement mapToPoint(FieldElement y, int sel)
This function takes the y-coordinate of a point and maps it to a point on this curve. It solves the Weierstrass equation for a matching x-coordinate. For a given field F, for each element y in F, there exist either 0 or 3 solutions over F, i.e. x-coordinates in F.
IllegalArgumentException is thrown.
sel mod 3.
mapToPoint(P.getY(),0).equals(P);
y - y-coordinate of pointsel - selector for x-coordinatejava.lang.IllegalArgumentException - if the y-coordinate does not correspond to any curve pointpublic FieldElement decompressX(FieldElement y, int sel)
For more information on how this is done, consult the documentation for mapToPoint(FieldElement, int).
y - y-coordinate of pointsel - selector for x-coordinatejava.lang.IllegalArgumentException - if the y-coordinate does not correspond to any curve pointpublic BarretoNaehrigSourceGroupElementImpl getUniformlyRandomElement() throws java.lang.UnsupportedOperationException
GroupImplgetUniformlyRandomElement in interface GroupImplgetUniformlyRandomElement in class PairingSourceGroupImpljava.lang.UnsupportedOperationException - if the random generation cannot be donepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isShortForm()
public boolean hasPrimeSize()
throws java.lang.UnsupportedOperationException
GroupImpljava.lang.UnsupportedOperationExceptionprotected PairingSourceGroupElement superGetUniformlyRandomElement()