public abstract class AbstractPairing extends java.lang.Object implements BilinearMapImpl
| Modifier and Type | Field and Description |
|---|---|
protected PairingSourceGroupImpl |
g1 |
protected PairingSourceGroupImpl |
g2 |
protected PairingTargetGroupImpl |
gT |
| Constructor and Description |
|---|
AbstractPairing(PairingSourceGroupImpl g1,
PairingSourceGroupImpl g2,
PairingTargetGroupImpl gT) |
| Modifier and Type | Method and Description |
|---|---|
PairingTargetGroupElementImpl |
apply(GroupElementImpl g,
GroupElementImpl h,
java.math.BigInteger exponent)
Computes \(e(g1,g2)^\text{exponent}\).
|
boolean |
equals(java.lang.Object other) |
protected abstract ExtensionFieldElement |
evaluateLine(FieldElement[] line,
PairingSourceGroupElement P,
PairingSourceGroupElement Q)
Abstract class that evaluates a line through a given point at another point.
|
PairingTargetGroupElementImpl |
exponentiate(FieldElement f)
Implements final exponentiation.
|
int |
hashCode() |
protected void |
init(PairingSourceGroupImpl g1,
PairingSourceGroupImpl g2,
PairingTargetGroupImpl gT) |
protected ExtensionFieldElement |
miller(PairingSourceGroupElement P,
PairingSourceGroupElement Q,
java.math.BigInteger n)
Implementation of Miller algorithm to be used as part of the function pair.
|
protected abstract ExtensionFieldElement |
pair(PairingSourceGroupElement P,
PairingSourceGroupElement Q)
Computes the first step of the pairing.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitapply, isSymmetricprotected PairingSourceGroupImpl g1
protected PairingSourceGroupImpl g2
protected PairingTargetGroupImpl gT
public AbstractPairing(PairingSourceGroupImpl g1, PairingSourceGroupImpl g2, PairingTargetGroupImpl gT)
protected void init(PairingSourceGroupImpl g1, PairingSourceGroupImpl g2, PairingTargetGroupImpl gT)
public PairingTargetGroupElementImpl apply(GroupElementImpl g, GroupElementImpl h, java.math.BigInteger exponent)
BilinearMapImpl
Depending on the bilinear map and the involved groups, this may be more efficiently implemented than computing
it directly via apply(g1,g2).pow(exponent).
For example, implementations should do exponentiation in the group with the cheapest group operation.
apply in interface BilinearMapImplg - left hand side argument for the pairing functionh - right hand side argument for the pairing functionexponent - the exponent to apply to the result of the pairingpublic PairingTargetGroupElementImpl exponentiate(FieldElement f)
Exponentiation of f to the power of e=(q^k-1)/r where r is the size of groups G1, G2, and GT, respectively.
f - the element to exponentiateprotected abstract ExtensionFieldElement evaluateLine(FieldElement[] line, PairingSourceGroupElement P, PairingSourceGroupElement Q)
The line is parameterized by the point P and the argument line. Here, line is the result of the function EllipticCurvePoint.computeLine. The line is evaluated at the point Q.
line - - parameterization of the lineP - - point on the lineQ - - point where line es evaluatedprotected abstract ExtensionFieldElement pair(PairingSourceGroupElement P, PairingSourceGroupElement Q)
A pairing is computed in several steps, where the first step includes miller Algorithm and the second step is the final exponentiation. This functions computes the first step of the pairing computation that depends on the concrete pairing.
P - - first argument of pairingQ - - second argument of pairingprotected ExtensionFieldElement miller(PairingSourceGroupElement P, PairingSourceGroupElement Q, java.math.BigInteger n)
This algorithm evaluates a function with divisor [n](P-O) at Q and applies denominator elimination.
P - - first argumentQ - - second argumentn - - loop boundpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object