mifare

Byte array gets truncated when writing to memory of RFID tag using Adafruit PN532 library

杀马特。学长 韩版系。学妹 提交于 2019-12-24 10:35:27
问题 I'm trying to write a byte array that was converted from a hex string into the memory of an NTAG203 RFID tag. I'm using a Raspberry Pi 3, a PN532 chip and the Adafruit PN532 python library. hex_string = '59e7168f267df300018e15b0' formatted_hex = bytearray.fromhex(hex_string) byte_data = bytearray(16) byte_data[3:15] = formatted_hex if not pn532.mifare_classic_write_block(4, byte_data): print('Error! Failed to write to the card.') sys.exit(-1) When I do pn532.mifare_classic_read_block(4) to

Enable/Disable counter for NTAG213

我与影子孤独终老i 提交于 2019-12-24 10:19:55
问题 MifareUltralight mifareUltralight = MifareUltralight.get(tag); byte[] toggleCounterCommand = new byte[]{(byte)0xA2, // NTAG213 command to write (byte)0x2A, // page 42(dec) 2A(hex) (byte)___};// not sure what to put here. The data sheet for NTAG213 says that the 0th byte of page 42 has the access information. The 0th byte is structured in the following way : 7 6 5 *4* 3 2 1 0 PROT CFGLCK RFUI *NFC_CNT_EN* NFC_CNT_PWD_PROT AUTHLIM Setting the 4th bit to 0 or 1 should enable or disable the

DESFire authentification decipher

倾然丶 夕夏残阳落幕 提交于 2019-12-22 00:31:07
问题 I am currently working with DESFire EV1 contactless cards. I am trying to decipher a DES/CBC enciphered random_b with masterkey: "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00". I am using this code: byte[] encipheredCodeRandomB = { (byte)0xEA ,(byte)0x18 ,(byte)0xDE ,(byte)0xFF ,(byte)0x52 ,(byte)0x0E,(byte)0xCD, (byte) 90}; byte[] masterKeyBytes = "0000000000000000".getBytes(); byte[] ivBytes = "00000000".getBytes(); DESKeySpec desKeySpec = new DESKeySpec(masterKeyBytes); SecretKeyFactory

Mifare Application Directory Management?

半城伤御伤魂 提交于 2019-12-22 00:16:05
问题 [ Please only consider 1k classic cards in your answers. ] I am hoping to gain a bit of industry knowledge in the realm of RFID. Specifically, with the MIFARE MAD (Mifare application directory). I understand its architecture from reviewing the MIFARE MAD documentation published by NXP located here: http://www.nxp.com/documents/application_note/AN10787.pdf However, from this document a few questions arise. Who manages the initial MAD directory on a given card? I know that manufactures may

authentication error for mifare card “6982:Security status not satisfied”

这一生的挚爱 提交于 2019-12-21 23:52:43
问题 I know. This question asked before under same tag and same name here. But the answers are useless for me. and i opened again for real answers. I have pc/sc reader and Contactless card(mifare card), I can connect to the card and also I execute getdate command successfully, but when I want to authenticate I see this error "6982:Security status not satisfied" I've tried these 4 different commands for authentication but I get the same error for all of them. FF 88 00 00 06 FF FF FF FF FF FF FF 88

MIFARE card for payment with EMVco compliance

寵の児 提交于 2019-12-21 22:19:14
问题 I am working on an NFC-based payment device. I am using MIFARE DESFire EV1 chip. My question is: How to enable a full EMV compliant payment transaction with this chip hardware? I found this Visa Ring which does payment transactions. It uses NFC Ring® design of McLear & Co with NTAG IC. 回答1: How to enable a EMV payment transaction with MIFARE DESFire EV1? Simple answer: You can't. MIFARE DESFire is a proprieatry contactless smartcard system that implements a filesystem for data storage and an

Send APDU command to card through HID OMNIKEY 5427 CK

感情迁移 提交于 2019-12-21 12:57:14
问题 I'm trying to pass though APDUs command via HID OMNIKEY 5427 CK to operate MIFARE Card ie. Ultralight C card, on the Windows 10 x64 OS environment using WinSCard.dll. (I'm under NXP NDA and have full access t their documents) I tried to find information online for days now. Seem like no published document for this model except the 2pages brochure. The simple command like GetUID (FFCA000000) is OK, I can get back the actual card UID. But for 'Authentication with Card', reference document from

Mifare Ultralight C Lock

☆樱花仙子☆ 提交于 2019-12-18 18:28:12
问题 I'm attempting to lock a Mifare Ultralight C tag. I want to set NDEF pages 0x04 to 0x27 to read-only. I think this can be achieved via Ndef.makeReadonly() . Additionally, I would like to set pages 0x29 to 0x2F to be password protected (for read and write) so they can only be accessed after authentication was successful. I'm struggling to understand which bytes need to set in lock bytes (page 0x28, bytes 0, 1) and if sectors 0x2A and 0x2B need to be set as well. 回答1: I'm attempting to set NDEF

Recover sector in Mifare Classic 1k with overwritten permission bits

时间秒杀一切 提交于 2019-12-18 16:50:55
问题 I have mistakenly overwritten sector 1 block 7 of one of my Mifare classic 1k tags. It was meant for testing and the 16 byte data that I wrote on block 7 is shown below: 0xaa 0xaa 0xaa 0xaa 0xbb 0xbb 0xbb 0xbb 0xcc 0xcc 0xcc 0xcc 0xdd 0xdd 0xdd 0xdd If not mistaken, by doing so, my access keys and permission bits have become as following: Key-A: 0xaa 0xaa 0xaa 0xaa 0xbb 0xbb Key-B: 0xcc 0xcc 0xdd 0xdd 0xdd 0xdd Permisssion Bits: --> 0xbb 0xbb 0xcc I have tried to use Key-A and Key-B as shown

Recover sector in Mifare Classic 1k with overwritten permission bits

浪子不回头ぞ 提交于 2019-12-18 16:50:07
问题 I have mistakenly overwritten sector 1 block 7 of one of my Mifare classic 1k tags. It was meant for testing and the 16 byte data that I wrote on block 7 is shown below: 0xaa 0xaa 0xaa 0xaa 0xbb 0xbb 0xbb 0xbb 0xcc 0xcc 0xcc 0xcc 0xdd 0xdd 0xdd 0xdd If not mistaken, by doing so, my access keys and permission bits have become as following: Key-A: 0xaa 0xaa 0xaa 0xaa 0xbb 0xbb Key-B: 0xcc 0xcc 0xdd 0xdd 0xdd 0xdd Permisssion Bits: --> 0xbb 0xbb 0xcc I have tried to use Key-A and Key-B as shown