After trying some things it was not that hard after all.
The Java Documentation of the API already helps a lot.
@nxp_TEAM I hope I do not break any NDA by posting this info.
If this is the case feel free to delete this post.
The goal is to help other people, saving some time and making the dev experience better.
My solution was:
idesFireEV3.changeKey(0, KeyType.AES128, OLD_DES_KEY, NEW_AES_KEY, KEY_VERSION)
You can find the current KEY_VERSION of the master key (0) by executing:
idesFireEV3.getKeyVersionFor(0)
and then increase the version by 1.
The authentication then no longer works with
val keyData = KeyData()
keyData.key = SecretKeySpec(OLD_DES_KEY, "DESede")
idesFireEV3.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.THREEDES, keyData)
but with
val keyData = KeyData()
keyData.key = SecretKeySpec(NEW_AES_KEY, "AES")
idesFireEV3.authenticate(0, IDESFireEV1.AuthType.AES, KeyType.AES128, keyData)
I also saw the method
authenticateEV2First
and are currently looking into it.
Seems like a more secure authentication method starting from EV2 cards?
Kind regards from Germany