DocumentBasicAccessKeys
internal final class DocumentBasicAccessKeys
The DocumentBasicAccessKeys
class represents the Document Basic Access Keys derived from the
Machine Readable Zone (MRZ) key.
These keys are used for encryption (Kenc) and message authentication (Kmac) in Basic Access Control (BAC). The MRZ key is hashed using SHA-1, and the key seed is generated from the hash. The final keys Kenc and Kmac are derived using a key derivation mechanism with the key seed.
Note
The BACHandler
class use these keys to establish access to the IC.
See also
-
The encryption key (Kenc) used for data encryption in BAC.
Declaration
Swift
private(set) var Kenc: [UInt8] { get }
-
The message authentication key (Kmac) used for data integrity in BAC.
Declaration
Swift
private(set) var Kmac: [UInt8] { get }
-
Initializes Document Basic Access Keys using the MRZ key.
Throws
An error if key derivation fails.
Declaration
Swift
internal init(mrzKey: String) throws
Parameters
mrzKey
The MRZ key used to derive the Document Basic Access Keys.