ChipAuthenticationInfo
internal final class ChipAuthenticationInfo : SecurityInfo
ChipAuthenticationInfo represents security information related to
Chip Authentication in electronic Machine Readable Travel Documents (eMRTD).
The ASN.1 data structure ChipAuthenticationInfo is defined as follows:
ChipAuthenticationInfo ::= SEQUENCE {
protocol OBJECT IDENTIFIER(
id-CA-DH-3DES-CBC-CBC |
id-CA-DH-AES-CBC-CMAC-128 |
id-CA-DH-AES-CBC-CMAC-192 |
id-CA-DH-AES-CBC-CMAC-256 |
id-CA-ECDH-3DES-CBC-CBC |
id-CA-ECDH-AES-CBC-CMAC-128 |
id-CA-ECDH-AES-CBC-CMAC-192 |
id-CA-ECDH-AES-CBC-CMAC-256),
version INTEGER, -- MUST be 1,
keyId INTEGER OPTIONAL
}
This data structure provides detailed information on an implementation of Chip Authentication and its components represent:
protocol: An object identifier that identifies the algorithms to be used, i.e.key agreement, symmetric cipher and MAC).version: An integer that identifies the version of the protocol. Currently, only version 1 is supported by this specification.keyId: An integer that may indicate the local key identifier (optional).
Important
KeyId must be used if the eMRTD chip provides multiple public keys
for Chip Authentication.
Note
It inherits from the SecurityInfo class.
-
Declaration
Swift
internal typealias KeyIdentifier = Int -
The
SecurityProtocolused for Chip Authentication.Declaration
Swift
private(set) var securityProtocol: ChipAuthenticationSecurityProtocol { get } -
The Key Identifier, if available.
Declaration
Swift
private(set) var keyId: KeyIdentifier? { get } -
Declaration
Swift
private(set) var version: Int? { get } -
Check if the provided
ObjectIdentifier(OID) is valid for Chip Authentication.Declaration
Swift
internal static func checkRequiredIdentifier(_ oid: ObjectIdentifier) -> BoolParameters
oidThe OID to check.
Return Value
trueif the OID is valid for Chip Authentication,falseotherwise. -
Initialize a
ChipAuthenticationInfoinstance with the given OID and ASN.1 data.Throws
An error if the security protocol cannot be determined from the provided OID.
Declaration
Swift
internal required init(oid: ObjectIdentifier, data: ASN1NodeCollection) throwsParameters
oidThe
ObjectIdentifier(OID) associated with the security information.dataThe ASN.1 data containing security information.
-
Decode the ASN.1 data to extract relevant information.
Throws
An error if the data cannot be decoded successfully.
Declaration
Swift
override internal func decode(_ data: ASN1NodeCollection) throwsParameters
dataThe ASN.1 data to decode.
View on GitHub
ChipAuthenticationInfo Class Reference