For the latest news and information visit
The GNU Crypto project

gnu.crypto
Class Properties

java.lang.Object
  extended bygnu.crypto.Properties

public final class Properties
extends java.lang.Object

A global object containing build-specific properties that affect the behaviour of the generated binaries from this library.

Version:
$Revision: 1.2 $

Field Summary
static java.lang.String CHECK_WEAK_KEYS
           
static java.lang.String DO_MILLER_RABIN
           
static java.lang.String DO_RSA_BLINDING
           
static java.lang.String REPRODUCIBLE_PRNG
           
 
Method Summary
static boolean checkForWeakKeys()
          A convenience method that returns, as a boolean, the library global configuration property indicating if the implementations of symmetric key block ciphers check, or not, for possible/potential weak and semi-weak keys that may be produced in the course of generating round encryption and/or decryption keys.
static boolean doMillerRabin()
          A convenience method that returns, as a boolean, the library global configuration property indicating if the primality check includes, or not, a Miller-Rabin test.
static boolean doRSABlinding()
          A convenience method that returns, as a boolean, the library global configuration property indicating if RSA decryption (RSADP primitive), does, or not, blinding against timing attacks.
static java.lang.String getProperty(java.lang.String key)
          Returns the string representation of the library global configuration property with the designated key.
static boolean isReproducible()
          A convenience method that returns, as a boolean, the library global configuration property indicating if the default Pseudo Random Number Generator produces, or not, the same bit stream when instantiated.
static void setCheckForWeakKeys(boolean value)
          A convenience method to set the global property for checking for weak and semi-weak cipher keys.
static void setDoMillerRabin(boolean value)
          A convenience method to set the global property fo invoking an additional (Miller-Rabin) test when checking for the primality of a large integer.
static void setDoRSABlinding(boolean value)
          A convenience method to set the global property fo adding a blinding operation when executing the RSA decryption primitive.
static void setProperty(java.lang.String key, java.lang.String value)
          Sets the value of a designated library global configuration property, to a string representation of what should be a legal value.
static void setReproducible(boolean value)
          A convenience method to set the global property for reproducibility of the default PRNG bit stream output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPRODUCIBLE_PRNG

public static final java.lang.String REPRODUCIBLE_PRNG
See Also:
Constant Field Values

CHECK_WEAK_KEYS

public static final java.lang.String CHECK_WEAK_KEYS
See Also:
Constant Field Values

DO_MILLER_RABIN

public static final java.lang.String DO_MILLER_RABIN
See Also:
Constant Field Values

DO_RSA_BLINDING

public static final java.lang.String DO_RSA_BLINDING
See Also:
Constant Field Values
Method Detail

getProperty

public static final java.lang.String getProperty(java.lang.String key)

Returns the string representation of the library global configuration property with the designated key.

Parameters:
key - the case-insensitive, non-null and non-empty name of a configuration property.
Returns:
the string representation of the designated property, or null if such property is not yet set, or key is empty.

setProperty

public static final void setProperty(java.lang.String key,
                                     java.lang.String value)

Sets the value of a designated library global configuration property, to a string representation of what should be a legal value.

Parameters:
key - the case-insensitive, non-null and non-empty name of a configuration property.
value - the non-null, non-empty string representation of a legal value of the configuration property named by key.

isReproducible

public static final boolean isReproducible()

A convenience method that returns, as a boolean, the library global configuration property indicating if the default Pseudo Random Number Generator produces, or not, the same bit stream when instantiated.

Returns:
true if the default PRNG produces the same bit stream with every VM instance. Returns false if the default PRNG is seeded with the time of day of its first invocation.

checkForWeakKeys

public static final boolean checkForWeakKeys()

A convenience method that returns, as a boolean, the library global configuration property indicating if the implementations of symmetric key block ciphers check, or not, for possible/potential weak and semi-weak keys that may be produced in the course of generating round encryption and/or decryption keys.

Returns:
true if the cipher implementations check for weak and semi-weak keys. Returns false if the cipher implementations do not check for weak or semi-weak keys.

doMillerRabin

public static final boolean doMillerRabin()

A convenience method that returns, as a boolean, the library global configuration property indicating if the primality check includes, or not, a Miller-Rabin test.

Returns:
true if the primality test includes also an invocation to a Miller-Rabin test. Returns false if the primality test does not include the additional invocation to a Miller-Rabin test.

doRSABlinding

public static final boolean doRSABlinding()

A convenience method that returns, as a boolean, the library global configuration property indicating if RSA decryption (RSADP primitive), does, or not, blinding against timing attacks.

Returns:
true if the RSA decryption primitive includes a blinding operation. Returns false if the RSA decryption primitive does not include the additional blinding operation.

setReproducible

public static final void setReproducible(boolean value)

A convenience method to set the global property for reproducibility of the default PRNG bit stream output.

Parameters:
value - if true then the default PRNG bit stream output is the same with every invocation of the VM.

setCheckForWeakKeys

public static final void setCheckForWeakKeys(boolean value)

A convenience method to set the global property for checking for weak and semi-weak cipher keys.

Parameters:
value - if true then the cipher implementations will invoke additional checks for weak and semi-weak key values that may get generated.

setDoMillerRabin

public static final void setDoMillerRabin(boolean value)

A convenience method to set the global property fo invoking an additional (Miller-Rabin) test when checking for the primality of a large integer.

Parameters:
value - if true then the code for checking the primality of large integers will include an additional invocation to a Miller-Rabin test.

setDoRSABlinding

public static final void setDoRSABlinding(boolean value)

A convenience method to set the global property fo adding a blinding operation when executing the RSA decryption primitive.

Parameters:
value - if true then the code for performing the RSA decryption primitive will include a blinding operation.

For the latest news and information visit
The GNU Crypto project

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.