org.gudy.bouncycastle.math.ec
Class ECFieldElement.Fp

java.lang.Object
  extended by org.gudy.bouncycastle.math.ec.ECFieldElement
      extended by org.gudy.bouncycastle.math.ec.ECFieldElement.Fp
All Implemented Interfaces:
ECConstants
Enclosing class:
ECFieldElement

public static class ECFieldElement.Fp
extends ECFieldElement


Nested Class Summary
 
Nested classes/interfaces inherited from class org.gudy.bouncycastle.math.ec.ECFieldElement
ECFieldElement.F2m, ECFieldElement.Fp
 
Field Summary
 
Fields inherited from interface org.gudy.bouncycastle.math.ec.ECConstants
FOUR, ONE, THREE, TWO, ZERO
 
Constructor Summary
ECFieldElement.Fp(BigInteger q, BigInteger x)
           
 
Method Summary
 ECFieldElement add(ECFieldElement b)
           
 ECFieldElement divide(ECFieldElement b)
           
 boolean equals(Object other)
           
 String getFieldName()
          return the field name for this field.
 int getFieldSize()
           
 BigInteger getQ()
           
 int hashCode()
           
 ECFieldElement invert()
           
 ECFieldElement multiply(ECFieldElement b)
           
 ECFieldElement negate()
           
 ECFieldElement sqrt()
          return a sqrt root - the routine verifies that the calculation returns the right value - if none exists it returns null.
 ECFieldElement square()
           
 ECFieldElement subtract(ECFieldElement b)
           
 BigInteger toBigInteger()
           
 
Methods inherited from class org.gudy.bouncycastle.math.ec.ECFieldElement
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ECFieldElement.Fp

public ECFieldElement.Fp(BigInteger q,
                         BigInteger x)
Method Detail

toBigInteger

public BigInteger toBigInteger()
Specified by:
toBigInteger in class ECFieldElement

getFieldName

public String getFieldName()
return the field name for this field.

Specified by:
getFieldName in class ECFieldElement
Returns:
the string "Fp".

getFieldSize

public int getFieldSize()
Specified by:
getFieldSize in class ECFieldElement

getQ

public BigInteger getQ()

add

public ECFieldElement add(ECFieldElement b)
Specified by:
add in class ECFieldElement

subtract

public ECFieldElement subtract(ECFieldElement b)
Specified by:
subtract in class ECFieldElement

multiply

public ECFieldElement multiply(ECFieldElement b)
Specified by:
multiply in class ECFieldElement

divide

public ECFieldElement divide(ECFieldElement b)
Specified by:
divide in class ECFieldElement

negate

public ECFieldElement negate()
Specified by:
negate in class ECFieldElement

square

public ECFieldElement square()
Specified by:
square in class ECFieldElement

invert

public ECFieldElement invert()
Specified by:
invert in class ECFieldElement

sqrt

public ECFieldElement sqrt()
return a sqrt root - the routine verifies that the calculation returns the right value - if none exists it returns null.

Specified by:
sqrt in class ECFieldElement

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object