gnu.java.security

Class Properties


public final class Properties
extends Object

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

Field Summary

static String
CHECK_WEAK_KEYS
static String
DO_RSA_BLINDING
static String
PROPERTIES_FILE
static String
REPRODUCIBLE_PRNG
static String
VERSION

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
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 String
getProperty(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
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(String key, 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, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

CHECK_WEAK_KEYS

public static final String CHECK_WEAK_KEYS
Field Value:
"gnu.crypto.with.check.for.weak.keys"

DO_RSA_BLINDING

public static final String DO_RSA_BLINDING
Field Value:
"gnu.crypto.with.rsa.blinding"

PROPERTIES_FILE

public static final String PROPERTIES_FILE
Field Value:
"gnu.crypto.properties.file"

REPRODUCIBLE_PRNG

public static final String REPRODUCIBLE_PRNG
Field Value:
"gnu.crypto.with.reproducible.prng"

VERSION

public static final String VERSION
Field Value:
"gnu.crypto.version"

Method Details

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.

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.

getProperty

public static final String getProperty(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.

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.

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.

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.

setProperty

public static final void setProperty(String key,
                                     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.

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.

Properties.java -- run-time configuration properties. Copyright (C) 2003, 2004, 2006, 2010 Free Software Foundation, Inc. This file is a part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.