Forum › MIFARE SDK › com.nxp.nfclib.exceptions.InvalidResponseLengthException: Authentication Error › Reply To: com.nxp.nfclib.exceptions.InvalidResponseLengthException: Authentication Error
Hi Nitheesh,
Please let us split the problem. The authentication can be done with a local key. If it really comes from a SAM is a different matter. Using DES keys bear always the issue of invalid keys. For instance, 00…00 is an invalid 2K3DES key, because the 8 upper bytes are equal to the 8 lower bytes. The DESFire comes with DES keys as default, but you should always change the cipher to AES for your application.
We have a lot of examples where we show the authentication and the change of keys for a MIFARE DESFire:
DESFire EV1 authenticate with different keys for reading and writing:
DESFire EV1 change key:
DESFire EV2 Read/write encrypted file:
DESFire EV1 Create app and file with 2K3DES cipher:
The TapLinx team
Please let us split the problem. The authentication can be done with a local key. If it really comes from a SAM is a different matter. Using DES keys bear always the issue of invalid keys. For instance, 00…00 is an invalid 2K3DES key, because the 8 upper bytes are equal to the 8 lower bytes. The DESFire comes with DES keys as default, but you should always change the cipher to AES for your application.
We have a lot of examples where we show the authentication and the change of keys for a MIFARE DESFire:
DESFire EV1 authenticate with different keys for reading and writing:
DESFire EV1 change key:
DESFire EV2 Read/write encrypted file:
DESFire EV1 Create app and file with 2K3DES cipher:
The TapLinx team
+ 0
|
- 0