title: Mifare 1k: Authentication Key A / Key B Blocks and Sectors
body: <p>I have to following Problem with the 1K Mifare Tag and ACR122U:</p>
  
  <ul>
  <li><p>First: </p>
  
  <p>Am i right, when i understand the Mifare Block Scheme like that:</p>
  
  <p>BLOCKS: &amp;H0, &amp;H1, &amp;H2, &amp;H3 --> Form Sector 1, where &amp;H0 is the manufacturer block and &amp;H3 is the block where KEY A and KEY B is stored?<br>
  BLOCKS: &amp;H4, &amp;H5, &amp;H6, &amp;H7 --> Form Sector 2, where &amp;H7 is the key storage<br><br><strong>EDIT: 13.08.16:</strong> i've found the answer for this particular part at: <a href="https://stackoverflow.com/a/28255795/6706324">https://stackoverflow.com/a/28255795/6706324</a><br>But in every article its said: using key a or key b - why "OR" and what about the following:</p>
  
  <p>What happens, if i change Key A and Key B to different values?</p>
  
  <p>I guess that then I can only access Bytes 1-6 in Block &amp;H1 when authenticating with "&amp;H60 -> key A"??</p>
  
  <p>Wondering, that with the manufacturer key &amp;HFF, &amp;HFF,..... i can access all 16 bytes when authenticating with key a.</p></li>
  <li><p>Second:</p>
  
  <p>Everything works well with manufacturer Key (FF..) when writing 16 Byte to &amp;H1 and 16 Bytes to &amp;H2 and then Authenticating with standard key A: &amp;HFF &amp;HFF &amp;HFF &amp;HFF &amp;HFF &amp;HFF --> i can read both sides of the 16 bytes (key a and key b side?)</p>
  
  <p>Question here: Do i have to authenticate Block &amp;H1 with Key A, then write to it - and in a second procedure authenticating again to Block &amp;H2 and then writing, or is just authing one block of a section necessary?</p></li>
  <li><p>Third: Everything stops working, when i do the following:</p>
  
  <p>1) Authenticating &amp;H1 (because authenticating &amp;H3 does not work), then writing the following in block &amp;H3:<br><br> 
  Key A: &amp;H31 &amp;H31 &amp;H31 &amp;H31 &amp;H31 &amp;H31 <br>
  Conditions: &amp;HFC &amp;H3F &amp;H0 &amp;H69 <br>
  Key B: &amp;H32 &amp;H32 &amp;H32 &amp;H32 &amp;H32 &amp;H32 <br></p>
  
  <p>Now when trying to authenticate Block &amp;H1 or Block &amp;H2 again, error "wrong key" occurs.
  I already tried that with Block 4,5 as DATA Blocks and 7 as Key Block</p></li>
  </ul>
  
  <p>I've read so much information, but i don't find a good entry in this topic...
  thank you in advance</p>