Key incjection from AV2 to Desfire EV2

Forum / MIFARE SmartCard IC`s / Key incjection from AV2 to Desfire EV2

  • 15. October 2020 at 15:05
    Hello.

    On our project, AV2 SAM was selected to store private keys for PICC access. The problem we are facing is that we can't inject keys into EV2 from AV2 sams. Authentication works over crypto-offline keys. But key injection seems to work only if we dump keys. Any suggestions would be welcomed.

    BR

    Matej
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 9:19
    Hi Matej,

    Of course, you can change keys of a PICC with a MIFARE SAM AV2! I recommend reading the AN:

    AN1826 – MIFARE SAM AV2 - For MIFARE DESFire EV1

    Please have a look to chanpter:

    2.7 Changing MIFARE DESFire Key using MIFARE SAM AV2

    You will find there an example how to do that.

    Please take in mind, we cannot talk about the details on this public portal. The MIFARE SAM documents are NDA protected.

    The TapLinx team
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 9:57
    Yes. But this document is for EV1. Will it work for EV2?

    BR

    Matej
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 10:41
    Hi Matej,

    The DESFire EV1 is a subset of the EV2. This means the basic functions for EV2 are the same as for the EV1. In your case you can take this document and personalize the PICC with the SAM AV2. For the MIFARE SAM AV2 no new ANs will be published because the SAM AV3 is the current hardware.

    The TapLinx team
    + 1  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 11:30
    Hi. Basic functions yes, but can we use keysets? Which is specific EV2 function.

    BR


    Matej
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 13:15
    Hi Matej,

    You change the keys in the current key set with the SAM AV2. To change other keys, you must change the key set.
    If you want to deal with DAM keys which is exclusive for the DESFire EV2, you must migrate to the MIFARE SAM AV3.

    The TapLinx team

    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 14:24
    Hi.

    Currently we are not interested in DAM keys, but we would like to write keys for multiple keysets. If I recall correctly, if we change/roll key set, we can not change it back, or not?

    Best regards,
    Vojko
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 15:02
    Hi Matej,

    The key rolling is unidirectional after the finalizing. You cannot roll back the key set of a MIFARE DESFire EV2. With the SAM AV2 you can change only the current key set.

    But you should think to use the SAM AV3. There are more options for the DESFire EV2. One recommendation. Please have a look to this AN:

    AN5070 Using multiple application keysets in MIFARE DESFire EV2

    The TapLinx team
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 15:18
    Hi.

    The AN5070 Using multiple application keysets in MIFARE DESFire EV2 and other documents clearly state that ChangeKeyEV2 command has to be used for changing keys in specific keysets, but if we are not mistaken AV2 does not have support for ChangeKeyEV2 command, at least not as the AV3. Or are we missing something.
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    19. October 2020 at 15:27
    Also, to be able to use ChangekeyEV2, EV2 authentication has to be performed, which can only be achieved by using crypto offline key on AV2 (AN3656 Use of MIFARE SAM AV2 for MIFARE DESFire EV2 extended features). But only PICC type keys can be injected onto PICC card from SAM.

    Br,
    Vojko
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    20. October 2020 at 10:35
    Hi Vojko,

    The MIFARE SAM AV2 has no support for a MIFARE DESFire EV2! The SAM AV2 supports only a DESFire EV1. If you do not want to use EV2 features (like key rolling), you can still use the SAM AV2. But then you can change keys only in the current key set. In your case if you want to use the DESFire EV2 features of the SAM, you must use the SAM AV3.

    The TapLinx team

    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    20. October 2020 at 12:21
    Hi.

    Understood.
    Thank you very much for your help.

    BR,
    Vojko
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    5. November 2020 at 10:11
    Hi.

    The AN5070 Using multiple application keysets in MIFARE DESFire EV2 and other documents clearly state that ChangeKeyEV2 command has to be used for changing keys in specific keysets , but if we are not mistaken AV2 does not have support for ChangeKeyEV2 command, at least not as the AV3. Or are we missing something.
    + 0  |  - 0

    Re: Key incjection from AV2 to Desfire EV2

    5. November 2020 at 10:14
    Hi Nico,

    MIFARE SAM AV2 supports all features of MIFARE DESFire EV2 = NO
    MIFARE SAM AV3 supports all features of MIFARE DESFire EV2 = YES

    The TapLinx team
    + 0  |  - 0
Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.