title: Cannot authenticate a sector in mifare card with correct key in android
body: <p>I have a mifare classic 1K card and custom Key. But unable to read/write using it. Need help to find my mistake.</p>
  <p>I have identified the key that is used to read/write the mifare card using NXP Taginfo and Mifare Classic Tool.
  It shows access bits as FF078000 and Key B is 222222222222
  Now I am using Key B to read the data from the mifare classic 1K card. Below is the code.</p>
  <p>NXP Taginfo tool output is <a href="https://ibb.co/mBhGPxN" rel="nofollow noreferrer">here</a>.</p>
  <pre><code>byte[] newkey = {(byte)0x00, (byte)0x33,(byte)0xBD,(byte)0x7A,(byte)0x03,(byte)0x8E};
  
  boolean authB = taskTag.authenticateSectorWithKeyB(6, newkey);
  Log.i(&quot;New Key&quot;+ new BigInteger(newkey).toString(), &quot;authB : &quot; + authB) ;
  </code></pre>
  <p>But authB  is returning false. what is wrong here?</p>
  <p>Any help is much appreciated.</p>
  <h2>Edit-1:</h2>
  <p>After extensive reading I figured I may have interpreted the access conditions wrongly. I think I may need to authenticate with Key A. But as per the access conditions key A is not readable. Am I correct here?</p>
  <h2>Edit-2</h2>
  <p>How come nxp tag editinfo/Mifare Classic Tool are able to read the data with the key as 222222222222 but I cannot?</p>