Algebraic Structures

The Field interface represents a generic algebraic structure. Instances of this interface can be obtained from the Pairing interface as shown here.

Initializing Elements

The following methods can be used to initialize a new Element.

/* Create a new uninitialized element. */
Element element = field.newElement();
                
/* Create a new element whose value is zero. */
Element element = field.newZeroElement();
                
/* Create a new element whose value is one. */
Element element = field.newOneElement();
                
/* Create a new random element. */
Element element = field.newRandomElement();
                
/* Create a new element with a specified value. */
Element element = field.newElement(5);
                
/* Create a new element with a specified value. */
Element element = field.newElement(new BigInteger("5390843849083028490328"));