public class LazyBilinearMap extends java.lang.Object implements BilinearMap
BilinearMapImpl wrapper implementing deferred (lazy) evaluation.
Allows for additional optimizations using information about the operations being applied.
For more information, see the documentation.
| Modifier and Type | Field and Description |
|---|---|
protected LazyGroup |
g1 |
protected LazyGroup |
g2 |
protected LazyGroup |
gt |
protected BilinearMapImpl |
impl |
| Constructor and Description |
|---|
LazyBilinearMap(LazyGroup g1,
LazyGroup g2,
LazyGroup gt,
BilinearMapImpl impl) |
| Modifier and Type | Method and Description |
|---|---|
GroupElement |
apply(GroupElement g1,
GroupElement g2)
Corresponds to
this.apply(g1, g2, 1). |
GroupElement |
apply(GroupElement g1,
GroupElement g2,
java.math.BigInteger exponent)
Computes \(e(g1,g2)^\text{exponent}\).
|
boolean |
equals(java.lang.Object o) |
Group |
getG1()
Returns the source group G1 associated with this bilinear map.
|
Group |
getG2()
Returns the source group G2 associated with this bilinear map.
|
Group |
getGT()
Returns the target group GT associated with this bilinear map.
|
BilinearMapImpl |
getImpl() |
int |
hashCode() |
boolean |
isSymmetric()
Returns true if
e(g,h).equals(e(h,g)) for all g, h. |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitapply, apply, applyExpr, applyExpr, applyExpr, applyExpr, innerProductprotected BilinearMapImpl impl
protected LazyGroup g1
protected LazyGroup g2
protected LazyGroup gt
public LazyBilinearMap(LazyGroup g1, LazyGroup g2, LazyGroup gt, BilinearMapImpl impl)
public Group getG1()
BilinearMapgetG1 in interface BilinearMappublic Group getG2()
BilinearMapgetG2 in interface BilinearMappublic Group getGT()
BilinearMapgetGT in interface BilinearMappublic GroupElement apply(GroupElement g1, GroupElement g2, java.math.BigInteger exponent)
BilinearMap
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 BilinearMapg1 - left hand side argument for the pairing functiong2 - right hand side argument for the pairing functionexponent - the exponent to apply to the result of the pairingpublic GroupElement apply(GroupElement g1, GroupElement g2)
BilinearMapthis.apply(g1, g2, 1).apply in interface java.util.function.BiFunction<GroupElement,GroupElement,GroupElement>apply in interface BilinearMapg1 - left hand side argument for the pairing functiong2 - right hand side argument for the pairing functionpublic boolean isSymmetric()
BilinearMape(g,h).equals(e(h,g)) for all g, h.isSymmetric in interface BilinearMappublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic BilinearMapImpl getImpl()