public final class ECIESParameterSpec extends Object implements AlgorithmParameterSpec
References:
[1] Certicom Research. 2009. Standards for Efficient Cryptography - SEC 1: Elliptic Curve Cryptography v2.0
ECIES
,
AlgorithmParameterSpec
Modifier and Type | Field and Description |
---|---|
static iaik.asn1.structures.AlgorithmID |
DEFAULT_KDF_MD
Default KDF-message digest
|
static String |
DEFAULT_KEY_AGREEMENT
Default KeyAgreement protocol
|
static String |
DEFAULT_MAC
Default MAC function
|
static String |
DEFAULT_SYM_CIPHER
Default symmetric cipher
|
Constructor and Description |
---|
ECIESParameterSpec()
Creates a new instance.
|
ECIESParameterSpec(KDFParameterSpec kdfparams)
Creates a new instance.
|
ECIESParameterSpec(KDFParameterSpec kdfparams,
String symmetricCipherName,
iaik.asn1.structures.AlgorithmID macID)
Creates a new instance.
|
ECIESParameterSpec(KDFParameterSpec kdfparams,
String symmetricCipherName,
iaik.asn1.structures.AlgorithmID macID,
byte[] macEncodingParameter)
Creates a new instance.
|
ECIESParameterSpec(KDFParameterSpec kdfparams,
String symmetricCipherName,
String macName)
Creates a new instance.
|
ECIESParameterSpec(KDFParameterSpec kdfparams,
String symmetricCipherName,
String macName,
byte[] macEncodingParameter)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
static ECIESParameterSpec |
decode(iaik.asn1.ASN1Object parameters)
Creates a new
ECIESParameterSpec object from the specified ASN.1
structure. |
static ECIESParameterSpec |
decode(iaik.asn1.ASN1Object parameters,
byte[] macEncodingParameter)
Creates a new
ECIESParameterSpec object from the specified ASN.1
structure. |
int |
getCipherKeyLength()
Returns the key length of the symmetric cipher in bytes.
If in internal XOR mode the length will be 0 . |
static iaik.asn1.structures.AlgorithmID |
getDefaultKDFMessageDigest()
Returns the algorithm identifier of the default key derivation message.
|
static String |
getDefaultMacName()
Returns the name of the default MAC function.
|
static String |
getDefaultSymmetricCipherName()
Returns the name of the default symmetric cipher.
|
KDFParameterSpec |
getKDFParams()
Returns the key derivation function parameter.
|
static String |
getKeyAgreementName()
Returns the name for the ECDH-KeyAgreement.
If not set the name of the default ECDH-KeyAgreement is returned. |
byte[] |
getMacEncodingParameter()
Returns the MAC encoding parameter.
|
int |
getMacLength()
Returns the length of the MAC function.
|
iaik.asn1.structures.AlgorithmID |
getMacMD()
Returns the algorithm identifier of the MAC function's message digest.
|
String |
getMacName()
Returns the name of the MAC function.
|
static Enumeration<String> |
getMACNames()
Returns the standard names of the supported MAC functions.
|
String |
getSymmetricCipherName()
Returns the name of the symmetric cipher.
|
static Enumeration<String> |
getSymmetricCipherNames()
Returns the standard names of the supported symmetric ciphers.
|
iaik.asn1.ASN1Object |
toASN1Object()
This method returns the following ASN.1 structure (according to [1]):
|
public static final String DEFAULT_SYM_CIPHER
public static final String DEFAULT_MAC
public static final String DEFAULT_KEY_AGREEMENT
public static final iaik.asn1.structures.AlgorithmID DEFAULT_KDF_MD
public ECIESParameterSpec()
public ECIESParameterSpec(KDFParameterSpec kdfparams)
kdfparams
- parameter for the key derivation functionpublic ECIESParameterSpec(KDFParameterSpec kdfparams, String symmetricCipherName, String macName)
kdfparams
- parameter for the key derivation functionsymmetricCipherName
- name of the symmetric ciphermacName
- name of the MAC functionpublic ECIESParameterSpec(KDFParameterSpec kdfparams, String symmetricCipherName, iaik.asn1.structures.AlgorithmID macID)
kdfparams
- parameter for the key derivation functionsymmetricCipherName
- name of the symmetric ciphermacID
- AlgorithmID of the MAC functionpublic ECIESParameterSpec(KDFParameterSpec kdfparams, String symmetricCipherName, String macName, byte[] macEncodingParameter)
kdfparams
- parameter for the key derivation functionsymmetricCipherName
- name of the symmetric ciphermacName
- name of the MAC functionmacEncodingParameter
- encoding parameter for the MAC functionpublic ECIESParameterSpec(KDFParameterSpec kdfparams, String symmetricCipherName, iaik.asn1.structures.AlgorithmID macID, byte[] macEncodingParameter)
kdfparams
- parameter for the key derivation functionsymmetricCipherName
- name of the symmetric ciphermacID
- AlgorithmID of the MAC functionmacEncodingParameter
- encoding parameter for the MAC functionpublic iaik.asn1.ASN1Object toASN1Object()
ECIESParameters ::= SEQUENCE { kdf [0] KeyDerivationFunction OPTIONAL, sym [1] SymmetricEncryption OPTIONAL, mac [2] MessageAuthenticationCode OPTIONAL }with
KeyDerivationFunction ::= AlgorithmIdentifier {{KDFSet}} KDFSet ALGORITHM ::= { {OID x9-63-kdf PARMS HashAlgorithm } | {OID nist-concatenation-kdf PARMS HashAlgorithm } | {OID tls-kdf PARMS HashAlgorithm } | {OID ikev2-kdf PARMS HashAlgorithm } }
SymmetricEncryption ::= AlgorithmIdentifier {{SYMENCSet}} SYMENCSet ALGORITHM ::= { { OID xor-in-ecies } | { OID tdes-cbc-in-ecies } | { OID aes128-cbc-in-ecies } | { OID aes192-cbc-in-ecies } | { OID aes256-cbc-in-ecies } | { OID aes128-ctr-in-ecies } | { OID aes192-ctr-in-ecies } | { OID aes256-ctr-in-ecies } }
MessageAuthenticationCode ::= AlgorithmIdentifier {{MACSet}} MACSet ALGORITHM ::= { { OID hmac-full-ecies PARMS HashAlgorithm} | { OID hmac-half-ecies PARMS HashAlgorithm} | { OID cmac-aes128-ecies } | { OID cmac-aes192-ecies } | { OID cmac-aes256-ecies } }
ASN1Object
instancepublic static ECIESParameterSpec decode(iaik.asn1.ASN1Object parameters)
ECIESParameterSpec
object from the specified ASN.1
structure.parameters
- the ASN.1 objectECIESParameterSpec
instancepublic static ECIESParameterSpec decode(iaik.asn1.ASN1Object parameters, byte[] macEncodingParameter)
ECIESParameterSpec
object from the specified ASN.1
structure.parameters
- the ASN.1 objectmacEncodingParameter
- encoding parameter for the MAC functionECIESParameterSpec
instancepublic String getSymmetricCipherName()
public static String getDefaultSymmetricCipherName()
public iaik.asn1.structures.AlgorithmID getMacMD()
public String getMacName()
public static String getDefaultMacName()
public static iaik.asn1.structures.AlgorithmID getDefaultKDFMessageDigest()
public int getMacLength()
public KDFParameterSpec getKDFParams()
public byte[] getMacEncodingParameter()
public int getCipherKeyLength()
0
.public static String getKeyAgreementName()
public static Enumeration<String> getMACNames()
public static Enumeration<String> getSymmetricCipherNames()
Copyright © 2011–2022 Stiftung SIC. All rights reserved.