ds.ov2.bignat
Class Inverse_mod_256

java.lang.Object
  extended by ds.ov2.bignat.Inverse_mod_256

 class Inverse_mod_256
extends Object

Modular inverse modulo 256 for Java Card (currently unused). Can be used to compute Modulus.last_digit_inverse on the Card. Currently unused, because the last_digit_inverse is much more conviniently computed in Host_modulus.

Static class.

For a number of general topics see also the package description.

CPP Preprocessing
This class uses the following cpp defines: PACKAGE, ASSERT, ASSERT_TAG(condition, tag)
Execution Environment:
currently not used
Author:
Hendrik Tews
Version:
$Revision: 1.11 $
Last Commit:
$Date: 2009-03-26 15:51:28 $ by $Author: tews $

Constructor Summary
protected Inverse_mod_256()
          Static class, object construction disabled.
 
Method Summary
static short get_inverse(short n)
          Modular inverse modulo 256.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inverse_mod_256

protected Inverse_mod_256()
Static class, object construction disabled.

Method Detail

get_inverse

public static short get_inverse(short n)
Modular inverse modulo 256. Computes x such that x * n == 1 (modulo 256). Uses the iterative method of the extended eucledian algorithm.

The inverse does only exists for odd arguments.

Parameters:
n - n
Returns:
the inverse of n modulo 256