Java Key Generator Config (pre 6.2)
Key Generator configuration required for all versions of KeyMaster prior to version 6.2.
From KeyMaster 6.2, OpenSSL is used to generate keys. For more information, see Installing KeyMaster. |
Key Generator Configuration
To generate the public, DER and private keys a properties file must be supplied to the KeyGenerator class as its first argument. This file must include ALL of the following properties in the table below. A sample configuration file is provided with the KeyMaster installation - this file is located within the examples directory of the KeyMaster distribution and is called keygen.props.
- key.generator.private.key.store.filename
-
The name and location of the file that the private key will be stored in.
Example:
privatekey.store
- key.generator.public.key.store.filename
-
The name and location of the file that the public key will be stored in.
Example:
publickey.store
- key.generator.public.key.der.filename
-
The name and location of the DER. The file name must end in '.der'
Example:
publickey.der
- key.generator.key.size
-
The size of the generated key. Both the public and private keys use this size
Example:
1024
- key.generator.security.provider.class.name
-
The fully qualified name of the JCE provider’s Java class that generates the encryption key pairs. This class must also be in the Java classpath of the KeyMaster Key Generator servlet (it is usually in a JAR file that is included in the classpath – see Generating the Required Keys ).
Only change this property if you have configured KeyMaster to use a different encryption class.
Example:
org.bouncycastle.jce.provider.BouncyCastleProvider
- key.generator.security.provider.name
-
The name of the provider of the Java class used to generate the encryption key pairs.
Only change this property if you have configured KeyMaster to use a different encryption class.
Example:
BC
- key.generator.Level
-
Specifies the java.util.logging.Level required.
The standard Java levels for logging messages are:
-
OFF
-
SEVERE
-
WARNING
-
INFO
-
CONFIG
-
FINE
-
FINER
-
FINEST
-
ALL
In a production system it is recommend that the logging level normally be set to SEVERE or WARNING.
Example:
INFO
-
- key.generator.FilenameAttribute
-
Specifies the name of the file to log messages to.
The file is not appended to. The existing log file will be overwritten.
The file is created relative to the user’s current location.
Example:
log.txt
Example configuration file
Example keygen.props file:
key.generator.private.key.store.filename=privatekey.store key.generator.key.size=1024 key.generator.public.key.store.filename=publickey.store key.generator.public.key.der.filename=publickey.der key.generator.security.provider.class.name=org.bouncycastle.jce.provider.BouncyCastleProvider key.generator.security.provider.name=BC key.generator.Level=ALL key.generator.FilenameAttribute=keygen.log
See also: