Mifare (S50) 1K NFC cards have 16 sectors, each sector has 4 blocks and each block holds 16 bytes of data.
Each sector's last block is the Sector Trailer where the KeyA and KeyB are specified with the access bits that are used to authenticate the sector: Sector trailer: KeyA(6bytes) + Access Bits (4bytes) + KeyB (6bytes).
I am trying to read and write these cards but I cannot figure out what the access bits should be for the sector trailer if I want KeyA to have Read permission only and KeyB to have Read AND Write permissions.