|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectTwoTo8Field
public class TwoTo8Field
An element of the Field(28) modulo the AES irreducible (x8 + x4 + x3 + x + 1). Each element of the field can be thought of as consisting of eight bits, or a byte.
Unit is the Unit element in the Field. That is, when you multiply any element in the Field with it, you get back the same element. It's actually {01}.
Zero is the Zero element in the Field. That is, when you add it to any element in the Field, you get back the same element. It's actually {00}.
| Field Summary | |
|---|---|
static TwoTo8Field |
Unit
|
static TwoTo8Field |
Zero
|
| Constructor Summary | |
|---|---|
TwoTo8Field()
Creates a new Field element and initializes it to Zero. |
|
TwoTo8Field(byte x)
|
|
TwoTo8Field(int x)
|
|
TwoTo8Field(java.lang.String x)
Creates a new Field element from the String which must be either one or two nibbles. |
|
TwoTo8Field(TwoTo8Field y)
|
|
| Method Summary | |
|---|---|
void |
add(Field y)
Add a Field element y to this. |
void |
add(TwoTo8Field y)
Adding is just exclusive or'ing the two 8-bit quantities. |
void |
affine()
Returns the AES affine transformation described on page 132 of Trappe & Washington. |
void |
affine(boolean debug)
Don't use this function. |
TwoTo8Field |
clone()
|
boolean |
equals(java.lang.Object obj)
Tests whether obj is structurally identical to this. |
TwoTo8Field |
Inv()
Find the gcd of this & the irreducible polynomial (x8 + x4 + x3 + x + 1). |
static void |
main(java.lang.String[] args)
|
static void |
main0(java.lang.String[] args)
|
void |
mult(Field y)
Multiplies a Field element y to this. |
Field |
mult(Field x,
Field y)
Multiplies two Field elements x and y and returns their product. |
void |
mult(int z)
|
void |
mult(TwoTo8Field y)
|
byte |
toByte()
|
java.lang.String |
toString()
Returns the element in GF(28) as a string, for e.g., "0B", "DF" etc. |
TwoTo8Field |
zero()
Returns a copy identical to Zero in the Field. |
boolean |
zerop()
Tests whether the Field element == Zero |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static TwoTo8Field Unit
public static TwoTo8Field Zero
| Constructor Detail |
|---|
public TwoTo8Field(TwoTo8Field y)
public TwoTo8Field()
public TwoTo8Field(byte x)
public TwoTo8Field(int x)
public TwoTo8Field(java.lang.String x)
| Method Detail |
|---|
public TwoTo8Field clone()
clone in interface Fieldclone in class java.lang.Objectpublic void add(TwoTo8Field y)
y - may be the this object.public boolean zerop()
zerop in interface Fieldpublic TwoTo8Field zero()
zero in interface Fieldpublic void add(Field y)
add in interface Fieldpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic void mult(Field y)
mult in interface Field
public Field mult(Field x,
Field y)
mult in interface Fieldpublic void mult(TwoTo8Field y)
public void mult(int z)
mult in interface Fieldpublic TwoTo8Field Inv()
B0,0 × f + B0,1 × g = A0 B1,0 × f + B1,1 × g = A1where A0 is initialized to this and A1 is initialized to (x8 + x4 + x3 + x + 1). B0,0 is inititialized to 1, B0,1 to 0, B1,0 to 0 and B1,1 to 1.
This is computing EGCD for polynomials.
Inv in interface Fieldpublic java.lang.String toString()
toString in class java.lang.Objectpublic byte toByte()
public static void main0(java.lang.String[] args)
public void affine()
public void affine(boolean debug)
public static void main(java.lang.String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||