ds.ov2.test
Class Performance_mult_card

java.lang.Object
  extended by ds.ov2.test.Performance_mult_card

public class Performance_mult_card
extends Object

Card/applet methods for testing Montgomery multiplication, demontgomerization and division.

Execution Environment:
card
Author:
Hendrik Tews
Version:
$Revision: 1.10 $
Last Commit:
$Date: 2009-06-02 13:27:57 $ by $Author: tews $

Constructor Summary
Performance_mult_card()
          Empty constructor.
 
Method Summary
 void demontgomerize(Bignat n, Modulus m, Bignat result, short rounds)
          Test Demontgomerization.
 void mont_mult(Bignat fac_1, Bignat fac_2, Modulus m, Bignat result, short rounds)
          Test Montgomery multiplication.
 void remainder_divide(Bignat divident, Bignat divisor, Bignat remainder, Bignat result, short rounds)
          Test division and remainder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Performance_mult_card

public Performance_mult_card()
Empty constructor.

Method Detail

mont_mult

public void mont_mult(Bignat fac_1,
                      Bignat fac_2,
                      Modulus m,
                      Bignat result,
                      short rounds)
Test Montgomery multiplication. Perform rounds calls to Bignat.montgomery_mult.

Parameters:
fac_1 - first factor
fac_2 - second factor
m - modulus
result - result reference
rounds - number of multiplication rounds

demontgomerize

public void demontgomerize(Bignat n,
                           Modulus m,
                           Bignat result,
                           short rounds)
Test Demontgomerization. Perform rounds calls to Bignat.demontgomerize.

Parameters:
n - number to demontgomerize
m - modulus
result - result reference
rounds - number of demontgomerization rounds

remainder_divide

public void remainder_divide(Bignat divident,
                             Bignat divisor,
                             Bignat remainder,
                             Bignat result,
                             short rounds)
Test division and remainder. Perform rounds calls to Bignat.remainder_divide.

Parameters:
divident - divident argument
divisor - divisor argument
remainder - reference for the remainder result
result - reference for the quotient result (may be null)
rounds - number of division rounds