PolynomialRingGF2
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | GF2mField(int
the degree of the field degree, int the field polynomial poly)create a finite field GF(2^m) with the fixed field polynomial |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public String | |
| public boolean | Returns: true or falseobject other)Overrides java. |
| public int | |
| public int | |
| public byte[] | |
| public int | |
| public int | Returns: a random elementSecureRandom sr)create a random field element using PRNG sr |
| public int | |
| public int | Returns: a random non-zero elementSecureRandom sr)create a random non-zero field element using PRNG sr |
| public int | |
| public int | |
| public boolean | |
| public int | |
| private static String | |
| public int | |
| public String | Returns: a human readable form of this field.Overrides java. |
| degree | back to summary |
|---|---|
| private int degree | |
| polynomial | back to summary |
|---|---|
| private int polynomial | |
| GF2mField | back to summary |
|---|---|
| public GF2mField(int degree) create a finite field GF(2^m)
| |
| GF2mField | back to summary |
|---|---|
| public GF2mField(int degree, int poly) create a finite field GF(2^m) with the fixed field polynomial
| |
| GF2mField | back to summary |
|---|---|
| public GF2mField(byte[] enc) | |
| GF2mField | back to summary |
|---|---|
| public GF2mField(GF2mField field) | |
| add | back to summary |
|---|---|
| public int add(int a, int b) Return sum of two elements
| |
| elementToStr | back to summary |
|---|---|
| public String elementToStr(int a) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. checks if given object is equal to this field. The method returns false whenever the given object is not GF2m.
| |
| exp | back to summary |
|---|---|
| public int exp(int a, int k) compute exponentiation a^k
| |
| getDegree | back to summary |
|---|---|
| public int getDegree() return degree of the field
| |
| getEncoded | back to summary |
|---|---|
| public byte[] getEncoded() return the encoded form of this field
| |
| getPolynomial | back to summary |
|---|---|
| public int getPolynomial() return the field polynomial
| |
| getRandomElement | back to summary |
|---|---|
| public int getRandomElement(SecureRandom sr) create a random field element using PRNG sr
| |
| getRandomNonZeroElement | back to summary |
|---|---|
| public int getRandomNonZeroElement() create a random non-zero field element
| |
| getRandomNonZeroElement | back to summary |
|---|---|
| public int getRandomNonZeroElement(SecureRandom sr) create a random non-zero field element using PRNG sr
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| inverse | back to summary |
|---|---|
| public int inverse(int a) compute the multiplicative inverse of a
| |
| isElementOfThisField | back to summary |
|---|---|
public boolean isElementOfThisField(int e)
| |
| mult | back to summary |
|---|---|
| public int mult(int a, int b) Return product of two elements
| |
| polyToString | back to summary |
|---|---|
| private static String polyToString(int p) | |
| sqRoot | back to summary |
|---|---|
| public int sqRoot(int a) compute the square root of an integer
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a human readable form of this field.
| |