public interface Field<E extends Element>
Element
,
ElementPowPreProcessing
Modifier and Type | Method and Description |
---|---|
Element[] |
add(Element[] a,
Element[] b)
Computes the component-wise addition between a and b.
|
int |
getCanonicalRepresentationLengthInBytes()
Returns the length in bytes needed to canonical represent an element of this Field.
|
ElementPowPreProcessing |
getElementPowPreProcessingFromBytes(byte[] source)
Reads an ElementPowPreProcessing from the buffer source.
|
ElementPowPreProcessing |
getElementPowPreProcessingFromBytes(byte[] source,
int offset)
Reads an ElementPowPreProcessing from the buffer source starting from offset.
|
int |
getLengthInBytes()
Returns the length in bytes needed to represent an element of this Field.
|
int |
getLengthInBytes(Element e)
Returns the length in bytes needed to represent an element of this Field.
|
E |
getNqr()
Returns a quadratic non-residue in this field.
|
BigInteger |
getOrder()
Returns the order of this field.
|
boolean |
isOrderOdd()
Returns true> if the order is odd,
false otherwise.
|
E |
newElement()
Returns a new element which lies in this field.
|
E |
newElement(BigInteger value)
Returns a new element whose value is passed as parameter.
|
E |
newElement(E e)
Returns a new element whose value is copied from the passed element.
|
E |
newElement(int value)
Returns a new element whose value is passed as parameter.
|
E |
newElementFromBytes(byte[] source)
Returns a new element whose value is set from the buffer source.
|
E |
newElementFromBytes(byte[] source,
int offset)
Returns a new element whose value is set from the buffer source starting from offset.
|
E |
newElementFromHash(byte[] source,
int offset,
int length)
Returns a new element whose value is set deterministically from the length bytes stored
in the source parameter starting from the passed offset.
|
E |
newOneElement()
Returns a new element whose value is one.
|
E |
newRandomElement()
Returns a new random element.
|
E |
newZeroElement()
Returns a new element whose value is zero.
|
Element[] |
twice(Element[] elements)
Computes the component-wise twice.
|
E newElement()
E newElement(int value)
value
- the value of the new element.Element.set(int)
E newElement(BigInteger value)
value
- the value of the new element.Element.set(java.math.BigInteger)
E newElement(E e)
e
- the element whose value is copied.E newElementFromHash(byte[] source, int offset, int length)
source
- the buffer data.offset
- the starting offset.length
- the number of bytes to be used.E newElementFromBytes(byte[] source)
source
- the source of bytes.E newElementFromBytes(byte[] source, int offset)
source
- the source of bytes.offset
- the starting offset.E newZeroElement()
E newOneElement()
E newRandomElement()
BigInteger getOrder()
boolean isOrderOdd()
E getNqr()
int getLengthInBytes()
int getLengthInBytes(Element e)
int getCanonicalRepresentationLengthInBytes()
Element[] twice(Element[] elements)
elements
- the vector of elements to be twiced.Element[] add(Element[] a, Element[] b)
a
- an array of elements of the fieldb
- another array of elements of the field to be added to aElementPowPreProcessing getElementPowPreProcessingFromBytes(byte[] source)
source
- the source of bytes.ElementPowPreProcessing getElementPowPreProcessingFromBytes(byte[] source, int offset)
source
- the source of bytes.offset
- the starting offset.Copyright © 2013. All rights reserved.