de.flexiprovider.core.mersa
Class MeRSAKeyGenParameterSpec

java.lang.Object
  |
  +--java.security.spec.RSAKeyGenParameterSpec
        |
        +--de.flexiprovider.core.rsa.RSAKeyGenParameterSpec
              |
              +--de.flexiprovider.core.mersa.MeRSAKeyGenParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec, java.security.spec.AlgorithmParameterSpec

public class MeRSAKeyGenParameterSpec
extends RSAKeyGenParameterSpec

This class specifies parameters used by the MeRSAKeyPairGenerator.

Author:
Paul Nguentcheu, Martin Döring

Field Summary
static int DEFAULT_EXPONENT_K
          The default exponent of the prime p
 
Fields inherited from class de.flexiprovider.core.rsa.RSAKeyGenParameterSpec
DEFAULT_EXPONENT, DEFAULT_KEY_SIZE
 
Fields inherited from class java.security.spec.RSAKeyGenParameterSpec
F0, F4
 
Constructor Summary
MeRSAKeyGenParameterSpec()
          Construct the default MeRSA key generation parameters.
MeRSAKeyGenParameterSpec(int keySize)
          Construct new MeRSA key generation parameters from the given key size.
MeRSAKeyGenParameterSpec(int keySize, FlexiBigInt e)
          Construct new MeRSA key generation parameters from the given key size and public exponent.
MeRSAKeyGenParameterSpec(int keySize, FlexiBigInt e, int k)
          Construct new RSA key generation parameters from the given key size and public exponent.
 
Method Summary
 int getExponentK()
           
 
Methods inherited from class de.flexiprovider.core.rsa.RSAKeyGenParameterSpec
getE, getKeySize
 
Methods inherited from class java.security.spec.RSAKeyGenParameterSpec
, getKeysize, getPublicExponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EXPONENT_K

public static final int DEFAULT_EXPONENT_K
The default exponent of the prime p
Constructor Detail

MeRSAKeyGenParameterSpec

public MeRSAKeyGenParameterSpec()
Construct the default MeRSA key generation parameters. Choose the key size as RSAKeyGenParameterSpec.DEFAULT_KEY_SIZE, the public exponent as RSAKeyGenParameterSpec.DEFAULT_EXPONENT, and the exponent of the prime p as DEFAULT_EXPONENT_K.

MeRSAKeyGenParameterSpec

public MeRSAKeyGenParameterSpec(int keySize)
Construct new MeRSA key generation parameters from the given key size. Choose the public exponent as RSAKeyGenParameterSpec.DEFAULT_EXPONENT, and the exponent of the prime p as DEFAULT_EXPONENT_K. If the key size is invalid, choose the RSAKeyGenParameterSpec.DEFAULT_KEY_SIZE.
Parameters:
keySize - the key size (>= 512 bits)

MeRSAKeyGenParameterSpec

public MeRSAKeyGenParameterSpec(int keySize,
                                FlexiBigInt e)
Construct new MeRSA key generation parameters from the given key size and public exponent. The exponent of the prime p is set to the DEFAULT_EXPONENT_K. If the key size is invalid, choose the RSAKeyGenParameterSpec.DEFAULT_KEY_SIZE. If the public exponent is invalid, choose the RSAKeyGenParameterSpec.DEFAULT_EXPONENT.
Parameters:
keySize - the key size (>= 512 bits)
e - the public exponent (must be odd)

MeRSAKeyGenParameterSpec

public MeRSAKeyGenParameterSpec(int keySize,
                                FlexiBigInt e,
                                int k)
Construct new RSA key generation parameters from the given key size and public exponent. If the key size is invalid, choose the RSAKeyGenParameterSpec.DEFAULT_KEY_SIZE. If the public exponent is invalid, choose the RSAKeyGenParameterSpec.DEFAULT_EXPONENT. If the exponent of the prime p is invalid, choose the DEFAULT_EXPONENT_K.
Parameters:
keySize - the key size (>= 512 bits)
e - the public exponent (must be odd)
k - the exponent of the prime p (>= 1)
Method Detail

getExponentK

public int getExponentK()
Returns:
the exponent of the prime p