IAIK ECC
version 2.18

iaik.security.ecc.math.algorithms
Class SquareRoot

java.lang.Object
  extended byiaik.security.ecc.math.algorithms.SquareRoot

public class SquareRoot
extends java.lang.Object

Find a square root


Method Summary
static FieldElement calcSQRT(FieldElement g)
          performs the squre root calculation
static java.math.BigInteger[] lucasSeq(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger k, java.math.BigInteger n)
          Generates Lucas sequences according to algorithm A.2.4 of the P1363 standard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

calcSQRT

public static FieldElement calcSQRT(FieldElement g)
                             throws AlgorithmException
performs the squre root calculation

Parameters:
g - the already modulo reduced field element
Returns:
the square root of g or null if no such square root exists
Throws:
AlgorithmException

lucasSeq

public static java.math.BigInteger[] lucasSeq(java.math.BigInteger p,
                                              java.math.BigInteger q,
                                              java.math.BigInteger k,
                                              java.math.BigInteger n)
                                       throws AlgorithmException
Generates Lucas sequences according to algorithm A.2.4 of the P1363 standard.

Parameters:
p - the parameter p of the lucas sequence
q - the parameter q of the lucas sequence
k - the index k of the sequence
n - the modulus
Returns:
Vk mod n and Q^(k/2) mod n
Throws:
AlgorithmException

IAIK ECC
version 2.18

IAIK-ECC 2.18, (c) 2002 IAIK, (c) 2003 SIC