SPRINGCARD SAS PRNHSP01 用户手册
PMD2271-BA
page 34 of 118
S
PRING
C
ARD
PC/SC C
OUPLERS
- H663
GROUP
- Developer's reference manual
3.3.2.
MIFARE CLASSIC WRITE instruction
The MIFARE CLASSIC WRITE instruction writes data into a Mifare Classic PICC (e.g. Mifare 1K or
Mifare 4K, or Mifare Plus in level 1).
The difference with UPDATE BINARY lies in the authentication scheme:
The difference with UPDATE BINARY lies in the authentication scheme:
With the UPDATE BINARY instruction, authentication must be performed before, using the
GENERAL AUTHENTICATE instruction,
GENERAL AUTHENTICATE instruction,
With the MIFARE CLASSIC WRITE instruction, the authentication is performed
automatically by the H663, trying every keys one after the other, until one succeed.
This “automatic” authentication makes MIFARE CLASSIC WRITE instruction an interesting helper to
write Mifare data easily.
write Mifare data easily.
Do not invoke this function if the currently activated PICC is not a Mifare Classic!
Important disclaimer
Writing sector trailers (security blocks) is possible as long as the sector's current access condition
allows it, but Mifare sector trailers have to follow a specific formatting rule (mix-up of the access
allows it, but Mifare sector trailers have to follow a specific formatting rule (mix-up of the access
conditions bits) to be valid. Otherwise, the sector becomes permanently unusable.
Before invoking MIFARE CLASSIC WRITE, always double check that you're not writing a sector
Before invoking MIFARE CLASSIC WRITE, always double check that you're not writing a sector
trailer, and if you really have to do so, make sure the new content is formatted as specified in the
datasheet of the PICC.
datasheet of the PICC.
a.
MIFARE CLASSIC WRITE using coupler’s keys
In this mode, the application doesn't specify anything. The H663 tries every key he knows (both
permanent keys in E2PROM and temporary keys previously loaded in volatile memory) until one
succeeds.
succeeds.
Since the coupler must try all the keys, this method may take up to 1000ms. The ordering of the
keys in coupler's memory is very important to speed-up the process: the upper the right key is in
the coupler's memory, the sooner the authentication will succeed.
the coupler's memory, the sooner the authentication will succeed.
Note that the coupler tries all “type B” keys first, and only afterwards all the “type A” keys. This
behaviour has been chosen because in 95% of Mifare applications, the “type B” key is the
behaviour has been chosen because in 95% of Mifare applications, the “type B” key is the
preferred key for writing
11
Mifare Classic cards issued by NXP are delivered in “transport configuration”, with no “B” key and an “A” key allowed for both
reading and writing. This “transport configuration” gives poorest writing performance ; card issuer must start the card
personalisation process by enabling a “B” key for writing.
personalisation process by enabling a “B” key for writing.
SPRINGCARD, the SPRINGCARD logo, PRO ACTIVE and the PRO ACTIVE logo are registered trademarks of PRO ACTIVE SAS.
All other brand names, product names, or trademarks belong to their respective holders.
Information in this document is subject to change without notice. Reproduction without written permission of PRO ACTIVE is forbidden.