iaik.xkms
Interface XPrivateKey


public interface XPrivateKey

Private key parameters returned by the service.

[303] The <PrivateKey> element contains the encrypted private key parameters returned by the service in a response to a registration request with server generated keys or a response to a successful recovery request.

[340] The <PrivateKey> element may contain the private key parameters for any public key encryption algorithm. The parameters for the RSA algorithm are specified below.

[341] This specification does not specify private key parameters for the DSA signature algorithm since the algorithm only supports signature modes and so the application of server generated keys and key recovery is of limited value.

[342] The <RSAKeyPair> element specifies the public and private parameters of an RSA key pair. The contents of the RSAKeyPair element are specified in PKCS1. The <RSAKeyPair> element contains the following parameters:

<Modulus> (Required)
The modulus.
<Exponent> (Required)
The public exponent.
<P> (Required)
The first factor, a positive integer.
<Q> (Required)
The second factor, a positive integer.
<DP> (Required)
The first factor's CRT exponent, a positive integer.
<DQ> (Required)
The second factor's CRT exponent, a positive integer.
<InverseQ> (Required)
The (first) CRT coefficient, a positive integer.
<D> (Required)
The private exponent.


Method Summary
 KeyPair getRSAKeyPair()
          Gets the key pair of this PrivateKey.
 void setRSAKeyPair(KeyPair keypair)
          Sets the key pair of this PrivateKey.
 

Method Detail

setRSAKeyPair

void setRSAKeyPair(KeyPair keypair)
                   throws XKMSException
Sets the key pair of this PrivateKey.

The private part of the key pair must be of type RSAPrivateCrtKey so that all 8 components can be filled.

Parameters:
keypair - the keypair to set
Throws:
XKMSException - if supplied keypair is not valid

getRSAKeyPair

KeyPair getRSAKeyPair()
Gets the key pair of this PrivateKey.

Returns:
the KeyPair of this PrivateKey