Secure commuincation speed Desfire Ev2

Forum / MIFARE and NFC Reader IC`s / Secure commuincation speed Desfire Ev2

Tagged: , ,

  • 29. May 2020 at 16:42
    Hi.

    We are using Desfire EV2 cards and AV3 sam.

    We have around 5 files, together about 800 bytes. When reading and writing all it takes around 300-400ms. But when we enable secure communication it takes around 900-1000 ms. Is this to be expected?

    Or are we doing something wrong?

    Best regards,

    Matej
    + 0  |  - 0

    Re: Secure commuincation speed Desfire Ev2

    2. June 2020 at 10:29
    Hi Matej,

    If you send plain data over a communication channel and the same data, but encrypted block by block before sending, then you will have a lower data rate, of course. Please do not forget, the MCU on the Smartcard is not the same you have in your laptop.

    If you communicate with Smartcards via NFC, you must change the way you read and write files on a PC operation system. On a NFC communication, each read or write is costly, therefore you should only read the bytes you really want to know. On the one hand the bit clock is limited and on the other hand the buffer size is limited. Both can be lifted, but you must implement the selection of higher clock rate and the larger buffer size. The next point is, this could not be supported on a particular card or reader terminal.

    The MIFARE DESFire allows it to read bytes with an offset and length parameter. If you need to know 8 bytes in file on a special offset, read the 8 bytes and then read the other bytes on a different position. My recommendation is to check which information do really want to know and try a more cleverer implementation of getting this data.

    The TapLinx team
    + 2  |  - 0

    Re: Secure commuincation speed Desfire Ev2

    2. June 2020 at 11:51
    Hi TapLinx

    Thanks for the answer.

    But would not reading multiple fields 1 by one increase the number of requests and with that make the communication even slower. I am no sure we can make all data fields follow each other because it's usage dependent. And we cannot limit to only one 8 byte field.

    BR

    Matej
    + 0  |  - 0

    Re: Secure commuincation speed Desfire Ev2

    2. June 2020 at 12:54
    Hi Matej,

    Of course, if really all bytes of a file are needed, then the partial reading is not efficient. But this is not a typical use-case. Then you should think about to lift the clock rate. The supported data rates of the card can be found in the RATS/PPS information. Usually four rates are available: 106, 212, 424 and 848 kbps. The default is 106 kbsp.

    You should also check the maximal communication buffer size. Can it be lifted? You should read or write data blocks which fit into the block size. If you send larger data blocks, it will work, but internally blocks are split and this make the communication slower.

    The next question is: do you need encryption? Sometimes it is enough to protected data against manipulation. In this case MACing is the right thing. Here the data can be wiretapped, but cannot be changed. Usually MACing is faster than fully encryption.

    Sorry, a lot of things to consider. By the way, the “8 bytes” was only an example. You can use any value for offset and length which is smaller than the file size.

    The TapLinx team
    + 1  |  - 0

    Re: Secure commuincation speed Desfire Ev2

    3. June 2020 at 8:24
    Hi.

    Thanks for all the answers. Especially only MACing I think it is the best speedup for us. Will also take a look at reader settings and the file structure. Probably optimizations are possible.

    Thanks.

    BR

    Matej
    + 1  |  - 0

    Re: Secure commuincation speed Desfire Ev2

    9. July 2020 at 22:42
    Nice
    + 0  |  - 0
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.