ChipAuthenticationPublicKeyInfo
internal final class ChipAuthenticationPublicKeyInfo : SecurityInfo
A class representing the public key information used in Chip Authentication or PACE with Chip Authentication Mapping.
The ASN.1 data structure ChipAuthenticationPublicKeyInfo is defined as follows:
ChipAuthenticationPublicKeyInfo ::= SEQUENCE {
protocol OBJECT IDENTIFIER(id-PK-DH | id-PK-ECDH),
chipAuthenticationPublicKey SubjectPublicKeyInfo,
keyId INTEGER OPTIONAL
}
This data structure provides a public key for Chip Authentication or PACE with Chip Authentication Mapping of the eMRTD chip and its components represent.
protocol: An object identifier that identifies the type of the public key (i.e. DH or ECDH).chipAuthenticationPublicKey: ASubjectPublicKeyInfodata structure that contains the public key in encoded form.
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 or if this key is used for PACE with Chip Authentication Mapping.
Note
It inherits from the SecurityInfo class.
-
Declaration
Swift
internal typealias KeyIdentifier = Int -
The
SecurityProtocolassociated with this public key.Declaration
Swift
private(set) var securityProtocol: CAPublicKeySecurityProtocol { get } -
The subject public key information.
Declaration
Swift
private(set) var subjectPublicKeyInfo: SubjectPublicKeyInfo! { get } -
The key identifier, if available.
Declaration
Swift
private(set) var keyId: KeyIdentifier? { get } -
Check if the provided
ObjectIdentifier(OID) is valid for Chip Authentication Public Key.Declaration
Swift
internal static func checkRequiredIdentifier(_ oid: ObjectIdentifier) -> BoolParameters
oidThe OID to check.
Return Value
trueif the OID is valid for Chip Authentication Public Key,falseotherwise. -
Initialize a
ChipAuthenticationPublicKeyInfoinstance with the given OID and ASN.1 data.Throws
An error if the security protocol cannot be decoded from the OID.
Declaration
Swift
internal required init(oid: ObjectIdentifier, data: ASN1NodeCollection) throwsParameters
oidThe
ObjectIdentifierassociated with the security protocol.dataThe ASN.1 data containing the public key information.
-
Decodes the ASN.1 data, extracting the
SubjectPublicKeyInfoand key identifier, if available.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
ChipAuthenticationPublicKeyInfo Class Reference