MiFare default keys

View: New views
3 Messages — Rating Filter:   Alert me  

MiFare default keys

by Zec54 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jose,

do you know what are the phones default keys for reading and writing MiFare tags?

Regards,
Samo

Re: MiFare default keys

by josergc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Samo,

MIDlets are allowed writing on a Mifare 1k cards with a default password
“0xFFFFFFFFFFFF” for authentication.

You can check this at the end of the page 12 of the document "JSR257 with Extensions - BenQ Integration Guide-02d.pdf", and in the page 14 you will able to find a sample of code with this. Did you receive this manual? Could you check if this works?

Usually you will need this:

public static byte[] madKey = {
        0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 // Just the block of the sector 0
        };
public static byte[][] keys = {
        new byte[]{ 0xD3, 0xF7, 0xD3, 0xF7, 0xD3, 0xF7 } // NFC key
        ,
        new byte[]{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } // Mifare default key
        };


Thank you!

Best regards,

Jose

Re: MiFare default keys

by Zec54 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yeah, I got the manual. I missed the part about the writing on the MiFare tags and I have seen it now.
Thanks for the tip about reading and writing the mifare tags. Reading key beeing D3F7D3F7D3F7 and key for writing FFFFFFFFFFFF and of course for the first sector the key is A0A1A2A3A4A5.
Thanks Jose,  that was very very helpful.

Regards,
Samo