|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectds.ov2.test.State
public class State
Global variables of the host driver for the test applet. Most of them can be set via command-line options.
Static class.
Field Summary | |
---|---|
static Reference<Boolean> |
apduscript
Print apdutool lines in addition to the APDU contents. |
static Reference<Boolean> |
check_corner_cases
Corner case checking. |
static Reference<Integer> |
divisor_length
Length of the divisor as percentage of the divident length for the division test and measurement. |
static short |
double_bignat_max_size
Maximal size of double-sized bignats in bytes. |
static int |
double_size
Size of double-sized bignats in bytes. |
static BigInteger_inputs |
fix_inputs
Vector of input arguments from the command line. |
static Reference<String> |
fixed_exponent
Exponent to be used. |
static Reference<Boolean> |
keep_modulus
Use the same modulus for a number of successive tests to simulate the OV-chip use-case. |
static short |
long_bignat_max_size
Maximal size of long bignats (bases) in bytes. |
static Reference<Integer> |
long_size
Size of long (base) bignats in bytes. |
static Reference<Boolean> |
long_size_set
Changed to true, if long_size is set via an option. |
static short |
max_vector_length
Maximal number of bases and exponents for Vector.exponent_mod and
Vector.mont_rsa_exponent_mod . |
static Reference<Integer> |
pre_computed_base_factors
Number of bases for which the factors are precomputed, see Vector.exponent_mod . |
static Reference<Integer> |
rounds
Number of rounds to run for various tests. |
static Reference<Boolean> |
rounds_set
Changed to true if rounds is set via an option. |
static int |
rsa_year
Year for the estimation of the exponent length. |
static short |
short_bignat_max_size
Maximal size of short bignats (exponents). |
static Reference<Integer> |
short_bit_size
Size of short (exponent) bignats in bits. |
static Reference<Boolean> |
short_bit_size_set
Changed to true, if short_bit_size is set via options. |
static int |
short_size
Size of short (exponent) bignats in bytes. |
static Reference<Integer> |
start_size
Size to start with for those performance measurements that loop over a range of sizes. |
static String |
test_card_applet_file
File name of the applet cap file. |
static String |
test_card_applet_name
Applet ID of the test applet. |
static String |
test_card_package_name
Applet ID of the test applet package. |
static Reference<Integer> |
vector_length
Actual lenght of base and exponent vectors. |
static Reference<Integer> |
verbosity
Default verbosity. |
Constructor Summary | |
---|---|
protected |
State()
Static class, object creation disabled. |
Method Summary | |
---|---|
static int |
make_short_bit_size(int long_byte_size)
(Re-)Compute the short (exponent) bignat size in bits for the given long (base) size. |
static int |
make_short_size(int long_byte_size)
(Re-)Compute a suitable short (exponent) bignat size in bytes for the given long (base) size. |
static void |
update_short_size()
Update the short_size after the long_size has
been changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short short_bignat_max_size
Test_applet.install
and Test_host.make_installation_arguments(java.lang.String)
. The current
value (244) is identical to the maximal RSA key size of my
cards.
public static final short long_bignat_max_size
Test_applet.install
and Test_host.make_installation_arguments(java.lang.String)
. The current
value is 256 + 2 Montgomery digits (= 258) to enable
measurments up to 256 byte numbers.
public static final short double_bignat_max_size
Test_applet.install
and Test_host.make_installation_arguments(java.lang.String)
. The current value is
128.
public static final short max_vector_length
Vector.exponent_mod
and
Vector.mont_rsa_exponent_mod
. Must be identical to the configured
size of the vector objects in the applet. For this, this number
must be passed as fourth applet-installation argument, see
Test_applet.install
and Test_host.make_installation_arguments(java.lang.String)
. The current value is
5.
public static final int rsa_year
Security_parameter.exponent_length_for_modulus_length
. This is
the year up to which this estimation is valid. Higher numbers
result in smaller exponent sizes. Current value is 2009.
public static Reference<Integer> verbosity
-d
, -dd
, -ddd
. Controls the amount of data
printed to the terminal. Value 0 prints almost only performance
data. Value 5 (-d
) prints some progress messages. Value
10 (-dd
) additionally prints all parameters of the
tests. Value 15 (-ddd
) additionally prints the APDU's
exchanged with the card.
public static Reference<Boolean> apduscript
Default value is false, enabled with option -apdutool
.
public static Reference<Boolean> rounds_set
rounds
is set via an option. Then some
automatic round number changes are disabled.
public static Reference<Integer> rounds
The default value is 1, set with option -rounds
.
public static int short_size
The default value is short_bignat_max_size
, indirectly
set via option -exp-size
.
public static Reference<Integer> long_size
The default value is long_bignat_max_size
, set with
option -size
.
public static int double_size
The default value is long_bignat_max_size
.
public static Reference<Integer> short_bit_size
The default value is short_bignat_max_size
* 8
,
set via option -exp-size
.
public static Reference<Boolean> long_size_set
long_size
is set via an option.
Then some automatic size changes are disabled.
public static Reference<Boolean> short_bit_size_set
short_bit_size
is set via options.
Then some automatic size changes are diabled.
public static Reference<Integer> vector_length
The default value is max_vector_length
, set with
command-line option -vec-len
.
public static Reference<Integer> pre_computed_base_factors
Vector.exponent_mod
.
Used for the (non-RSA) vector exponent checks and measurements.
The default value is max_vector_length
, set via option
-pre-base-fac
.
public static Reference<Boolean> keep_modulus
The default value is false, set via option -keep-mod
.
public static Reference<Integer> start_size
Set via option -start-size
.
public static Reference<Integer> divisor_length
The default value is 100 (divident and divisor have the same
length), set via option -div-length
.
public static Reference<Boolean> check_corner_cases
-check-corner-cases
. Currently most
checks do not support corner cases, the only exceptions being
squared multiplication and short squared multiplication.
public static Reference<String> fixed_exponent
-fixed-exponent
.
Currently only supported by the RSA power checks started with
-rsa-exp-check
and -rsa-exp-perf
.
public static String test_card_applet_file
public static String test_card_applet_name
public static String test_card_package_name
public static BigInteger_inputs fix_inputs
-i
and -hex
. They are then stored
in order in this vector. Many tests take their numbers from this
vector, if there are enough numbers available.
Constructor Detail |
---|
protected State()
Method Detail |
---|
public static int make_short_bit_size(int long_byte_size) throws IllegalArgumentException
Security_parameter
for the estimation if short_bit_size
has not
explicitely set.
long_byte_size
- effective long (base) size in bytes,
without any potential Montgomery digits
IllegalArgumentException
- if long_byte_size is less than
or equal to 0public static int make_short_size(int long_byte_size)
make_short_bit_size(int)
by 8 and changes the result
such that the various side conditions are fulfiled.
long_byte_size
- effective long (base) size in bytes,
without any potential Montgomery digits
public static void update_short_size()
short_size
after the long_size
has
been changed. The new value of short_size
will only
depend on long_size
if short_bit_size
has not
explicitely been set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |