XCMS Toolkit

com.cms.crypto
Class XERParameterGenerator

java.lang.Object
  extended by com.cms.crypto.XERParameterGenerator
All Implemented Interfaces:
ParameterGenerator

public class XERParameterGenerator
extends java.lang.Object
implements ParameterGenerator

Generates ASN.1 "open type" algorithm parameters values encoded using the Canonical XML Encoding Rules (CXER) of ASN.1.

AES algorithm parameter definitions

The ECB algorithms have no parameters, not even NULL. The CBC and OFB algorthms have parameters of ASN.1 type AES-IV, and the CFB algoritms have parameters of type CFBParameters.

ASN.1 type AES-IV is defined as

 AES-IV ::= OCTET STRING (SIZE(16))
 
and the XML encoding of a value of this ASN.1 type is tagged as "<AES-IV> ... </AES-IV>".

ASN.1 type CFBParameters is defined as

 CFBParameters ::= SEQUENCE {
    aes-IV        AES-IV,
    numberOfBits  NumberOfBits
 }
    
 NumberOfBits ::= INTEGER(1..128)
 

TDES algorithm parameter definitions

ASN.1 type IV is defined as

    IV ::= OCTET STRING (SIZE(8))
 
and the XML encoding of a value of this ASN.1 type is tagged as "<IV> ... </IV>".

Version:
1.00 - 2006/01/25
Author:
support@phillipgriffin.com

Constructor Summary
XERParameterGenerator(CXERCodec codec)
          Constructor for XERParameterGenerator with ASN.1 encoding rules parameter.
 
Method Summary
 java.security.spec.AlgorithmParameterSpec get3DesCbcParameters(ASN1OpenType parameters)
          Gets 3DES CBC encoded open type parameters.
 java.security.spec.AlgorithmParameterSpec getAes128CbcParameters(ASN1OpenType parameters)
          Gets the ASN.1 "open type" parameters for the 128-bit AES in CBC mode algorithm encoded using CXER.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XERParameterGenerator

public XERParameterGenerator(CXERCodec codec)
Constructor for XERParameterGenerator with ASN.1 encoding rules parameter.

Parameters:
codec - ASN.1 encoding rules
Method Detail

getAes128CbcParameters

public java.security.spec.AlgorithmParameterSpec getAes128CbcParameters(ASN1OpenType parameters)
                                                                 throws CryptoException
Gets the ASN.1 "open type" parameters for the 128-bit AES in CBC mode algorithm encoded using CXER.

Specified by:
getAes128CbcParameters in interface ParameterGenerator
Parameters:
parameters - an ASN.1 "open type"
Returns:
128-bit AES with CBC algorithm parameters
Throws:
CryptoException

get3DesCbcParameters

public java.security.spec.AlgorithmParameterSpec get3DesCbcParameters(ASN1OpenType parameters)
                                                               throws CryptoException
Gets 3DES CBC encoded open type parameters.

Specified by:
get3DesCbcParameters in interface ParameterGenerator
Parameters:
parameters - an open type encoding of a value of type IV
Returns:
null no value
Throws:
CryptoException

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.