You are on page 1of 4

Develop Reference Home About Us Contact Us

html css asp.net node.js angularjs

Categories Resources
EMV Reading PAN Code - apdu
HOME javascript
angularjs android
opencv
Première expédition? java
yii csharp
routing Ad Essayez DHL, les experts de la logistique. php
logging python
Ad
wxmaxima ios
DHL Madagascar
tibco-ems jquery
webpack-hmr html
idris En savoir plus sql
theorem-proving
bundler I need to read the PAN Code of every possible card through chip.
cpu-usage In my job I have to use only C and I haven't routines that can help me in this boring task.
npgsql So that's the steps APDU that I use:
android-studio-3.0 1) SELECT 1PAY.SYS.DDF01
asp.net-core-2.0 00 A4 0400 0E 315041592E5359532E4444463031
3ds and then 00 C0 0000 22 315041592E5359532E4444463031 from the response to read all datas.
nvd3.js Complete Response:
center 6f 20 e 84 31 50 41 59 2e 53 59 53 2e 44 44 46 30 31 a5 e 88 1 1 5f 2d 69 8 74 65 6e 66 72 65 73 90
google-cloud-speech 2) READ RECORD to get the specific AID
feature-selection 00 B2 010C 00
constraint-programming Complete Response:
ef-core-2.0 70 17 61 15 4f 7 a0 0 0 0 4 30 60 50 7 4d 41 53 54 52 45 4f 87 1 1 90
bison 3) SELECT AID (in my case the AID is A0000000043060 from the previous response)
samsung-mobile 00 A4 0400 07 A0000000043060
layer Also in this case, I have response: 61 36, so I re-call the command with:
advertisement 00 C0 0000 36 A0000000043060
wrapper Complete Response:
netlink 6f 0 41 45 53 52 4f 54 87 1 1 34 84 a0 7 0 0 4 30 60 a5 29 50 7 4d 5f 2d 8 69 74 65 6e 72 66 65 73 bf c f 9f 4d 2 b a 9f 6e 3 7 80 0 0 30 30 0 90
shopping-cart Now every command that I use, will get wrong message.
jclouds I don't understand if I have to use READ DATA, READ RECORD, GET PROCESSING OPTIONS or something else.
external Can you give me a tip on what I have to do now?
symphony-cms I need to get the 16 char code of the card, the one that is normally printed clearly on the card.
derbyjs Thanks to everyone
jazzy
mutate The 8 Byte (16 Digit) code printed on Smart Card (Payment Chip Card) is retrievable. This information is the part of "Track 2 Equivalent Data" personalized in
netflix the records in Tag 57.
preprocessor You can slice the initial 8 Bytes of this "Track 2 Equivalent Data" to get your code.
android-pdf-api Now How to Get "Track 2 Equivalent Data":
b-tree SELECT Payment Application (excluding the PSE/PPSE process here, since you are able to do it)
clear Send GPO command. Normally 80 A8 00 00 02 83 00 is the APDU for GPO if no PDOL data is required in GPO command APDU. (If 9F38 tag is not present in
opera-extension the response of SELCT command then Simply send this APDU, otherwise PDOL must be created). See EMV 4.3 Book 3 Section 6.5.8 for more details about
flash-builder GPO response.
postgresql-8.4 You will get AFL in the response of GPO and Read all the available records from application as per AFL. Normally track 2 data could be found within 2 or 3
ratpack initial records.
paho To understand the coding of AFL you can refer Section 10.2 EMV 4.3 Book 3.
pymodbus3 To understand the READ RECORD APDU construction refer EMV 4.3 Book 1 Section 11.2.
info.plist One of record must contain Tag 57 and you can fetch the value.
elki
kafka-python
jquery-datatables-rails Mingpu 1kw off Grid Solar Power...
elastic-apm
jenkins-mstest
MGA 4,377,600
nlm
amplience-dynamic-content
Ad Made-in-China.com
seed
fusion360
appsource
Learn more
crc32
fibonacci-heap
blktrace
affdex-sdk Related
csr
ds9
email-notifications Not getting AFL for Visa Contactless Application?
der I am not getting AFL in the GPO command for Visa contactless Application
event-bus GPO Request as Below:
computation Request :80 A8 00 00 12 83 10 B6 60 40 00 00 00 00 01 00 00 00 00 38 39 30 31 00
apache-stanbol Tag 9F 66: Terminal Transaction Qualifiers : B6 60 40 00
cublas Tag 9F 02: Transaction Amount : 00 00 00 01 00 00
google-input-tools Tag 5F 2A: Transaction Currency Code : 03 56
skype4py Tag 9F 37: Unpredictable Number : 38 39 30 31
crontab Getting AFL is not mandatory. If you do not get AFL you are not expected to do any READs. You need not do some functions like ODA as you wont have
nsvisualeffectview data associated with it. You can proceed with the available data as such.
aurelia-http-client As per VISA specification (VCPS), AFL is not mandatory.
initializer If it is not returned in GPO the kernel shall skip the READ RECORDS and proceeds to Card Read Complete.
analog-digital-converter
sourcetree
google-prediction
rtems
livefyre
dozer
cpplint
facebook-fql /
mousehover
mediaroom Mingpu 1kw off Grid Solar Power...
threetenbp
bonfire
jboss-portal MGA 4,377,600
omnifocus Ad Made-in-China.com
funq
liferay-hook
opa Learn more
nest-initiative
symbol-table
argument-passing
smil
APDU command change IMSI SIM CARD
data-cleansing I am trying to use UPDATE BINARY command using APDU command for modify IMSI code, but The response is 98 04.
abortbroadcast A0 A4 00 00 02 3F 00 -> SELECT MF
openiso8583.net A0 A4 00 00 02 7F 20 -> Select DF_GSM
texmacs A0 A4 00 00 02 6F 07 ->Select EF_IMSI
cgimageref A0 D6 00 00 09 [08 79 03 30 60 00 61 33 23] -> UPDATE IMSI FOR RANDOM NUMBER
alarms when doing this I get the following response 98 04 and it is not modified.
convex According to the documentation The response 98 04 can mean the following:
mercurialeclipse access condition not fulfilled
vml unsuccessful CHV verification, at least one attempt left
ccsprite unsuccessful UNBLOCK CHV verification, at least one attempt left
objectcontext authentication failed
chatroom How I can change IMSI?
graph-layout Thank you.
You need first to Verify CHV (PIN1 for IMSI).
Use the following APDU and replace your PIN1 value.
-> A0 20 00 01 08 31 32 33 34 FF FF FF FF
<- 90 00
Caution: If you use wrong PIN value, it will be disabled after 3 times.
In order to update IMSI file on SIM , UPDATE command header and data part should be generated according GSM 03.48 specification. For the SIM file
structure 31.102 is the specification.
Command header parameters should be obtained from SIM vendor. Minimum security Level parameter will definitely enforce encryption and cryptographic
cHecksum usage for securing the command data, because real SIM card card manager expects MSL parameters something like that 0x25, so KiC and KiD
key values are required.

Centre de formation agréé

Ad Démonstration sur site


Ad
SEWERIN

Ouvrir

Send TgInitAsTarget command to PN532 (ELEHOUSE module) , get ACK frame back, but lost the normal information frame
I am getting started with a PN532 NFC module recently. I can successfully read/write M1 and S50 cards.
Now I am trying to learn how to use P2P communication. However,
when I send a TgInitAsTarget command to the PN532 (ELEHOUSE module), I receive an ACK frame, but I never receive the normal information frame that
should follow afterwards.
Here are my steps:
Get PN532 into target mode by sending TgInitAsTarget command:
TgInitAsTarget:
{ 00 00 ff 0x27 0xd9
d4 8c 04
08 00 12 34 56 40
01 fe a2 a3 a4 a5 a6 a7 c0 c1 c2 c3 c4 c5 c6 c7 ff ff
aa 99 88 77 66 55 44 33 22 11
00
00
fd 00 }
Get a second PN532 into initiator mode by sending InJumpForDEP command:
InJumpForDEP:
{ 00 00 ff 0a f6
d4 56 01 02
01 00 ff ff 00 00
d4 00 }
Put the initiator above the target.
When I read the information received from the target through UART, I get the following:
target->pc:
{ 01
00 00 ff 00 ff 00 }
This seems to be an ACK frame indicating that the TgInitAsTarget command was processed correctly. But afterwards the PN532 does not send the normal
information frame containing the result of the TgInitAsTarget command and the target is always in busy state.
What is going wrong here?
Several things seem to be wrong with your commands.
First of all, the InJumpForDEP command seems to be malformed. That command decodes to the following:
d4 56 InJumpForDEP
01 ActPass = Active Mode
02 Baud Rate = 424 kbps
01 Next = NFCID3i
00 ff ff 00 00 NFCID3i ? (HERE is the problem)
The NFCID3i field of that command is not valid. An NFCID3i must consist of 10 bytes (e.g. 11 22 33 44 55 66 77 88 99 AA). The easiest way would be to let
the PN532 automatically generate a random NFCID3i by not specifying an NFCID3i field at all:
d4 56 InJumpForDEP
01 ActPass = Active Mode
02 Baud Rate = 424 kbps
00 Next = none
Note that length field and checksum of the command frame need to be adapted accordingly.
The initiator is polling in active mode at baud rate 424 kbps. However, with your TgInitAsTarget command, you instruct the target to listen in PICC mode
/
only:
d4 8c TgInitAsTarget
04 Mode = PICC only ! (HERE is the problem)
08 00 12 34 56 40 MifareParams
01 fe a2 a3 a4 a5 a6 a7 c0 c1 c2 c3 c4 c5 c6 c7 ff ff FelicaParams
aa 99 88 77 66 55 44 33 22 11 NFCID3t
00 no Gt
00 no Tk
Consequently, the target will only operate as ISO/IEC 14443-4 PICC (which is similar to passive mode at 106 kbps). Therefore, the initiator and the target
are configured to speak two completely different protocols and, hence, do not understand each other. As a result, the PN532 in target mode will never be
invoked by the PN532 in initiator mode and will, consequently, never return from the TgInitAsTarget command.
In order to configure the target in a way that is compatible to your initiator configuration, you could use this:
d4 8c TgInitAsTarget
02 Mode = DEP only
08 00 12 34 56 40 MifareParams (not used in active mode)
01 fe a2 a3 a4 a5 a6 a7 c0 c1 c2 c3 c4 c5 c6 c7 ff ff FelicaParams (not used in active mode)
aa 99 88 77 66 55 44 33 22 11 NFCID3t
00 no Gt
00 no Tk (not used in active mode)
Finally,I solved the problem, it is a hardware problem ,and i buy new PN532 module. The normal information frame return successfully。 Thanks anyway
#Michael Roland .

Why is the card refusing the GPO command?


I am working with a Visa CDET contact-less test card. I have successfully selected the Application, which gave me the following result:
<= 6f 29 84 07 a0 00 00 00 03 10 10 a5 1e 50 0b 56 49 53 41 20 43 52 45 44 49 54 5f 2d 02 65 6e 9f 38 09 9f 66 04 9f 02 06 9f 37 04
The result included a PDOL which asked for the following items:
Terminal Transaction Qualifiers
Length: 4 bytes
Authorised Amount
Length: 6 bytes
Unpredictable Number
Length: 4 bytes
When it comes to the GPO command, I do have all the elements needed as shown below:
=> 80 a8 00 00 10 83 0e f3 20 40 00 00 00 00 00 12 00 bc 4b a2 3f 00
But when i run the command, I received a 67 00 error: Wrong Lc length. What could be the issue? Keep in mind the same program works perfectly when
working with Visa CDET Contact test cards from the same kit.
EDIT:
About the same problem, I have a test reader that I use to confirm my readings. The reader and its program can get the GPO options and return the result
for other cards, but my program is not giving me any results when I try the EXACT same command using the EXACT same card in my custom program. The
result is a blank, yet the status words are 90 00 (they are separate from the returned data). Why is that?
Just assume first, that the card is right: If the length of data object 83 is 0x0F (instead of 0x0E) if I counted correctly, then the total length to be supplied in
LC has to be 0x11 instead of 0x10 (tag and length to be added). This does not explain, why the contact version works, but possibly it still will work after the
adjustment.
I received a 67 00 error: Wrong Lc length.
ok, its because you dont have Lc=0x00 in APDU
just add 0x00 to APDU

Type B NFC Chip in US Passport MRTD


I am trying to read a US Passport, issued 2010. It has an NFC chip in it using type B modulation. Most countries use Type A so I am just trying Type B now
for the first time.
I am using an NXP PN532 NFC Controller. I am using the inCommunicateThru instruction rather than the inDataExchange since I need to manually control
the timeouts and error handling to successfully talk to a type B chip on this model NFC controller. I had to implement parts of the ISO-14443-4 protocol
myself, such as the PCB, CID and CRC bytes, however it seems to work. I am able to select the application and request a challenge nonce from the tag.
The issue is that a lot of extra data is returned on top of the SW1 SW2 bytes, even when no return data is expected. For example, in response to a select
MRTD application command (INS = 0xA4), there are many bytes returned:
Sending Type 4B Frame (PCB = 0A, CID = 01, CRC = 8A 2E)
-> 0A 01 00 A4 04 0C 07 A0 00 00 02 47 10 01 8A 2E
Type 4B Response Frame Received:
-> 0A 01 62 36 82 01 38 83 02 00 11 85 01 00 84 07 A0 00 00 02 47 10 01 86 0D FF FF FF FF FF FF FF FF FF FF FF FF FF 8B 12 FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF 90 00
Then I try to get a challenge nonce by sending Type 4B Frame:
->0A 01 00 84 00 00 00 8E 3E
Note: For some reason I need to set Le to 00 for this to not give me a wrong length error
Type 4B Response Frame Received:
->0B 01 90 9C 46 70 EC 02 BF FC 6E E2 A6 40 2D A5 0C 5F 93 02 B6 EB B5 61 1B BA 90 00
The first two bytes are the PCB and the CID, and the last are the SW1 SW2, that I understand.
It is the bytes in BOLD that I cannot interpret. Does anyone have any experience with US MRTDs or other Type B NFC chips that can help me interpret
these bytes? Is there a reference that I lack that can explain these extra bytes?
*****UPDATE 27-Nov-2014*******
Okay no, I wasn't crazy, the Get Challenge command is weird with this passport in that setting Le to 0x08 as per the ICAO spec yields a 6700 error, but with
Le=0x00, too many bytes returned. Using inDataExchange (not inCommunicateThru) to get the challenge works (as in, I get 8 bytes). This way I don't have
/
to guess which 8 bytes are the challenge.
So great, now I with the challenge and the static public key in hand, I can execute the mutual authenticate instruction with the extended timeout mode and
get the response bytes. The INS is 0x82, P1,P2 = 0x00, Le,Lc=0x28
The result is that I get back a 0x00 from the PN532 (NFC controller), but no return bytes! Not even SW1 or SW2. Below is an example:
Sending Type 4B Frame: 0A 01 00 82 00 00 28 73 3D 4E 2E C1 37 18 99 49 7C 4B 2A E0 79 A8 08 E2 6B 14 53 56 2C A4 66 D5 3E D8 94 56 79 50 2A 0D
6B C6 9A 75 5E B1 CB 28 11 75
Type 4B Response Frame Received: D5 43 00
The ITALIC bytes are the protocol bytes, the BOLD are the actual APDU
Does anyone know what the idiosyncrasies are in the U.S MRTD Passport issued 2008-2010?
In the first APDU response you probably get the FCP and FCI data back from the chip. This is weird because you explicitly told the application that you
didn't want it (by specifying P2=0C in the SELECT by NAME APDU that you send).
What you get back is ASN.1 encoded, check the link here. The explanation of these bytes is in ISO/IEC 7816-4. You probably need to get that standard
somehow.
As for the get challenge, you specify an Le with value 00. This translates into an Ne with value 256. As Ne is the maximum size, you basically ask the
eMRTD to return everything it can, up to 256 bytes. The 22 bytes you get (+9000) is civil, it could have returned the full 256 bytes. Usually you need a
challenge of 8 bytes, so try Le set to 08 instead.
The good thing to notice is that this is all at the ISO/IEC 7816-4 level, so your ISO/IEC 14443 type B code is probably alright.

Copyright © 2018 www.developreference.com

You might also like