|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.asn1.structures.AlgorithmID iaik.cms.CMSAlgorithmID
public class CMSAlgorithmID
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]). |
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 java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static CMSAlgorithmID pwri_kek
(CMSAlgorithmID)CMSAlgorithmID.pwri_kek.clone()
.
public static CMSAlgorithmID aes128_CBC
AES-128
symmetric block cipher used in CBC mode.
(CMSAlgorithmID)CMSAlgorithmID.aes128_CBC.clone()
.
public static CMSAlgorithmID aes192_CBC
AES-192
symmetric block cipher used in CBC mode.
(CMSAlgorithmID)CMSAlgorithmID.aes192_CBC.clone()
.
public static CMSAlgorithmID aes256_CBC
AES-256
symmetric block cipher used in CBC mode.
(CMSAlgorithmID)CMSAlgorithmID.aes256_CBC.clone()
.
public static CMSAlgorithmID cms_aes128_wrap
CMSAESwrap
key wrap algorithm using
a 128 bit AES key as key encryption key (RFC 3394).
public static CMSAlgorithmID cms_aes192_wrap
CMSAESwrap
key wrap algorithm using
a 192 bit AES key as key encryption key (RFC 3394).
public static CMSAlgorithmID cms_aes256_wrap
CMSAESwrap
key wrap algorithm using
a 256 AES key as key encryption key (RFC 3394).
public static CMSAlgorithmID cms_camellia128_wrap
CMSCamelliaWrap
key wrap algorithm using
a 128 bit Camellia key as key encryption key (RFC 3657).
public static CMSAlgorithmID cms_camellia192_wrap
CMSCamelliaWrap
key wrap algorithm using
a 192 bit Camellia key as key encryption key (RFC 3657).
public static CMSAlgorithmID cms_camellia256_wrap
CMSCamelliaWrap
key wrap algorithm using
a 256 Camellia key as key encryption key (RFC 3657).
public static CMSAlgorithmID zlib_compress
ZLIB compression
algorithm ([RFC1950]
[RFC1951]).
(CMSAlgorithmID)CMSAlgorithmID.zlib_compress.clone()
.
public static CMSAlgorithmID cms_HMACwith3DES_wrap
HMACwith3DESwrap
key wrap algorithm for
wrapping a HMAC key with a 3DES key encryption key (RFC 3537).
(CMSAlgorithmID)CMSAlgorithmID.cms_HMACwith3DES_wrap.clone()
.
public static CMSAlgorithmID cms_HMACwithAES_wrap
HMACwithAESwrap
key wrap algorithm for
wrapping a HMAC key with a AES key encryption key (RFC 3537).
public static CMSAlgorithmID rsassaPss
RSASSA-PSS
signature
algorithm.
public static CMSAlgorithmID dhSinglePass_stdDH_sha1kdf_scheme
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.
public static CMSAlgorithmID dhSinglePass_cofactorDH_sha1kdf_scheme
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.
public static CMSAlgorithmID dhSinglePass_stdDH_sha256kdf_scheme
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.
public static CMSAlgorithmID dhSinglePass_stdDH_sha384kdf_scheme
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.
public static CMSAlgorithmID sha224
SHA-224
message digest algorithm.
public static CMSAlgorithmID ecdsa_With_SHA1
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!)
public static CMSAlgorithmID ecdsa_With_SHA224
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!)
public static CMSAlgorithmID ecdsa_With_SHA256
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!)
public static CMSAlgorithmID ecdsa_With_SHA384
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!)
public static CMSAlgorithmID ecdsa_With_SHA512
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!)
public static CMSAlgorithmID ecdsa_plain_With_SHA1
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!)
public static CMSAlgorithmID ecdsa_plain_With_SHA224
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!)
public static CMSAlgorithmID ecdsa_plain_With_SHA256
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!)
public static CMSAlgorithmID ecdsa_plain_With_SHA384
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!)
public static CMSAlgorithmID ecdsa_plain_With_SHA512
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!)
public static CMSAlgorithmID ecdsa_plain_With_RIPEMD160
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!)
public static CMSAlgorithmID aes128_CCM
public static CMSAlgorithmID aes192_CCM
public static CMSAlgorithmID aes256_CCM
public static CMSAlgorithmID aes128_GCM
public static CMSAlgorithmID aes192_GCM
public static CMSAlgorithmID aes256_GCM
Constructor Detail |
---|
public CMSAlgorithmID()
null
ObjectID and
null
parameters.
public CMSAlgorithmID(java.lang.String objectID, java.lang.String name)
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"public CMSAlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String implementationName)
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"public CMSAlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String implementationName, boolean useNULLForAbsentParameters)
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.
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 encodingpublic CMSAlgorithmID(ObjectID algorithm)
algorithm
- the ObjectID of the algorithmpublic CMSAlgorithmID(ObjectID algorithm, ASN1Object parameter)
algorithm
- the ObjectID of the algorithmparameter
- the algorithm parameterspublic CMSAlgorithmID(ASN1Object algorithmID) throws CodingException
toASN1Object()
method.
algorithmID
- the AlgorithmID as ASN1Object
CodingException
- if the ASN1Object is no AlgorithmIDMethod Detail |
---|
public void decode(ASN1Object algorithmID) throws CodingException
The supplied ASN1Object represents an already existing AlgorithmID that may
have been created by means of the toASN1Object()
method.
decode
in interface ASN1Type
decode
in class AlgorithmID
algorithmID
- the AlgorithmID as ASN1Object
CodingException
- if the ASN1Object is no AlgorithmIDpublic ASN1Object toASN1Object(boolean useNULLForAbsentParameters)
toASN1Object
in class AlgorithmID
useNULLForAbsentParameters
- whether to encode absent parameters as NULL or omit the parameters
component
public byte[] getEncoded()
public void clearEncoded()
toASN1Object()
or
getEncoded()
will build the internal ASN.1 structure
anew. This may be required when any algorithm parameters have been set
from outside.
public void setAlgorithmParameters(java.security.AlgorithmParameters parameters)
java.security.AlgorithmParameters
object.
setAlgorithmParameters
in class AlgorithmID
parameters
- the parameters of the algorithmpublic void setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters, java.lang.String provider) throws java.security.InvalidAlgorithmParameterException
AlgorithmParameterSpec
object.
setAlgorithmParameterSpec
in class AlgorithmID
parameters
- the parameters to be setprovider
- The JCA provider to use for the parameter encoding. If
null
, it uses the JCA defaults.
java.security.InvalidAlgorithmParameterException
- if the parameters cannot be set (e.g.
are not suitable for the algorithm represented
by this AlgorithmID)public void setParameter(ASN1Object parameters)
setParameter
in class AlgorithmID
parameters
- the parameters of the algorithm
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |