public interface BilinearMap extends java.util.function.BiFunction<GroupElement,GroupElement,GroupElement>
e : G1 x G2 -> GT.
Bilinearity means that the map e is linear in both the first and second component.
G1, G2 and GT are groups.
Usually used as a wrapper around a BilinearMapImpl to offer additional evaluation capabilities.
You should use BilinearMapImpl for your implementation instead.
| Modifier and Type | Method and Description |
|---|---|
default 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}\).
|
default GroupElement |
apply(GroupElement g1,
GroupElement g2,
Zn.ZnElement exponent)
Computes \(e(g1,g2)^\text{exponent}\).
|
default GroupElementVector |
apply(GroupElementVector lhs,
GroupElementVector rhs)
Applies the pairing function to each element of the given vectors, resulting in a new vector containing the
resulting target group elements.
|
default PairingExpr |
applyExpr(GroupElementExpression g1elem,
GroupElement g2elem) |
default PairingExpr |
applyExpr(GroupElementExpression g1elem,
GroupElementExpression g2elem)
Creates a
PairingExpr using this pairing and given argument GroupElementExpressions. |
default PairingExpr |
applyExpr(GroupElement g1elem,
GroupElement g2elem)
Creates a
PairingExpr using this pairing and given argument group elements. |
default PairingExpr |
applyExpr(GroupElement g1elem,
GroupElementExpression g2elem) |
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.
|
default GroupElement |
innerProduct(GroupElementVector lhs,
GroupElementVector rhs)
Corresponds to first calling
apply(GroupElementVector, GroupElementVector) and then combining
the resulting elements using the group operation. |
boolean |
isSymmetric()
Returns true if
e(g,h).equals(e(h,g)) for all g, h. |
Group getG1()
Group getG2()
Group getGT()
GroupElement apply(GroupElement g1, GroupElement g2, java.math.BigInteger exponent)
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.
g1 - 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 pairingdefault GroupElement apply(GroupElement g1, GroupElement g2)
this.apply(g1, g2, 1).apply in interface java.util.function.BiFunction<GroupElement,GroupElement,GroupElement>g1 - left hand side argument for the pairing functiong2 - right hand side argument for the pairing functiondefault GroupElement apply(GroupElement g1, GroupElement g2, Zn.ZnElement exponent)
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.
g1 - 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 pairingdefault GroupElementVector apply(GroupElementVector lhs, GroupElementVector rhs)
Specifically, the pairing function is applied to the elements residing at the same index.
For example, the first element of lhs and rhs will be used as argument, and the result
will be stored as the first element of the result vector. This continues until done for each element.
lhs - GroupElementVector containing the group elements to use a left hand side argumentsrhs - GroupElementVector containing the group elements to use a right hand side argumentsGroupElementVector containing the resulting target group elementsjava.lang.IllegalArgumentException - if the given vectors do not have the same lengthdefault GroupElement innerProduct(GroupElementVector lhs, GroupElementVector rhs)
apply(GroupElementVector, GroupElementVector) and then combining
the resulting elements using the group operation.
The given vectors must have the same length for this method to work.lhs - GroupElementVector containing the group elements to use a left hand side argumentsrhs - GroupElementVector containing the group elements to use a right hand side argumentsjava.lang.IllegalArgumentException - if the given vectors do not have the same lengthdefault PairingExpr applyExpr(GroupElementExpression g1elem, GroupElementExpression g2elem)
PairingExpr using this pairing and given argument GroupElementExpressions.g1elem - the left hand side G1 group element expression argument for the pairing functiong2elem - the right hand side G2 group element expression argument for the pairing functionPairingExprdefault PairingExpr applyExpr(GroupElement g1elem, GroupElement g2elem)
PairingExpr using this pairing and given argument group elements.g1elem - the left hand side G1 element argument for the pairing functiong2elem - the right hand side G2 element argument for the pairing functionPairingExprdefault PairingExpr applyExpr(GroupElement g1elem, GroupElementExpression g2elem)
default PairingExpr applyExpr(GroupElementExpression g1elem, GroupElement g2elem)
boolean isSymmetric()
e(g,h).equals(e(h,g)) for all g, h.