public final class X963KDFParameterSpec extends Object implements KDFParameterSpec
References:
[1] ANSI X9.63-2001, "American National Standard for Financial Services - Key Agreement and Key Transport Using Elliptic Curve Cryptography" , November 2001.
[2] Certicom Research. 2009. Standards for Efficient Cryptography - SEC 1: Elliptic Curve Cryptography v2.0
ECDHParameterSpec
,
ECDHKeyAgreement
,
ECDHWithCofactorKeyAgreement
Modifier and Type | Field and Description |
---|---|
static iaik.asn1.ObjectID |
OID
object identifier for the ASN.1 structure
|
Constructor and Description |
---|
X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md)
Creates a new parameter spec object without a key length and shared
information.
|
X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md,
byte[] sharedInformation)
Creates a new parameter spec object without a key length.
|
X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md,
int keyLength)
Creates a new parameter spec object without adding shared information.
|
X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md,
int keyLength,
byte[] sharedInformation)
Creates a new parameter spec object with shared information.
|
X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md,
int keyLength,
X963ASN1SharedInfo sharedInformation)
Creates a new parameter spec object with shared information.
|
Modifier and Type | Method and Description |
---|---|
static X963KDFParameterSpec |
decode(iaik.asn1.ASN1Object parameters)
Creates a new
X963KDFParameterSpec object from the specified ASN.1
structure. |
boolean |
equals(Object obj) |
int |
getKeyLength()
Returns the length of the key to be generated.
|
int |
getMaxHashBitLength()
The maximum bitsize of the data to be hashed.
|
MessageDigest |
getMessageDigest()
Returns the message digest that will be used to generate the keying data.
|
byte[] |
getSharedInformation()
Returns the optional shared information.
|
int |
hashCode() |
iaik.asn1.ASN1Object |
toASN1Object()
This method returns the following ASN.1 structure (according to [2]):
|
public static final iaik.asn1.ObjectID OID
public X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md)
md
- the message digest that will be used to derive the keying datapublic X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md, byte[] sharedInformation)
md
- the message digest that will be used to derive the keying datasharedInformation
- an octet string holding the shared informationpublic X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md, int keyLength)
md
- the message digest that will be used to derive the keying datakeyLength
- the length of the key in bitspublic X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md, int keyLength, byte[] sharedInformation)
md
- the message digest that will be used to derive the keying datakeyLength
- the length of the key in bitssharedInformation
- an octet string holding the shared informationpublic X963KDFParameterSpec(iaik.asn1.structures.AlgorithmID md, int keyLength, X963ASN1SharedInfo sharedInformation)
md
- the message digest that will be used to derive the keying datakeyLength
- the length of the key in bitssharedInformation
- an ASN1SharedInfo
holding the
non-encoded shared informationpublic MessageDigest getMessageDigest()
public int getKeyLength()
public byte[] getSharedInformation()
null
if no shared information is availablepublic int getMaxHashBitLength()
public iaik.asn1.ASN1Object toASN1Object()
KeyDerivationFunction ::= AlgorithmIdentifier {{KDFSet}} where KDFSet ALGORITHM ::= { {OID x9-63-kdf PARMS HashAlgorithm } }
toASN1Object
in interface KDFParameterSpec
ASN1Object
instancepublic static X963KDFParameterSpec decode(iaik.asn1.ASN1Object parameters)
X963KDFParameterSpec
object from the specified ASN.1
structure.parameters
- the ASN.1 objectX963KDFParameterSpec
instanceCopyright © 2011–2022 Stiftung SIC. All rights reserved.