iaik.security.ssl
Class IaikProvider

java.lang.Object
  |
  +--iaik.security.ssl.SecurityProvider
        |
        +--iaik.security.ssl.IaikProvider

public class IaikProvider
extends SecurityProvider

This class implements the SecurityProvider interface for the provider IAIK. Note that the IAIK provider only uses implementations from the IAIK JCE and not from any other providers that may be installed.

See Also:
SecurityProvider

Fields inherited from class iaik.security.ssl.SecurityProvider
ALG_CIPHER_3DES, ALG_CIPHER_DES, ALG_CIPHER_IDEA, ALG_CIPHER_RC2, ALG_CIPHER_RC4, ALG_CIPHER_RSA, ALG_CIPHER_RSA_DECRYPT, ALG_CIPHER_RSA_ENCRYPT, ALG_CIPHER_RSA_ENCRYPT_SSL2, ALG_CIPHER_RSA_SIGN, ALG_CIPHER_RSA_VERIFY, ALG_DIGEST_MD5, ALG_DIGEST_SHA, ALG_HMAC_MD5, ALG_HMAC_SHA, ALG_KEYEX_DH, ALG_KEYEX_DSA, ALG_KEYEX_DSA_CLIENT, ALG_KEYEX_RSA, ALG_KEYPAIR_RSA, ALG_SIGNATURE_MD5RSA, ALG_SIGNATURE_RAWDSA, ALG_SIGNATURE_SHADSA, CIPHER_DECRYPT, CIPHER_ENCRYPT, CIPHER_NONE, providerName, SIGNATURE_NONE, SIGNATURE_SIGN, SIGNATURE_VERIFY
 
Constructor Summary
IaikProvider()
          Default Constructor.
 
Method Summary
protected  Cipher getCipher(java.lang.String algorithm, int mode, Key key, AlgorithmParameterSpec param, SecureRandom random)
          Return an implementation for the requested algorithm from the IAIK provider.
protected  DHPrivateKey getDHPrivateKey(java.math.BigInteger x, java.math.BigInteger p, java.math.BigInteger g)
          This method returns an IAIK DHPrivateKey instance created from the given values.
protected  DHPublicKey getDHPublicKey(java.math.BigInteger y, java.math.BigInteger p, java.math.BigInteger g)
          This method returns an IAIK DHPublicKey instance created from the given values.
protected  byte[] getEncodedPrincipal(Principal principal)
          This method returns a DER encoded Principal assuming it is an IAIK Name object.
protected  Principal getPrincipal(byte[] array)
          This method returns a Principal (IAIK Name object) created from a DER encoded byte array.
protected  RSAPublicKey getRSAPublicKey(java.math.BigInteger modulus, java.math.BigInteger exponent)
          This method returns an IAIK RSAPublicKey instance created from the given values.
protected  SecureRandom getSecureRandom()
          Return an instance of the default SecureRandom class set in iaik.security.random.SecRandom.
protected  Signature getSignature(java.lang.String algorithm, int mode, Key key, SecureRandom random)
          Return an implementation for the requested algorithm from the IAIK provider.
protected  X509Certificate getX509Certificate(byte[] array)
          This method returns an IAIK X509Certificate instance created from a DER encoded byte array.
 
Methods inherited from class iaik.security.ssl.SecurityProvider
getKeyPairGenerator, getMac, getMessageDigest, getSecurityProvider, isImplemented, setSecurityProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IaikProvider

public IaikProvider()
Default Constructor. Tries to add the provider IAIK.
Method Detail

getDHPublicKey

protected DHPublicKey getDHPublicKey(java.math.BigInteger y,
                                     java.math.BigInteger p,
                                     java.math.BigInteger g)
This method returns an IAIK DHPublicKey instance created from the given values. For more documentation see the superclass SecurityProvider.
Overrides:
getDHPublicKey in class SecurityProvider
Tags copied from class: SecurityProvider
Parameters:
y - the public value y
p - the prime modulus p
g - the base generator g
Returns:
the new created DHPublicKey

getDHPrivateKey

protected DHPrivateKey getDHPrivateKey(java.math.BigInteger x,
                                       java.math.BigInteger p,
                                       java.math.BigInteger g)
This method returns an IAIK DHPrivateKey instance created from the given values. For more documentation see the superclass SecurityProvider.
Overrides:
getDHPrivateKey in class SecurityProvider
Tags copied from class: SecurityProvider
Parameters:
x - the private value x
p - the prime modulus p
g - the base generator g
Returns:
the new created DHPrivateKey

getRSAPublicKey

protected RSAPublicKey getRSAPublicKey(java.math.BigInteger modulus,
                                       java.math.BigInteger exponent)
This method returns an IAIK RSAPublicKey instance created from the given values. For more documentation see the superclass SecurityProvider.
Overrides:
getRSAPublicKey in class SecurityProvider
Tags copied from class: SecurityProvider
Parameters:
modulus - the modulus
publicExponent - the public exponent
Returns:
the new created RSAPublicKey

getX509Certificate

protected X509Certificate getX509Certificate(byte[] array)
                                      throws CertificateException
This method returns an IAIK X509Certificate instance created from a DER encoded byte array. For more documentation see the superclass SecurityProvider.
Overrides:
getX509Certificate in class SecurityProvider
Tags copied from class: SecurityProvider
Parameters:
array - a X509Certificate as DER encoded byte array
Returns:
the created X509Certificate

getPrincipal

protected Principal getPrincipal(byte[] array)
                          throws java.lang.Exception
This method returns a Principal (IAIK Name object) created from a DER encoded byte array. For more documentation see the superclass SecurityProvider.
Overrides:
getPrincipal in class SecurityProvider
Tags copied from class: SecurityProvider
Parameters:
array - a Name (Principal) as DER encoded byte array
Returns:
the created Name (Principal)

getEncodedPrincipal

protected byte[] getEncodedPrincipal(Principal principal)
This method returns a DER encoded Principal assuming it is an IAIK Name object. For more documentation see the superclass SecurityProvider.
Overrides:
getEncodedPrincipal in class SecurityProvider
Tags copied from class: SecurityProvider
Parameters:
principal - the Name (Principal) to encode
Returns:
the Name (Principal) as DER encoded byte array

getSignature

protected Signature getSignature(java.lang.String algorithm,
                                 int mode,
                                 Key key,
                                 SecureRandom random)
                          throws java.lang.Exception
Return an implementation for the requested algorithm from the IAIK provider. For more documentation see the superclass SecurityProvider.
Overrides:
getSignature in class SecurityProvider

getCipher

protected Cipher getCipher(java.lang.String algorithm,
                           int mode,
                           Key key,
                           AlgorithmParameterSpec param,
                           SecureRandom random)
                    throws java.lang.Exception
Return an implementation for the requested algorithm from the IAIK provider. For more documentation see the superclass SecurityProvider.
Overrides:
getCipher in class SecurityProvider

getSecureRandom

protected SecureRandom getSecureRandom()
Return an instance of the default SecureRandom class set in iaik.security.random.SecRandom. For more documentation see the superclass SecurityProvider.
Overrides:
getSecureRandom in class SecurityProvider