iaik.cms
Class CMSAlgorithmID

java.lang.Object
  extended by iaik.asn1.structures.AlgorithmID
      extended by iaik.cms.CMSAlgorithmID
All Implemented Interfaces:
ASN1Type, java.lang.Cloneable

public class CMSAlgorithmID
extends AlgorithmID

Extends the IAIK-JCE AlgorithmID class to register algorithm identifiers that have not been registered by IAIK-JCE prior 3.1.


Field Summary
static CMSAlgorithmID aes128_CBC
          Creates an AlgorithmID for the AES-128 symmetric block cipher used in CBC mode.
static CMSAlgorithmID aes128_CCM
          Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode with 128 bit keys (aes128-CCM authenticated encryption algorithm id according RFC 5084).
static CMSAlgorithmID aes128_GCM
          Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode with 128 bit keys (aes128-GCM authenticated encryption algorithm id according RFC 5084).
static CMSAlgorithmID aes192_CBC
          Creates an AlgorithmID for the AES-192 symmetric block cipher used in CBC mode.
static CMSAlgorithmID aes192_CCM
          Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode with 192 bit keys (aes192-CCM authenticated encryption algorithm id according RFC 5084).
static CMSAlgorithmID aes192_GCM
          Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode with 192 bit keys (aes192-GCM authenticated encryption algorithm id according RFC 5084).
static CMSAlgorithmID aes256_CBC
          Creates an AlgorithmID for the AES-256 symmetric block cipher used in CBC mode.
static CMSAlgorithmID aes256_CCM
          Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode with 256 bit keys (aes256-CCM authenticated encryption algorithm id according RFC 5084).
static CMSAlgorithmID aes256_GCM
          Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode with 256 bit keys (aes256-GCM authenticated encryption algorithm id according RFC 5084).
static CMSAlgorithmID cms_aes128_wrap
          Creates an AlgorithmID for the CMSAESwrap key wrap algorithm using a 128 bit AES key as key encryption key (RFC 3394).
static CMSAlgorithmID cms_aes192_wrap
          Creates an AlgorithmID for the CMSAESwrap key wrap algorithm using a 192 bit AES key as key encryption key (RFC 3394).
static CMSAlgorithmID cms_aes256_wrap
          Creates an AlgorithmID for the CMSAESwrap key wrap algorithm using a 256 AES key as key encryption key (RFC 3394).
static CMSAlgorithmID cms_camellia128_wrap
          Creates an AlgorithmID for the CMSCamelliaWrap key wrap algorithm using a 128 bit Camellia key as key encryption key (RFC 3657).
static CMSAlgorithmID cms_camellia192_wrap
          Creates an AlgorithmID for the CMSCamelliaWrap key wrap algorithm using a 192 bit Camellia key as key encryption key (RFC 3657).
static CMSAlgorithmID cms_camellia256_wrap
          Creates an AlgorithmID for the CMSCamelliaWrap key wrap algorithm using a 256 Camellia key as key encryption key (RFC 3657).
static CMSAlgorithmID cms_HMACwith3DES_wrap
          Creates an AlgorithmID for the HMACwith3DESwrap key wrap algorithm for wrapping a HMAC key with a 3DES key encryption key (RFC 3537).
static CMSAlgorithmID cms_HMACwithAES_wrap
          Creates an AlgorithmID an AlgorithmID for the HMACwithAESwrap key wrap algorithm for wrapping a HMAC key with a AES key encryption key (RFC 3537).
static CMSAlgorithmID dhSinglePass_cofactorDH_sha1kdf_scheme
          Creates an AlgorithmID for the RFC 3278 dhSinglePass-cofactorDH-sha1kdf-scheme key encryption algorithm for using the cofactor ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-1.
static CMSAlgorithmID dhSinglePass_stdDH_sha1kdf_scheme
          Creates an AlgorithmID for the RFC 3278 dhSinglePass-stdDH-sha1kdf-scheme key encryption algorithm for using the standard ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-1.
static CMSAlgorithmID dhSinglePass_stdDH_sha256kdf_scheme
          Creates an AlgorithmID for the RFC 5008 Suite B dhSinglePass-stdDH-sha256kdf-scheme key encryption algorithm for using the standard ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-256.
static CMSAlgorithmID dhSinglePass_stdDH_sha384kdf_scheme
          Creates an AlgorithmID for the RFC 5008 Suite B dhSinglePass-stdDH-sha384kdf-scheme key encryption algorithm for using the standard ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-384.
static CMSAlgorithmID ecdsa_plain_With_RIPEMD160
          Creates an CMSAlgorithmID for the ecdsa-plain-RIPEMD160 signature algorithm as defined by the German BSI Technical Guideline TR-03111.
static CMSAlgorithmID ecdsa_plain_With_SHA1
          Creates an CMSAlgorithmID for the ecdsa-plain-SHA1 signature algorithm as defined by the German BSI Technical Guideline TR-03111.
static CMSAlgorithmID ecdsa_plain_With_SHA224
          Creates an CMSAlgorithmID for the ecdsa-plain-SHA224 signature algorithm as defined by the German BSI Technical Guideline TR-03111.
static CMSAlgorithmID ecdsa_plain_With_SHA256
          Creates an CMSAlgorithmID for the ecdsa-plain-SHA256 signature algorithm as defined by the German BSI Technical Guideline TR-03111.
static CMSAlgorithmID ecdsa_plain_With_SHA384
          Creates an CMSAlgorithmID for the ecdsa-plain-SHA384 signature algorithm as defined by the German BSI Technical Guideline TR-03111.
static CMSAlgorithmID ecdsa_plain_With_SHA512
          Creates an CMSAlgorithmID for the ecdsa-plain-SHA512 signature algorithm as defined by the German BSI Technical Guideline TR-03111.
static CMSAlgorithmID ecdsa_With_SHA1
          Creates an CMSAlgorithmID for the ecdsa-with-SHA1 signature algorithm.
static CMSAlgorithmID ecdsa_With_SHA224
          Creates an CMSAlgorithmID for the ecdsa-with-SHA224 signature algorithm as specified by X9.62:2005.
static CMSAlgorithmID ecdsa_With_SHA256
          Creates an CMSAlgorithmID for the ecdsa-with-SHA256 signature algorithm as specified by X9.62:2005.
static CMSAlgorithmID ecdsa_With_SHA384
          Creates an CMSAlgorithmID for the ecdsa-with-SHA384 signature algorithm as specified by X9.62:2005.
static CMSAlgorithmID ecdsa_With_SHA512
          Creates an CMSAlgorithmID for the ecdsa-with-SHA512 signature algorithm as specified by X9.62:2005.
static CMSAlgorithmID pwri_kek
          Creates an AlgorithmID for the CMS PWRI-KEK key wrap algorithm for wrapping a content encryption key with a key derived from some password (RFC 3211, Password-based Encryption for CMS).
static CMSAlgorithmID rsassaPss
          Creates an AlgorithmID for the PKCS#1v2.1 RSASSA-PSS signature algorithm.
static CMSAlgorithmID sha224
          Creates an AlgorithmID for the SHA-224 message digest algorithm.
static CMSAlgorithmID zlib_compress
          Creates an AlgorithmID for the ZLIB compression algorithm ([RFC1950] [RFC1951]).
 
Fields inherited from class iaik.asn1.structures.AlgorithmID
aes_CBC_CMAC_128, aes_CBC_CMAC_192, aes_CBC_CMAC_256, aes128_wrap_pad, aes192_wrap_pad, aes256_wrap_pad, algorithms, arcfour, camellia128_CBC, camellia192_CBC, camellia256_CBC, cast5_CBC, chacha20Poly1305, cms_3DES_wrap, cms_cast5_wrap, cms_idea_wrap, cms_rc2_wrap, des_CBC, des_EDE3_CBC, dhKeyAgreement, dhSinglePass_cofactorDH_sha224kdf_scheme, dhSinglePass_cofactorDH_sha256kdf_scheme, dhSinglePass_cofactorDH_sha384kdf_scheme, dhSinglePass_cofactorDH_sha512kdf_scheme, dhSinglePass_stdDH_hkdf_sha256_scheme, dhSinglePass_stdDH_hkdf_sha384_scheme, dhSinglePass_stdDH_hkdf_sha512_scheme, dhSinglePass_stdDH_sha224kdf_scheme, dhSinglePass_stdDH_sha512kdf_scheme, dsa, dsa_, dsa_With_SHA1, dsaWithSHA, dsaWithSHA1, dsaWithSHA1_, dsaWithSHA224, dsaWithSHA256, dsaWithSHA3_224, dsaWithSHA3_256, dsaWithSHA3_384, dsaWithSHA3_512, dsaWithSHA384, dsaWithSHA512, ecDH, ecdsa, ecdsa_With_SHA3_224, ecdsa_With_SHA3_256, ecdsa_With_SHA3_384, ecdsa_With_SHA3_512, ecka_eg_X963KDF_SHA256, ecka_eg_X963KDF_SHA384, ecka_eg_X963KDF_SHA512, ecPublicKey, ed25519, ed448, elGamal, esdh, esdhKeyAgreement, gost3410, gost3411, hkdf_with_SHA256, hkdf_with_SHA384, hkdf_with_SHA512, hMAC_GOST, hMAC_MD5, hMAC_RIPEMD160, hMAC_SHA1, hMAC_SHA1_, hMAC_SHA224, hMAC_SHA256, hMAC_SHA3_224, hMAC_SHA3_256, hMAC_SHA3_384, hMAC_SHA3_512, hMAC_SHA384, hMAC_SHA512, idea_CBC, kdf1, kdf2, kdf3, md2, md2WithRSAEncryption, md4, md4WithRSAEncryption, md5, md5WithRSAEncryption, mgf1, pbes2, pbeWithMD5AndDES_CBC, pbeWithSHAAnd128BitRC2_CBC, pbeWithSHAAnd128BitRC4, pbeWithSHAAnd2_KeyTripleDES_CBC, pbeWithSHAAnd3_KeyTripleDES_CBC, pbeWithSHAAnd40BitRC2_CBC, pbeWithSHAAnd40BitRC4, pbkdf2, pSpecified, rc2_CBC, rc4, rc5_CBC, ripeMd128, ripeMd128_ISO, ripeMd160, ripeMd160_ISO, rsa, rsaEncryption, rsaesOAEP, rsaKem, rsaSignatureWithRipemd128, rsaSignatureWithRipemd160, rsaSignatureWithRipemd256, sha, sha1, sha1WithRSAEncryption, sha1WithRSAEncryption_, sha224WithRSAEncryption, sha256, sha256WithRSAEncryption, sha3_224, sha3_224WithRSAEncryption, sha3_256, sha3_256WithRSAEncryption, sha3_384, sha3_384WithRSAEncryption, sha3_512, sha3_512WithRSAEncryption, sha384, sha384WithRSAEncryption, sha512, sha512_224, sha512_224WithRSAEncryption, sha512_256, sha512_256WithRSAEncryption, sha512WithRSAEncryption, shake128, shake128Len, shake256, shake256Len, sigS_ISO9796_2rndWithripemd160, sigS_ISO9796_2rndWithrsa, sigS_ISO9796_2rndWithsha1, sigS_ISO9796_2Withripemd160, sigS_ISO9796_2Withrsa, sigS_ISO9796_2Withsha1, ssdhKeyAgreement, x25519, x448, x9_63_kdf
 
Constructor Summary
CMSAlgorithmID()
          Default constructor.
CMSAlgorithmID(ASN1Object algorithmID)
          Creates a new AlgorithmID from an ASN1Object.
CMSAlgorithmID(ObjectID algorithm)
          Creates a new AlgorithmID from an ObjectID.
CMSAlgorithmID(ObjectID algorithm, ASN1Object parameter)
          Creates a new AlgorithmID from an ObjectID and algorithm parameters.
CMSAlgorithmID(java.lang.String objectID, java.lang.String name)
          Creates a new AlgorithmID from an object identifier and a name.
CMSAlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String implementationName)
          Creates a new AlgorithmID from an object identifier, a name and and implementation name.
CMSAlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String implementationName, boolean useNULLForAbsentParameters)
          Creates a new AlgorithmID from an object identifier, a name and and implementation name.
 
Method Summary
 void clearEncoded()
          Clears the AlgorithmID encoding.
 void decode(ASN1Object algorithmID)
          Decodes an AlgorithmID from the given ASN1Object.
 byte[] getEncoded()
          Returns the DER encoded AlgorithmID.
 void setAlgorithmParameters(java.security.AlgorithmParameters parameters)
          Sets the parameters of the algorithm.
 void setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters, java.lang.String provider)
          Sets the parameters of the algorithm.
 void setParameter(ASN1Object parameters)
          Sets the parameters of the algorithm.
 ASN1Object toASN1Object(boolean useNULLForAbsentParameters)
          Returns the AlgorithmID as an (SEQUENCE) ASN1Object.
 
Methods inherited from class iaik.asn1.structures.AlgorithmID
changeObjectID, changeOIDString, clone, encodeAbsentParametersAsNull, equals, equals, getAlgorithm, getAlgorithmID, getAlgorithmParameterGeneratorInstance, getAlgorithmParameterGeneratorInstance, getAlgorithmParameterGeneratorInstance, getAlgorithmParameters, getAlgorithmParameters, getAlgorithmParameters, getAlgorithmParameters, getAlgorithmParametersInstance, getAlgorithmParameterSpec, getAlgorithmParameterSpec, getAlgorithmParameterSpec, getAlgorithmParameterSpec, getAlgorithmParameterSpec, getCipherInstance, getCipherInstance, getCipherInstance, getDoNotIncludeParameters, getImplementationName, getImplementationNames, getInstance, getInstance, getJcaStandardName, getKeyAgreementInstance, getKeyAgreementInstance, getKeyAgreementInstance, getKeyFactoryInstance, getKeyFactoryInstance, getKeyFactoryInstance, getKeyGeneratorInstance, getKeyGeneratorInstance, getKeyGeneratorInstance, getKeyPairGeneratorInstance, getKeyPairGeneratorInstance, getKeyPairGeneratorInstance, getMacInstance, getMacInstance, getMacInstance, getMaskGenerationAlgorithmInstance, getMaskGenerationAlgorithmInstance, getMaskGenerationAlgorithmInstance, getMessageDigestInstance, getMessageDigestInstance, getMessageDigestInstance, getName, getParameter, getRawImplementationName, getSecretKeyFactoryInstance, getSecretKeyFactoryInstance, getSecretKeyFactoryInstance, getSignatureInstance, getSignatureInstance, getSignatureInstance, hashCode, hasParameters, register, setAlgorithmParameterSpec, setAlgorithmParameterSpec, setDefaultEncodeAbsentParametersAsNull, setDoIncludeParameters, setDoNotIncludeParameters, toASN1Object, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

pwri_kek

public static CMSAlgorithmID pwri_kek
Creates an AlgorithmID for the CMS PWRI-KEK key wrap algorithm for wrapping a content encryption key with a key derived from some password (RFC 3211, Password-based Encryption for CMS). For addressing it, use (CMSAlgorithmID)CMSAlgorithmID.pwri_kek.clone().


aes128_CBC

public static CMSAlgorithmID aes128_CBC
Creates an AlgorithmID for the AES-128 symmetric block cipher used in CBC mode. For addressing it, use (CMSAlgorithmID)CMSAlgorithmID.aes128_CBC.clone().


aes192_CBC

public static CMSAlgorithmID aes192_CBC
Creates an AlgorithmID for the AES-192 symmetric block cipher used in CBC mode. For addressing it, use (CMSAlgorithmID)CMSAlgorithmID.aes192_CBC.clone().


aes256_CBC

public static CMSAlgorithmID aes256_CBC
Creates an AlgorithmID for the AES-256 symmetric block cipher used in CBC mode. For addressing it, use (CMSAlgorithmID)CMSAlgorithmID.aes256_CBC.clone().


cms_aes128_wrap

public static CMSAlgorithmID cms_aes128_wrap
Creates an AlgorithmID for the CMSAESwrap key wrap algorithm using a 128 bit AES key as key encryption key (RFC 3394).


cms_aes192_wrap

public static CMSAlgorithmID cms_aes192_wrap
Creates an AlgorithmID for the CMSAESwrap key wrap algorithm using a 192 bit AES key as key encryption key (RFC 3394).


cms_aes256_wrap

public static CMSAlgorithmID cms_aes256_wrap
Creates an AlgorithmID for the CMSAESwrap key wrap algorithm using a 256 AES key as key encryption key (RFC 3394).


cms_camellia128_wrap

public static CMSAlgorithmID cms_camellia128_wrap
Creates an AlgorithmID for the CMSCamelliaWrap key wrap algorithm using a 128 bit Camellia key as key encryption key (RFC 3657).


cms_camellia192_wrap

public static CMSAlgorithmID cms_camellia192_wrap
Creates an AlgorithmID for the CMSCamelliaWrap key wrap algorithm using a 192 bit Camellia key as key encryption key (RFC 3657).


cms_camellia256_wrap

public static CMSAlgorithmID cms_camellia256_wrap
Creates an AlgorithmID for the CMSCamelliaWrap key wrap algorithm using a 256 Camellia key as key encryption key (RFC 3657).


zlib_compress

public static CMSAlgorithmID zlib_compress
Creates an AlgorithmID for the ZLIB compression algorithm ([RFC1950] [RFC1951]). For addressing it, use (CMSAlgorithmID)CMSAlgorithmID.zlib_compress.clone().


cms_HMACwith3DES_wrap

public static CMSAlgorithmID cms_HMACwith3DES_wrap
Creates an AlgorithmID for the HMACwith3DESwrap key wrap algorithm for wrapping a HMAC key with a 3DES key encryption key (RFC 3537). For addressing it, use (CMSAlgorithmID)CMSAlgorithmID.cms_HMACwith3DES_wrap.clone().


cms_HMACwithAES_wrap

public static CMSAlgorithmID cms_HMACwithAES_wrap
Creates an AlgorithmID an AlgorithmID for the HMACwithAESwrap key wrap algorithm for wrapping a HMAC key with a AES key encryption key (RFC 3537).


rsassaPss

public static CMSAlgorithmID rsassaPss
Creates an AlgorithmID for the PKCS#1v2.1 RSASSA-PSS signature algorithm.


dhSinglePass_stdDH_sha1kdf_scheme

public static CMSAlgorithmID dhSinglePass_stdDH_sha1kdf_scheme
Creates an AlgorithmID for the RFC 3278 dhSinglePass-stdDH-sha1kdf-scheme key encryption algorithm for using the standard ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-1.


dhSinglePass_cofactorDH_sha1kdf_scheme

public static CMSAlgorithmID dhSinglePass_cofactorDH_sha1kdf_scheme
Creates an AlgorithmID for the RFC 3278 dhSinglePass-cofactorDH-sha1kdf-scheme key encryption algorithm for using the cofactor ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-1.


dhSinglePass_stdDH_sha256kdf_scheme

public static CMSAlgorithmID dhSinglePass_stdDH_sha256kdf_scheme
Creates an AlgorithmID for the RFC 5008 Suite B dhSinglePass-stdDH-sha256kdf-scheme key encryption algorithm for using the standard ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-256.


dhSinglePass_stdDH_sha384kdf_scheme

public static CMSAlgorithmID dhSinglePass_stdDH_sha384kdf_scheme
Creates an AlgorithmID for the RFC 5008 Suite B dhSinglePass-stdDH-sha384kdf-scheme key encryption algorithm for using the standard ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-384.


sha224

public static CMSAlgorithmID sha224
Creates an AlgorithmID for the SHA-224 message digest algorithm.


ecdsa_With_SHA1

public static CMSAlgorithmID ecdsa_With_SHA1
Creates an CMSAlgorithmID for the ecdsa-with-SHA1 signature algorithm.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_With_SHA224

public static CMSAlgorithmID ecdsa_With_SHA224
Creates an CMSAlgorithmID for the ecdsa-with-SHA224 signature algorithm as specified by X9.62:2005.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_With_SHA256

public static CMSAlgorithmID ecdsa_With_SHA256
Creates an CMSAlgorithmID for the ecdsa-with-SHA256 signature algorithm as specified by X9.62:2005.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_With_SHA384

public static CMSAlgorithmID ecdsa_With_SHA384
Creates an CMSAlgorithmID for the ecdsa-with-SHA384 signature algorithm as specified by X9.62:2005.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_With_SHA512

public static CMSAlgorithmID ecdsa_With_SHA512
Creates an CMSAlgorithmID for the ecdsa-with-SHA512 signature algorithm as specified by X9.62:2005.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_plain_With_SHA1

public static CMSAlgorithmID ecdsa_plain_With_SHA1
Creates an CMSAlgorithmID for the ecdsa-plain-SHA1 signature algorithm as defined by the German BSI Technical Guideline TR-03111. The signature value is encoded as (r || s) and not wrapped into a SEQUENCE as done by X9.62. If the hash length is larger than the domain parameter length the hash is not truncated like in X9.62; rather it is reduced modulo n, the order of the base point G.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_plain_With_SHA224

public static CMSAlgorithmID ecdsa_plain_With_SHA224
Creates an CMSAlgorithmID for the ecdsa-plain-SHA224 signature algorithm as defined by the German BSI Technical Guideline TR-03111. The signature value is encoded as (r || s) and not wrapped into a SEQUENCE as done by X9.62. If the hash length is larger than the domain parameter length the hash is not truncated like in X9.62; rather it is reduced modulo n, the order of the base point G.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_plain_With_SHA256

public static CMSAlgorithmID ecdsa_plain_With_SHA256
Creates an CMSAlgorithmID for the ecdsa-plain-SHA256 signature algorithm as defined by the German BSI Technical Guideline TR-03111. The signature value is encoded as (r || s) and not wrapped into a SEQUENCE as done by X9.62. If the hash length is larger than the domain parameter length the hash is not truncated like in X9.62; rather it is reduced modulo n, the order of the base point G.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_plain_With_SHA384

public static CMSAlgorithmID ecdsa_plain_With_SHA384
Creates an CMSAlgorithmID for the ecdsa-plain-SHA384 signature algorithm as defined by the German BSI Technical Guideline TR-03111. The signature value is encoded as (r || s) and not wrapped into a SEQUENCE as done by X9.62. If the hash length is larger than the domain parameter length the hash is not truncated like in X9.62; rather it is reduced modulo n, the order of the base point G.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_plain_With_SHA512

public static CMSAlgorithmID ecdsa_plain_With_SHA512
Creates an CMSAlgorithmID for the ecdsa-plain-SHA512 signature algorithm as defined by the German BSI Technical Guideline TR-03111. The signature value is encoded as (r || s) and not wrapped into a SEQUENCE as done by X9.62. If the hash length is larger than the domain parameter length the hash is not truncated like in X9.62; rather it is reduced modulo n, the order of the base point G.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


ecdsa_plain_With_RIPEMD160

public static CMSAlgorithmID ecdsa_plain_With_RIPEMD160
Creates an CMSAlgorithmID for the ecdsa-plain-RIPEMD160 signature algorithm as defined by the German BSI Technical Guideline TR-03111. The signature value is encoded as (r || s) and not wrapped into a SEQUENCE as done by X9.62. If the hash length is larger than the domain parameter length the hash is not truncated like in X9.62; rather it is reduced modulo n, the order of the base point G.

Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)


aes128_CCM

public static CMSAlgorithmID aes128_CCM
Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode with 128 bit keys (aes128-CCM authenticated encryption algorithm id according RFC 5084).


aes192_CCM

public static CMSAlgorithmID aes192_CCM
Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode with 192 bit keys (aes192-CCM authenticated encryption algorithm id according RFC 5084).


aes256_CCM

public static CMSAlgorithmID aes256_CCM
Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode with 256 bit keys (aes256-CCM authenticated encryption algorithm id according RFC 5084).


aes128_GCM

public static CMSAlgorithmID aes128_GCM
Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode with 128 bit keys (aes128-GCM authenticated encryption algorithm id according RFC 5084).


aes192_GCM

public static CMSAlgorithmID aes192_GCM
Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode with 192 bit keys (aes192-GCM authenticated encryption algorithm id according RFC 5084).


aes256_GCM

public static CMSAlgorithmID aes256_GCM
Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode with 256 bit keys (aes256-GCM authenticated encryption algorithm id according RFC 5084).

Constructor Detail

CMSAlgorithmID

public CMSAlgorithmID()
Default constructor. Creates an AlgorithmID object with null ObjectID and null parameters.


CMSAlgorithmID

public CMSAlgorithmID(java.lang.String objectID,
                      java.lang.String name)
Creates a new AlgorithmID from an object identifier and a name. The AlgorithmID parameters are set to NULL.

Parameters:
objectID - the object identifier of the algorithm as a string; e.g. "2.5.8.1.1"
name - the name for this object identifier; e.g "rsa"

CMSAlgorithmID

public CMSAlgorithmID(java.lang.String objectID,
                      java.lang.String name,
                      java.lang.String implementationName)
Creates a new AlgorithmID from an object identifier, a name and and implementation name. The AlgorithmID parameters are set to NULL.

Parameters:
objectID - the object identifier of the algorithm as a string; e.g. "2.16.840.1.101.3.4.1.2"
name - the name for this object identifier; e.g "AES128-CBC"
implementationName - the internal implementation name; e.g. "AES/CBC/PKCS5Padding"

CMSAlgorithmID

public CMSAlgorithmID(java.lang.String objectID,
                      java.lang.String name,
                      java.lang.String implementationName,
                      boolean useNULLForAbsentParameters)
Creates a new AlgorithmID from an object identifier, a name and and implementation name. The AlgorithmID parameters are set to NULL.

An application (e.g. X.509) may require to omit the parameters field in the AlgorihmID encoding of some specific algorithm (e.g. dsaWithSHA1, ecdsaWithSHA1) if no parameters are set. To decide whether absent parameters shall be encoded as ASN.1 NULL object or shall be omitted from the encoding at all, set parameter useNULLForAbsentParameters to true or false. Note that per default absent parameters are encoded as NULL by the static registered AlgorithmIDs of this class, except for those algorithms (like dsaWithSHA1, ecdsaWithSHA1) where it is explicitly announced by the Javadoc that absent parameters are omitted.

Parameters:
objectID - the object identifier of the algorithm as a string; e.g. "2.16.840.1.101.3.4.1.2"
name - the name for this object identifier; e.g "AES128-CBC"
implementationName - the internal implementation name; e.g. "AES/CBC/PKCS5Padding"
useNULLForAbsentParameters - true if absent parameters shall be encoded as NULL, false if absent parameters shall be omitted from the encoding

CMSAlgorithmID

public CMSAlgorithmID(ObjectID algorithm)
Creates a new AlgorithmID from an ObjectID. The parameters are set to NULL.

Parameters:
algorithm - the ObjectID of the algorithm

CMSAlgorithmID

public CMSAlgorithmID(ObjectID algorithm,
                      ASN1Object parameter)
Creates a new AlgorithmID from an ObjectID and algorithm parameters.

Parameters:
algorithm - the ObjectID of the algorithm
parameter - the algorithm parameters

CMSAlgorithmID

public CMSAlgorithmID(ASN1Object algorithmID)
               throws CodingException
Creates a new AlgorithmID from an ASN1Object. The supplied ASN1Object represents an already existing AlgorithmID that may have been created by means of the toASN1Object() method.

Parameters:
algorithmID - the AlgorithmID as ASN1Object
Throws:
CodingException - if the ASN1Object is no AlgorithmID
Method Detail

decode

public void decode(ASN1Object algorithmID)
            throws CodingException
Decodes an AlgorithmID from the given ASN1Object.

The supplied ASN1Object represents an already existing AlgorithmID that may have been created by means of the toASN1Object() method.

Specified by:
decode in interface ASN1Type
Overrides:
decode in class AlgorithmID
Parameters:
algorithmID - the AlgorithmID as ASN1Object
Throws:
CodingException - if the ASN1Object is no AlgorithmID

toASN1Object

public ASN1Object toASN1Object(boolean useNULLForAbsentParameters)
Returns the AlgorithmID as an (SEQUENCE) ASN1Object.

Overrides:
toASN1Object in class AlgorithmID
Parameters:
useNULLForAbsentParameters - whether to encode absent parameters as NULL or omit the parameters component
Returns:
the AlgorithmID as ASN1Object

getEncoded

public byte[] getEncoded()
Returns the DER encoded AlgorithmID.

Returns:
the DER encoded AlgorithmID

clearEncoded

public void clearEncoded()
Clears the AlgorithmID encoding.
This method maybe called to clear the parsed encoding so that any following call to toASN1Object() or getEncoded() will build the internal ASN.1 structure anew. This may be required when any algorithm parameters have been set from outside.


setAlgorithmParameters

public void setAlgorithmParameters(java.security.AlgorithmParameters parameters)
Sets the parameters of the algorithm. The parameters have to be specified as java.security.AlgorithmParameters object.

Overrides:
setAlgorithmParameters in class AlgorithmID
Parameters:
parameters - the parameters of the algorithm

setAlgorithmParameterSpec

public void setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters,
                                      java.lang.String provider)
                               throws java.security.InvalidAlgorithmParameterException
Sets the parameters of the algorithm. The parameters have to be specified as AlgorithmParameterSpec object.

Overrides:
setAlgorithmParameterSpec in class AlgorithmID
Parameters:
parameters - the parameters to be set
provider - The JCA provider to use for the parameter encoding. If null, it uses the JCA defaults.
Throws:
java.security.InvalidAlgorithmParameterException - if the parameters cannot be set (e.g. are not suitable for the algorithm represented by this AlgorithmID)

setParameter

public void setParameter(ASN1Object parameters)
Sets the parameters of the algorithm. The parameters have to be specified as ASN1Object.

Overrides:
setParameter in class AlgorithmID
Parameters:
parameters - the parameters of the algorithm

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC