Changing authentication key of a sector in MIFARE Classic
<p>According to Evan's answer in <a href="https://forums.tessel.io/t/change-auth-code/1091" rel="nofollow noreferrer">this page</a>, in order to change the authentication key of a sector we need to overwrite the key in the 4th block (final block) of that sector.</p>

<p>The default key is always 'FF FF FF FF FF FF' which is a six bytes key. Now if I try to change it using the <code>write</code> method from the <a href="https://github.com/ondryaso/pi-rc522/blob/master/pirc522/__init__.py" rel="nofollow noreferrer">pi-rc522 library</a>, it raises an <code>Index Error</code> because each block has to be 16 bytes, but the authentication key is only 6 bytes long.</p>

<p>Where am I going wrong?</p>

<p>The device is RC522 and I am using Raspbian on Raspberry Pi 3.</p>