C API for BALTECH SDK

§ brp_Mif_SectorSwitch()

brp_errcode brp_Mif_SectorSwitch ( brp_protocol  protocol,
bool  L3SectorSwitch,
unsigned  SectorSwitchKeyIdx,
brp_buf  SectorSwitchKeyDivData,
size_t  SectorSwitchKeyDivData_len,
brp_Mif_SectorSwitch_SectorSpec_Entry SectorSpec,
size_t  SectorSpec_len,
brp_buf  SectorKeysDivData,
size_t  SectorKeysDivData_len 
)

This command performs a sector switch command (only for EV1 cards).

Prior the card has to be set in 14443-4 mode, all sectors are addressed with sector Key B.

Parameters
[in]protocolused to execute the command
[in]L3SectorSwitchIf true , the target level of the sector switch is SL3, else SL1/SL3-Mixed.
[in]SectorSwitchKeyIdxCrypto Memory Index (SAM or CryptoMemory) of L1L3MixSectorSwitchKey or L3SectorSwitchKey * SAM: MSByte: Key version / LSByte: KeyIdx * Crypto Memory: MSByte: Page (0..15) / LSByte: KeyIdx (0x80-0xBF)
[in]SectorSwitchKeyDivDataIf diversification data is specified, key diversification of the SectorSwitchKey will be done according to NXP AN10922.
[in]SectorSwitchKeyDivData_len
[in]SectorSpec
[in]SectorSpec_len
[in]SectorKeysDivDataIf diversification data is specified, key diversification of the sector keys will be done according to NXP AN10922.
[in]SectorKeysDivData_len