Forum Replies Created

  • Re: Reply To: How to encrypt Sector 1 Data Values?

    17. May 2016 at 6:24
    in reply to: How to encrypt Sector 1 Data Values?
    Hi gpagliaroli,

    Thank you for suggestion. In card data written phase I use C# and I am sure I can find short tutorial or example for AES encryption. But in my Pos terminal is embedded Linux and I use QT develop an application using C++. Does AES works on an embedded Linux terminal? Or do you know any information about AES with using QT on embedded terminals?

    Kind Regards

    + 1  |  - 0

    Re: Reply To: How can I achieve 1 time or 2 time use logic?

    11. March 2016 at 10:32
    in reply to: How can I achieve 1 time or 2 time use logic?
    Hi @mifaresdk,

    The customer can only show his card in enterance. There is no out. My quesiton was confusing. I mean; 1 services assign to a card A customer. And If customer try to get services for his/her companion the card must be decline for at least 6 hours or 24 hours.

    So you mean in first time I have to write a entery date and time into the card. Than in a few second time If customer wants to use his/her card for companion the terminal will read the card enetery date and prosses the info. Than I should also write a usege into the card. So if the usege is 1 and date time is now terminal will decline second entery at the same time for his/her companion. Am I right?

    Kind Regards
    + 1  |  - 1

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    23. February 2016 at 10:32
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Hi @mifaresdk,

    Yes, I didn’t remove the card. I will re code in that part that after I write into data, I will use beep to make sure user removes card before reading.

    Thank you for the greeting.

    I am also hoping to attend a mifare training September 20016 in Istanbul to learn more about other Mifare card programming.

    Kind Regards,

    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    22. February 2016 at 19:07
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Hi @mifaresdk,

    I thank you for all the support you provided for me.

    The dump tool for the MIFARE Classic has an option so I can enter my new read and write key.
    But I guess I made some mistake while inserting new key so even dump tool also can’t read the sectors trailer.

    If I don't change the sector trailer keys then I can write my data and read back as I expected.

    The default key registered in 0x00 contactless card controller and the new key registered in 0x01.
    Something here is not right. So I will forward my questions to my contactless card controller SDK team and seek their answers.

    Kind Regards


    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    22. February 2016 at 10:42
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Hi @mifaresdk,

    Attached picture is shown after I write block trailer 7 and 11 with new key. (49DB59CFF2F308778FFF2CBF23931A13) which is not readable.

    When I use mifare classic tool in my android phone and load the all sector variable I use extended-std.keys files to read all the sector.

    In my extended-std.keys files I include my new key as well. (49DB59CFF2F3 2CBF23931A13) and still cannot read the sector 1 and 2.

    Kind Regards,
    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    22. February 2016 at 9:11
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    In above post I write less on the new key. My new key is:


    Write( 7, 49DB59CFF2F30 8778FFF  F2CBF23931A13 ) // write to sector trailer the new keys



    Kind Regards

    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    22. February 2016 at 8:55
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Hi @mifaresdk,

    You can find the tool in here: h**ps://play.google.com/store/apps/details?id=de.syss.MifareClassicTool&hl=tr
    Yes default key doesn't work for sector 1. Because I change the key in step 8 with

    Write( 7, 49DB59CFF2F30 8778FF F2CBF23931A13 ) // write to sector trailer the new keys



    In step 9 I get 63 00 error that is not authenticate with new key. I am wondering is it possible to after writing in step 8 should I have to disconnect.
    Then connect again load new key and try to read? I am not sure if mifare classic card works that way.

    Now my Sector 2 is;
    +Sector: 2
    0
    0
    0
    FFFFFFFFFFFFFF078069FFFFFFFFFFFF


    I am going to change my code to write in block 8, 9 and 10. I will also write in sector trailer with new keys.
    Then in step 9 I will again try to authenticate with new key to read the sector 2 data on block 8, 9 and 10.

    Kind Regards,
    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    21. February 2016 at 9:49
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Hi @mifaresdk,

    With the below steps 9 I cannot be able to Authenticate to read card for verification. In step 7 I have new key as:
    KeyA = 49DB59CFF2F3 AccesBits = 08778FFF KeyB = 2CBF23931A13

    Somewhere in the steps I am making big mistake so I cannot read my data anymore. With my gsm phone I download the mifare classic tool. And you can see the out put
    below in this post. As you can see Sector 1 is not readable. ?????

    1) Connect
    2) LoadKey( 0, FFFFFFFFFFFF ) // default key
    3) LoadKey( 1, 1665FE2AE945 ) // your access key A
    4) Authenticate( 4, 0 ) // authenticate to block 4 with key store 1 = default key
    5) Write( 4, 58523376442200010000000000000000 ) // Write My_data1 to block 4
    6) Write( 5, “es56fg87p4f2 ” ) // Write My_data2 to block 5 as ASCII bytes (with space chars at the end)
    7) Write( 6, 21530000000000000000000000000000 ) // Write My_data3 to block 6
    8) Write( 7, 49DB59CFF2F308778FFF2CBF23931A13 ) // write to sector trailer the new keys
    9) Authenticate( 4, 1 ) // authenticate to sector 1/block 4 with the new key A
    10) Read( 4, ... ) // read the data back for verifying
    11) Read( 5, ... ) // read the data back for verifying
    12) Read( 6, ... ) // read the data back for verifying
    13) Disconnect


    Reading Card with mfare classic tool:

    +Sector: 0
    F06D371DB7880400C206000000000013
    0F0003E103E103E103E103E103E103E1
    03E103E103E103E103E103E103E103E1
    A0A1A2A3A4A5787788C1FFFFFFFFFFFF
    +Sector: 2
    0
    0
    0
    FFFFFFFFFFFFFF078069FFFFFFFFFFFF
    +Sector: 3
    0
    0
    0
    FFFFFFFFFFFFFF078069FFFFFFFFFFFF
    +Sector: 4
    0
    0
    0
    FFFFFFFFFFFFFF078069FFFFFFFFFFFF


    Kind Regards
    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    19. February 2016 at 10:11
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Kind Thanks,

    I remove authenticate(5) and (6).

    But I leave it as it is for "read for verifying". I want to make sure I am doing someting right with card.
    It takes a second to verify anyhow. So there is no cost.

    For verification I will use new Key A. For Writing I will use new Key B. I will use writing with new Key B later in my card operation.

    Thank you very much. You saved my day.

    Kind Regards.
    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    19. February 2016 at 7:21
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Hi @mifaresdk

    One of the above post you mention the steps example as;

    LoadKey( 1, FFFFFFFFFFFF )   // default key
    LoadKey( 2, 1665FE2AE945 ) // your access key A
    Authenticate( 4, 1 ) // authenticate to block 4 with key store 1 = default key
    Write( 4, 58523376442200010000000000002153 ) // Write My_data1 and My_data3 to block 4
    Write( 5, “es56fg87p4f2 ” ) // Write My_data2 to block 5 as ASCII bytes (with space chars at the end)
    Write( 7, 1665FE2AE945XXXXXX003321FB75A356 ) // write to sector trailer the new keys
    ...
    Authenticate( 4, 2 ) // authenticate to sector 1/block 4 with the new key A
    Read( 4, ... ) // read the data back for verifying


    My Question is that in first Authentication is for the block 4. Should I be need to authenticate blcok 5, 6 and 7 as well?
    Before continue my coding I need to make sure that I am understand correctly.

    Here is my steps:
      Default key is in 0 (0x00) New key in 1 (0x01)

      I need to write each data for different block


    LoadKey( 0, FFFFFFFFFFFF )             // default key
    LoadKey( 1, 1665FE2AE945 ) // your access key A
    Authenticate( 4, 0 ) // authenticate to block 4 with key store 1 = default key
    Authenticate( 5, 0 ) // authenticate to block 4 with key store 1 = default key
    Authenticate( 6, 0 ) // authenticate to block 4 with key store 1 = default key
    Write( 4, 58523376442200010000000000000000 ) // Write My_data1 to block 4
    Write( 5, “es56fg87p4f2 ” ) // Write My_data2 to block 5 as ASCII bytes (with space chars at the end)
    Write( 6, 21530000000000000000000000000000 ) // Write My_data3 to block 6
    Write( 7, 1665FE2AE945XXXXXX003321FB75A356 ) // write to sector trailer the new keys
    Authenticate( 4, 1 ) // authenticate to sector 1/block 4 with the new key A
    Authenticate( 5, 1 ) // authenticate to sector 1/block 4 with the new key A
    Authenticate( 6, 1 ) // authenticate to sector 1/block 4 with the new key A
    Read( 4, ... ) // read the data back for verifying
    Read( 5, ... ) // read the data back for verifying
    Read( 6, ... ) // read the data back for verifying


    Can you tell me that my steps are correct?

    Kind Regards
    + 0  |  - 0

    Re: Reply To: What is MIFARE Classic 1K Access Bits means? How to calculate and use it?

    17. February 2016 at 13:00
    in reply to: What is MIFARE Classic 1K Access Bits means? How to calculate and use it?
    Hi mifaresdk,

    Thank you very much. I understand now. I will hope not to forget it in near future. :)
    You answered perfectly.

    Kind Regards
    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    16. February 2016 at 16:00
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Kind Thanks,

    I want to use only one application that can access only sectors 2 and 3. My card will be going to use only my pops terminal.
    I already change key A and key B from all sector. I am guessing I am protected. I will look into PCSC-Lite later.
    Thank you very much for all your help.

    Kind Regards



    + 0  |  - 0

    Re: Reply To: What is MIFARE Classic 1K Access Bits means? How to calculate and use it?

    16. February 2016 at 15:53
    in reply to: What is MIFARE Classic 1K Access Bits means? How to calculate and use it?
    Hi mifaresdk,

    That is my problem. I read all the that info and get very confuse. I calculated mant time and find many diffrent answer.
    And after reading your mail;

    1) Access conditions for data block 0
    2) Access conditions for data block 1
    3) Access conditions for data block 2
    4) Access conditions for the sector trailer

    For all conditions I have to set "Access Bits" as follows.

    1) Use Key A for reading
    2) Use Key B for writing

    I find that I have to use;

    08778F FF (08778FFF)

    as a access bits so I can use Key A to read all conditions and I can use Key B to write all conditions. I attached the picture as well.

    Am I right or wrong?

    Kind Regards,
    + 1  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    15. February 2016 at 18:58
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    Thank you mifare sdk.

    I will try to implement the steps tomorrow.

    1) My question on this topic is that how secure will be my card after I change the keys with the new keys that showed in your example?

    Write( 7, 1665FE2AE945XXXXXX003321FB75A356 ) // write to sector trailer the new keys


    2) At the moment I am using only one application in mifare classic. So is it possible to change all other sector trailer blocks key?
    3) What should I have to do to protect my card from cloning?
    4) Does mifare classic has any encryption or do I have to apply it by myself?
    5) I am using Ubuntu 12.04 and the Qt IDE for development. My Pos Terminal has embedded Linux. So what kind of the secure encryption can I use?

    Kind Regards,


    + 0  |  - 0

    Re: Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

    15. February 2016 at 10:53
    in reply to: KeyA and KeyB and how to protect the contacless card from cloning?
    So I couldnt edit;

    I know I have to use new sector trailer as;
    “new key A” | access bits | general purpose byte | “new key B”
    + 1  |  - 0
Viewing 15 posts - 1 through 15 (of 20 total)