|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--PACE
This class implements the PACE protocol
Defined in pace.js
Field Summary | |
Object |
algo
|
Object |
crypto
|
Object |
domparam
|
Object |
sym
|
Object |
symalgo
|
Object |
version
|
<static> Object |
bsi_de
|
<static> Object |
id_IS
|
<static> Object |
id_PACE
|
<static> Object |
id_PACE_ECDH_GM
|
<static> Object |
id_PACE_ECDH_GM_3DES_CBC_CBC
|
<static> Object |
id_PACE_ECDH_GM_AES_CBC_CMAC_128
|
<static> Object |
id_PACE_ECDH_GM_AES_CBC_CMAC_192
|
<static> Object |
id_PACE_ECDH_GM_AES_CBC_CMAC_256
|
<static> Object |
id_roles
|
Constructor Summary | |
PACE(<Crypto> crypto, <ByteString> algo, domparam, <Number> version)
Create a PACE protocol object |
Method Summary | |
ByteString
|
calculateAuthenticationToken()
Calculate the authentication token over the public key received from the other side |
void
|
decryptNonce(encnonce)
Decrypt and store nonce using PACE key. |
Key
|
deriveKey(<ByteString> input, <Number> counter, nonce)
Derive key from input parameter, counter and optional nonce |
Key
|
generateEphemeralKeyPair(domainParameter)
Generate ephemeral ECC key pair. |
ByteString
|
getEncryptedNonce()
Generate nonce and encrypt using PACE key. |
ByteString
|
getEphemeralPublicKey()
Returns the ephemeral public key based on the new domain parameter |
ByteString
|
getMappingData()
Generates and returns the mapping data for this instance |
Number
|
getSymmetricAlgorithm()
Return algorithm type |
Boolean
|
hasMapping()
Returns true, if the mapping has been performed. |
Boolean
|
hasNonce()
Returns true, if the nonce is known. |
void
|
performKeyAgreement(<ByteString> publicKey)
Performs the mapping operation with mapping data from the other side |
void
|
performMapping(mappingData)
Performs the mapping operation with mapping data from the other side |
Object
|
setPassword(<ByteString> pwd)
Set the password and derive the PACE key. |
Object
|
toString()
Returns a human readable presentation of the current pace state. |
Boolean
|
verifyAuthenticationToken(authToken)
Calculate and verify the authentication token over the public key received from the other side |
<static> ASN1
|
encodePublicKey(<String> oid, <Key> key, <Boolean> withDP)
Encode an ECC public key in the format defined by the EAC 2.0 specification |
<static> String
|
keyToString(key)
Describe key |
<static> ByteString
|
stripLeadingZeros(<ByteString> value)
Strips leading zeros of a ByteString |
Field Detail |
Object algo
Object crypto
Object domparam
Object sym
Object symalgo
Object version
<static> Object bsi_de
<static> Object id_IS
<static> Object id_PACE
<static> Object id_PACE_ECDH_GM
<static> Object id_PACE_ECDH_GM_3DES_CBC_CBC
<static> Object id_PACE_ECDH_GM_AES_CBC_CMAC_128
<static> Object id_PACE_ECDH_GM_AES_CBC_CMAC_192
<static> Object id_PACE_ECDH_GM_AES_CBC_CMAC_256
<static> Object id_roles
Constructor Detail |
PACE(<Crypto> crypto, <ByteString> algo, domparam, <Number> version)
crypto
- the crypto provider
algo
- the algorithm OID
version
- protocol version (1 or 2)
domainparam
- the key object holding ECC domain parameter
Method Detail |
ByteString calculateAuthenticationToken()
void decryptNonce(encnonce)
nonce
- the encrypted nonce
Key deriveKey(<ByteString> input, <Number> counter, nonce)
input
- the first part of the hash input
counter
- the counter value
the
- optional nonce inserted between the input and the counter
Key generateEphemeralKeyPair(domainParameter)
domainParameter
- the domain parameter for the key pair
ByteString getEncryptedNonce()
ByteString getEphemeralPublicKey()
ByteString getMappingData()
Number getSymmetricAlgorithm()
Boolean hasMapping()
Boolean hasNonce()
void performKeyAgreement(<ByteString> publicKey)
publicKey
- the public key in encoded format
void performMapping(mappingData)
Object setPassword(<ByteString> pwd)
pwd
- the PACE password (Hash Value for MRZ and ASCII string for others)
Object toString()
Boolean verifyAuthenticationToken(authToken)
the
- MAC over the authentication data
<static> ASN1 encodePublicKey(<String> oid, <Key> key, <Boolean> withDP)
oid
- the object identifier to encode
key
- the EC public key
withDP
- true to encode domain parameter as well
<static> String keyToString(key)
the
- key
<static> ByteString stripLeadingZeros(<ByteString> value)
value
- the ByteString value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |