KeyA and KeyB and how to protect the contacless card from cloning?

card reader

Moderator: horse dream

Posts: 1
Joined: Wed Jun 05, 2019 12:18 pm
Points :14

KeyA and KeyB and how to protect the contacless card from cloning?

Post by djamelo » Wed Jun 05, 2019 12:29 pm

Hi all,
I have a Pos terminal that can write into contactless mifare card and read from contactless mifare card. For writing a Key A I use;
cCard_.loadKey(aKey, eKeyStore);
eKeyStore = 0;
aKey[6] = {“FF”,”FF”,”FF”,”FF”,”FF”,”FF”}

My access bits KeyA is in Sector 1 Block 3. Which means trailer block 7. Am I right?

If I am correct there are 16 sector. I already have my own Key other than “FFFFFFFFFFFF”. Example;

For Sector 0 Key A:
My_Key = “8fd0a4f256e9”;
My_Data1 = “2153”;
My_Data2 = “es56fg87p4f2”;
My_Data3 = “5852337644220001”;

In Block Number 0, I have My_Data3, in block number 1, I have My_Data2 and in block number 2, I have My_Data1.

I want to understand the how to set my key for Key A and Key B?
So when I say Block number 3, Key Store number 0 is it equal to “8f” or equal to “8fd0a4f256e9”?

I need to understand the key option so I can encrypt my keys so only my Pos terminal can access it.

CardNo: “5852337644220001”
CardPass: “es56fg87p4f2”
CardPin: “2153”
KeyA: “8fd0a4f256e9”

1) Which Sector do I have to use to store my data for above example? Can I use Sector 1?
2) In above table example how to I write My_Data1? Should I use Sector 1, Block 2, StoreNum 0, StoreNum1, StoreNum2, StoreNum3?
3) Can I store a data “2153” in sectore 1, block 2, storenum 0?

What type encryption do I have to use to protect my data from cloning?

I didn't find the right solution from the internet.
References: ... m-cloning/

Any help will be appreciated.
Thank you.

Who is online

Users browsing this forum: No registered users and 4 guests

JavaCard OS : Disclaimer