public interface Pairing
Element
,
Field
,
PairingPreProcessing
Modifier and Type | Method and Description |
---|---|
int |
getDegree()
Returns the degree of the pairing.
|
Field |
getFieldAt(int index)
Returns the field at level index.
|
int |
getFieldIndex(Field field)
Returns the index of the field if it belongs
to this pairing, otherwise it returns -1.
|
Field |
getG1()
Return the G1 group.
|
Field |
getG2()
Return the G2 group.
|
Field |
getGT()
Return the GT group which is the group of rth roots of unity.
|
PairingPreProcessing |
getPairingPreProcessingFromBytes(byte[] source)
Reads a PairingPreProcessing from the buffer source.
|
PairingPreProcessing |
getPairingPreProcessingFromBytes(byte[] source,
int offset)
Reads a PairingPreProcessing from the buffer source starting from offset.
|
PairingPreProcessing |
getPairingPreProcessingFromElement(Element in1)
Get ready to perform a pairing whose first input is in1, returns the results of time-saving pre-computation.
|
int |
getPairingPreProcessingLengthInBytes()
Returns the length in bytes needed to represent a PairingPreProcessing structure.
|
Field |
getZr()
Return the Zr group.
|
boolean |
isProductPairingSupported()
Returns true if optimized
product of pairing is supported,
false otherwise.
|
boolean |
isSymmetric()
Returns true if this pairing is symmetric, false otherwise.
|
Element |
pairing(Element[] in1,
Element[] in2)
Computes the product of pairings, that is
'e'('in1'[0], 'in2'[0]) ...
|
Element |
pairing(Element in1,
Element in2)
Applies the bilinear map.
|
boolean isSymmetric()
int getDegree()
Field getG1()
Field getG2()
Field getGT()
Field getZr()
Field getFieldAt(int index)
int getFieldIndex(Field field)
field
- the field whose index has to be determine.getFieldAt(int)
Element pairing(Element in1, Element in2)
in1
- an element from G1.in2
- an element from G2.boolean isProductPairingSupported()
pairing(Element[], Element[])
Element pairing(Element[] in1, Element[] in2)
in1
- must have at least 'n' elements belonging to the groups G1in2
- must have at least 'n' elements belonging to the groups G2int getPairingPreProcessingLengthInBytes()
getPairingPreProcessingFromBytes(byte[])
,
getPairingPreProcessingFromElement(Element)
,
PairingPreProcessing
PairingPreProcessing getPairingPreProcessingFromElement(Element in1)
in1
- the first input of a pairing execution, used to pre-compute the pairing.PairingPreProcessing getPairingPreProcessingFromBytes(byte[] source)
source
- the source of bytes.PairingPreProcessing getPairingPreProcessingFromBytes(byte[] source, int offset)
source
- the source of bytes.offset
- the starting offset.Copyright © 2013. All rights reserved.