|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--ChipAuthentication
This class implements the ChipAuthentication protocol
Defined in chipauthentication.js
Field Summary | |
Object |
algo
|
Object |
crypto
|
Object |
domparam
|
Object |
includeDPinAuthToken
|
Object |
noPadding
|
<static> Object |
id_CA_ECDH_3DES_CBC_CBC
|
<static> Object |
id_CA_ECDH_AES_CBC_CMAC_128
|
<static> Object |
id_CA_ECDH_AES_CBC_CMAC_192
|
<static> Object |
id_CA_ECDH_AES_CBC_CMAC_256
|
<static> Object |
standardizedDomainParameter
|
Constructor Summary | |
ChipAuthentication(<Crypto> crypto, <ByteString> algo, <Key> domparam)
Create a ChipAuthentication protocol object |
Method Summary | |
Boolean
|
calculateAuthenticationToken()
Calculate the authentication token over the public key received from the other side |
ByteString
|
decodeEphemeralPublicKey(encodedKey)
Decodes the ephemeral public key |
Key
|
deriveKey(<ByteString> input, <Number> counter, nonce)
Derive key from input parameter, counter and optional nonce |
void
|
generateEphemeralCAKeyPair()
Generate ephemeral key pair |
ByteString
|
getCompressedPublicKey()
Returns the x coordinate of the public key |
ByteString
|
getEphemeralPublicKey()
Returns the ephemeral public key |
void
|
performKeyAgreement(<ByteString> publicKey, nonce)
Performs the mapping operation with mapping data from the other side |
void
|
setKeyPair(<Key> prk, <Key> puk)
Set chip authentication keys |
Boolean
|
verifyAuthenticationToken(authToken)
Calculate and verify the authentication token over the public key received from the other side |
<static> Object
|
encodePublicKey(<String> oid, <Key> key, <Boolean> withDP)
Encode an ECC public key in the format defined by the EAC 2.0 specification |
<static> ByteString
|
stripLeadingZeros(<ByteString> value)
Strips leading zeros of a ByteString |
Field Detail |
Object algo
Object crypto
Object domparam
Object includeDPinAuthToken
Object noPadding
<static> Object id_CA_ECDH_3DES_CBC_CBC
<static> Object id_CA_ECDH_AES_CBC_CMAC_128
<static> Object id_CA_ECDH_AES_CBC_CMAC_192
<static> Object id_CA_ECDH_AES_CBC_CMAC_256
<static> Object standardizedDomainParameter
Constructor Detail |
ChipAuthentication(<Crypto> crypto, <ByteString> algo, <Key> domparam)
crypto
- the crypto provider
algo
- the algorithm OID
domparam
- the key object holding ECC domain parameter
Method Detail |
Boolean calculateAuthenticationToken()
the
- MAC over the authentication data
ByteString decodeEphemeralPublicKey(encodedKey)
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
void generateEphemeralCAKeyPair()
ByteString getCompressedPublicKey()
ByteString getEphemeralPublicKey()
void performKeyAgreement(<ByteString> publicKey, nonce)
publicKey
- the public key in encoded format
void setKeyPair(<Key> prk, <Key> puk)
prk
- the private key
puk
- the public key
Boolean verifyAuthenticationToken(authToken)
the
- MAC over the authentication data
<static> Object 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> ByteString stripLeadingZeros(<ByteString> value)
value
- the ByteString value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |