|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--EAC20
Class implementing support for Extended Access Control V2
Defined in eac20.js
Field Summary | |
Object |
CADPs
|
Object |
CAInfos
|
Object |
CAPublicKeys
|
Object |
card
|
Object |
crypto
|
Object |
includeDPinAuthToken
|
Object |
maxCData
|
Object |
maxRData
|
Object |
PACEDPs
|
Object |
PACEInfos
|
Object |
readCardInfo
|
Object |
RIInfos
|
Object |
selectADFwithoutSM
|
Object |
sm
|
Object |
useFID
|
Object |
verbose
|
<static> Object |
AID_eID
|
<static> Object |
AID_eSign
|
<static> Object |
AID_LDS
|
<static> Object |
ID_CAN
PACE PWD is the CAN |
<static> Object |
ID_MRZ
PACE PWD is the hashed MRZ |
<static> Object |
ID_PIN
PACE PWD is the PIN |
<static> Object |
ID_PUK
PACE PWD is the PUK |
<static> Object |
SFI_CardAccess
|
<static> Object |
SFI_CardSecurity
|
<static> Object |
SFI_ChipSecurity
|
<static> Object |
SFI_COM
|
<static> Object |
SFI_CVCA
|
Constructor Summary | |
EAC20(<Crypto> crypto, <Card> card)
Create a protocol object for EAC |
Method Summary | |
Key
|
calculateBACKey(<String> mrz, <Number> keyno)
Calculate the Basic Access Control (BAC) key from the MRZ |
ChipAuthenticationDomainParameterInfo[]
|
getCADomainParameterInfos()
Return the list of ChipAuthenticationDomainParameterInfo objects |
ChipAuthenticationInfo[]
|
getCAInfos()
Return the list of ChipAuthenticationInfo objects |
|
getCAKeyId(privileged)
Return the key id of the chip authentication key |
PACEDomainParameterInfo[]
|
getPACEDomainParameterInfos()
Return the list of PACEDomainParameterInfo objects |
PACEInfo[]
|
getPACEInfos()
Return the list of PACEInfo objects |
|
getRIKeyId(<boolean> authOnly)
Return the key id of the restricted identification key |
PublicKeyReference
|
getTrustAnchorCAR(<boolean> previous)
Return the trust anchor's CAR as indicated by the card in the PACE protocol |
ByteString
|
hashMRZ(<String> mrz)
Calculate the hash over document number, date of birth and date of expiration from 2 or 3 line MRZ |
void
|
log(str)
|
void
|
performBAC(<Key> kenc, <Key> kmac)
Perform BAC using the provided Kenc and Kmac values. |
void
|
performBACWithMRZ(mrz)
Perform BAC using the provided Kenc and Kmac values. |
boolean
|
performChipAuthentication(<Number> keyid)
Perform chip authentication and establish a secure channel |
boolean
|
performChipAuthenticationV1(keyid)
Perform chip authentication in version 1 and establish a secure channel |
boolean
|
performChipAuthenticationV2()
Perform chip authentication in version 2 and establish a secure channel |
void
|
performPACE(<Number> parameterId, <Number> pwdid, <ByteString> pwd, <ASN1> chat)
Perform PACE using the indicated parameter set, the identified password, the password value and an optional cardholder authentication template. |
ByteString
|
performRestrictedIdentification(<Number> keyId, <ByteString> sectorPublicKey, <Number> sectorPublicKeyIndex)
Perform restricted identification |
void
|
performTerminalAuthentication(<Key> termkey, <ByteString> auxdata, <Crypto> crypto)
Perform terminal authentication using a given terminal key |
void
|
performTerminalAuthenticationFinal(<ByteString> signature)
Complete terminal authentication by submitting the signature to the card |
Object
|
performTerminalAuthenticationSetup(<ByteString> auxdata)
Prepare terminal authentication by setting the required security environment |
void
|
prepareChipAuthentication(<Number> keyId)
Prepare chip authentication by generating the ephemeral key pair |
void
|
processSecurityInfos(<ASN1> si, <boolean> fromCardSecurity)
Process a list of security infos from EF.CardInfo, EF.CardSecurity or EF.ChipSecurity |
void
|
readCardAccess()
Read EF.CardAccess and process security infos |
void
|
readCardSecurity()
Read EF.CardSecurity and process security infos |
void
|
readChipSecurity()
Read EF.ChipSecurity and process security infos |
void
|
readCVCA()
Read EF.CVCA and process contained CARs |
void
|
readDG14()
Read EF.DG14 and process security infos |
ByteString
|
readEFwithFID(<ByteString> fid)
Select EF using FID and read elementary file |
ByteString
|
readEFwithSFI(sfi)
Select and read EF using SFI |
void
|
select_eID()
Select eID Application |
void
|
select_eSign()
Select eSign Application |
void
|
selectADF(<ByteString> aid)
Select application DF |
void
|
selectLDS()
Select ePass LDS Application |
void
|
setIDPICC(idPICC)
Set the ID_PICC used for terminal authentication in EAC 1.11 |
void
|
updateEFwithFID(<ByteString> fid, <ByteString> data)
Select EF using FID and update content |
Object
|
updateEFwithSFI(sfi, <ByteString> data)
Select EF using SFI and update content |
boolean
|
verifyAuxiliaryData(<ByteString> oid)
Verify authenticated auxiliary data |
void
|
verifyCertificateChain(<CVC[]> cvcchain)
Submit a list of certificates to the card for verification |
<static> String
|
decodeDocumentNumber(<String> mrz)
Decode document number from 2 or 3 line MRZ |
Field Detail |
Object CADPs
Object CAInfos
Object CAPublicKeys
Object card
Object crypto
Object includeDPinAuthToken
Object maxCData
Object maxRData
Object PACEDPs
Object PACEInfos
Object readCardInfo
Object RIInfos
Object selectADFwithoutSM
Object sm
Object useFID
Object verbose
<static> Object AID_eID
<static> Object AID_eSign
<static> Object AID_LDS
<static> Object ID_CAN
<static> Object ID_MRZ
<static> Object ID_PIN
<static> Object ID_PUK
<static> Object SFI_CardAccess
<static> Object SFI_CardSecurity
<static> Object SFI_ChipSecurity
<static> Object SFI_COM
<static> Object SFI_CVCA
Constructor Detail |
EAC20(<Crypto> crypto, <Card> card)
crypto
- the crypto provider
card
- the card object
Method Detail |
Key calculateBACKey(<String> mrz, <Number> keyno)
mrz
- 2 line or 3 line machine readable zone
keyno
- Number of key to calculate (1 for Kenc and 2 for Kmac)
ChipAuthenticationDomainParameterInfo[] getCADomainParameterInfos()
ChipAuthenticationInfo[] getCAInfos()
getCAKeyId(privileged)
PACEDomainParameterInfo[] getPACEDomainParameterInfos()
PACEInfo[] getPACEInfos()
getRIKeyId(<boolean> authOnly)
authOnly
- return the RI key available after authentication only (to calculate the pseudonym)
PublicKeyReference getTrustAnchorCAR(<boolean> previous)
previous
- , true to return the previous CAR, if any
ByteString hashMRZ(<String> mrz)
2 line MRZ of Silver Data Set PParameters:
mrz
- 2 line or 3 line machine readable zoneReturns:
the SHA-1 hash over the concatenation of document number, date of birth and date of expiration
log
void log(str)
performBAC
void performBAC(<Key> kenc, <Key> kmac)Perform BAC using the provided Kenc and Kmac values.
Parameters:
kenc
- the key Kenc
kmac
- the key Kmac
performBACWithMRZ
void performBACWithMRZ(mrz)Perform BAC using the provided Kenc and Kmac values.
Parameters:
kenc
- the key Kenc
kmac
- the key Kmac
performChipAuthentication
boolean performChipAuthentication(<Number> keyid)Perform chip authentication and establish a secure channel
Parameters:
keyid
- the key identifier (only required for ChipAuthentication in version 1)Returns:
true, if chip authentication was successfull
performChipAuthenticationV1
boolean performChipAuthenticationV1(keyid)Perform chip authentication in version 1 and establish a secure channel
Returns:
true, if chip authentication was successfull
performChipAuthenticationV2
boolean performChipAuthenticationV2()Perform chip authentication in version 2 and establish a secure channel
Returns:
true, if chip authentication was successfull
performPACE
void performPACE(<Number> parameterId, <Number> pwdid, <ByteString> pwd, <ASN1> chat)Perform PACE using the indicated parameter set, the identified password, the password value and an optional cardholder authentication template.
This method supports PACE version 1 and 2. For version 2, parameterId with a value between 0 and 31 denotes a standardized domain parameter as defined in TR-03110 2.04 or later.
Parameters:
parameterId
- the identifier for the PACEInfo and PACEDomainParameterInfo from EF.CardInfo. Use 0 for the default.
pwdid
- one of EAC20.ID_MRZ, EAC20.ID_CAN, EAC20.ID_PIN, EAC20.ID_PUK
pwd
- the PACE password
chat
- the CHAT data object with tag 7F4C or null
performRestrictedIdentification
ByteString performRestrictedIdentification(<Number> keyId, <ByteString> sectorPublicKey, <Number> sectorPublicKeyIndex)Perform restricted identification
Parameters:
keyId
- restricted identification key identifier
sectorPublicKey
- the sector public key data
sectorPublicKeyIndex
- optional argument that allows to select a specific sector public key in the terminal certificateReturns:
the sector specific identifier
performTerminalAuthentication
void performTerminalAuthentication(<Key> termkey, <ByteString> auxdata, <Crypto> crypto)Perform terminal authentication using a given terminal key
Parameters:
termkey
- the terminal private key
auxdata
- auxiliary data (tag '67') to be included in terminal authentication
crypto
- optional alternative crypto provider (e.g. for key in SmartCard-HSM)
performTerminalAuthenticationFinal
void performTerminalAuthenticationFinal(<ByteString> signature)Complete terminal authentication by submitting the signature to the card
Parameters:
signature
- the signature as concatenation of r and s
performTerminalAuthenticationSetup
Object performTerminalAuthenticationSetup(<ByteString> auxdata)Prepare terminal authentication by setting the required security environment
Parameters:
auxdata
- auxiliary data (tag '67') to be included in terminal authentication
prepareChipAuthentication
void prepareChipAuthentication(<Number> keyId)Prepare chip authentication by generating the ephemeral key pair
Parameters:
keyId
- the key identifier to be used for chip authentication
processSecurityInfos
void processSecurityInfos(<ASN1> si, <boolean> fromCardSecurity)Process a list of security infos from EF.CardInfo, EF.CardSecurity or EF.ChipSecurity
Parameters:
si
- the security info ASN Sequence
fromCardSecurity
- true if security infos are taken from EF.CardSecurity, EF.ChipSecurity or EF.DG14
readCardAccess
void readCardAccess()Read EF.CardAccess and process security infos
readCardSecurity
void readCardSecurity()Read EF.CardSecurity and process security infos
readChipSecurity
void readChipSecurity()Read EF.ChipSecurity and process security infos
readCVCA
void readCVCA()Read EF.CVCA and process contained CARs
readDG14
void readDG14()Read EF.DG14 and process security infos
readEFwithFID
ByteString readEFwithFID(<ByteString> fid)Select EF using FID and read elementary file
Parameters:
fid
- 2 byte file identifierReturns:
the content of the EF
readEFwithSFI
ByteString readEFwithSFI(sfi)Select and read EF using SFI
Parameters:
short
- file identifierReturns:
the content of the EF
select_eID
void select_eID()Select eID Application
select_eSign
void select_eSign()Select eSign Application
selectADF
void selectADF(<ByteString> aid)Select application DF
Parameters:
aid
- the application identifier
selectLDS
void selectLDS()Select ePass LDS Application
setIDPICC
void setIDPICC(idPICC)Set the ID_PICC used for terminal authentication in EAC 1.11
Parameters:
id
-
kmac
- the key Kmac
updateEFwithFID
void updateEFwithFID(<ByteString> fid, <ByteString> data)Select EF using FID and update content
Parameters:
fid
- 2 byte file identifier
data
- data to be written
updateEFwithSFI
Object updateEFwithSFI(sfi, <ByteString> data)Select EF using SFI and update content
Parameters:
data
- data to be written
short
- file identifier
verifyAuxiliaryData
boolean verifyAuxiliaryData(<ByteString> oid)Verify authenticated auxiliary data
Parameters:
oid
- the object identifier for the auxiliary data provided during terminal authenticationReturns:
true, if auxiliary data was verified
verifyCertificateChain
void verifyCertificateChain(<CVC[]> cvcchain)Submit a list of certificates to the card for verification
Parameters:
cvcchain
- the list of certificates, starting with link certificates, DVCA certificate and terminal certificate.
decodeDocumentNumber
<static> String decodeDocumentNumber(<String> mrz)Decode document number from 2 or 3 line MRZ
This method supports a document number in a three line MRZ longer than 10 digits.
Parameters:
mrz
- the concatenation of the MRZ linesReturns:
the document number
Overview File Class Tree Index Help PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Documentation generated by JSDoc on Tue Sep 3 22:29:38 2013