public class PKMACValue extends java.lang.Object implements ASN1Type
PKMACValue ::= SEQUENCE {
algId AlgorithmIdentifier,
-- algorithm value shall be PasswordBasedMac {1 2 840 113533 7 66 13}
-- parameter value is PBMParameter
value BIT STRING
}
The process of using a PBMParameter to compute a publicKeyMAC and so authenticate the origin of a public key certification request consists of two stages. The first stage uses shared secret information to produce a MAC key. The second stage MACs the public key in question using this MAC key to produce an authenticated value.
Initialization of the first stage of algorithm assumes the existence of a shared secret distributed in a trusted fashion between CA/RA and end-entity. The salt value is appended to the shared secret and the one way function (owf) is applied iterationCount times, where the salted secret is the input to the first iteration and, for each successive iteration, the input is set to be the output of the previous iteration, yielding a key K.
In the second stage, K and the public key are inputs to HMAC to produce a value for publicKeyMAC as follows:
| Modifier and Type | Field and Description |
|---|---|
static ObjectID |
passwordBasedMacOID
Object ID for a PasswordBasedMac.
|
| Constructor and Description |
|---|
PKMACValue(AlgorithmID algId,
byte[] value)
Creates a new
PKMACValue object with the specified components. |
PKMACValue(ASN1Object obj)
Creates a
PKMACValue object from an ASN1Object. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes a PKMACValue structure from an
ASN1Object. |
AlgorithmID |
getAlgId()
Returns algorithm identifier that the mac value was created with.
|
byte[] |
getValue()
Returns the mac value.
|
ASN1Object |
toASN1Object()
Encodes this
PKMACValue as an ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
PKMACValue object. |
public static final ObjectID passwordBasedMacOID
public PKMACValue(AlgorithmID algId, byte[] value)
PKMACValue object with the specified components.algId - the algoirhtm id used to calculate the mac value; it must be a
PasswordBasedMac algorithm, with a PBMParameter algorithm parametervalue - the mac valuepublic PKMACValue(ASN1Object obj) throws CodingException
PKMACValue object from an ASN1Object.obj - the ASN.1 representation of a PKMACValue structureCodingException - thrown if an errors occurs while decoding the ANS1Objectpublic AlgorithmID getAlgId()
public byte[] getValue()
public void decode(ASN1Object obj) throws CodingException
ASN1Object.decode in interface ASN1Typeobj - an ASN.1 representation of a PKMACValue structureCodingException - thrown if an errors occurs while decoding the ANS1Objectpublic ASN1Object toASN1Object()
PKMACValue as an ASN1Object.toASN1Object in interface ASN1Typepublic java.lang.String toString()
PKMACValue object.toString in class java.lang.Object