PACEHandler

internal final class PACEHandler

PACEHndler is responsible for performing PACE access control protocol to allow the access to the IC.

PACE is a password authenticated Diffie-Hellman key agreement protocol that provides secure communication and password-based authentication of the eMRTD chip and the inspection system, i.e. eMRTD chip and inspection system share the same password.

Note

PACE establishes NFCSecureSession between an eMRTD chip and an inspection system based on weak (short) passwords.

  • A property that indicates if PACE is supported.

    Declaration

    Swift

    private(set) var isPACESupported: Bool { get }
  • Initializes the PACEHandler with a TagReader and CardAccess.

    Throws

    An error if PACE is not supported.

    Declaration

    Swift

    internal init(tagReader: TagReader, cardAccess: CardAccess) throws

    Parameters

    tagReader

    The TagReader used to communicate with the card.

    cardAccess

    The CardAccess information, including PACEInfo if supported.

  • performPACE(mrzKey:) Asynchronous

    Perform the PACE protocol using the MRZ key.

    Throws

    An error if PACE is not supported or if any step of the PACE protocol fails.

    Declaration

    Swift

    internal func performPACE(mrzKey: String) async throws

    Parameters

    mrzKey

    The MRZ (Machine Readable Zone) key for deriving the PACE key.