JCOP Serial Number

HiI'm working with jcop 31 and i need to know serial number of each card. how can i get unique serial number of a jcop card?thanks
[152 byte] By [Bam_Zama] at [2007-10-3 6:50:31]
# 1

The command/term from the cm> prompt will do.

This is a sample. With card inserted into reader. It tells uo your reader's name, whether a card is present and the serial numbr of the card.

/term

Terminal:PC/SC (ACS ACR38U 0)

Status:Card present, 0B012204

Last error: -

Socx

socxa at 2007-7-15 1:41:17 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

Hi socx,

this isn't correct. Try this again - 2 times for the same card and than for an other card. You will see this 4 bytes are the terminal status with following content:

1. byte = internal counter

4. byte = status

See this example:

- /term pcsc:4

--Opening terminal

> /atr

ATR: T=1, N=0, IFSC=254, BWI=4/CWI=5, Hist="JCOP41V22"

> /term

Terminal:PC/SC (SCM Microsystems Inc. SDI010 Smart Card Reader 0)

Status:Card present, 01012204

Last error: -

> /term

Terminal:PC/SC (SCM Microsystems Inc. SDI010 Smart Card Reader 0)

Status:Slot empty, 02001202

Last error: -

> /term

Terminal:PC/SC (SCM Microsystems Inc. SDI010 Smart Card Reader 0)

Status:Card present, 03002204

Last error: -

> /term

Terminal:PC/SC (SCM Microsystems Inc. SDI010 Smart Card Reader 0)

Status:Slot empty, 04001202

Last error: -

> /atr

ATR: T=0, FI=1/DI=2 (186clk/etu), specific mode T=0/explicit, Hist="JCOP31V22SHARP"

> /term

Terminal:PC/SC (SCM Microsystems Inc. SDI010 Smart Card Reader 0)

Status:Card present, 05012204

Last error: -

HartmutForJCOPa at 2007-7-15 1:41:17 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3

Call Get Data command to retrieve the CPLC data.

snd: 80 CA 9F 7F 2D

rcd: 9F 7F 2A 40 70 86 17 40 51 21 79 10 0E 61 31 06

47 67 90 96 66 00 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 90 00

Chip Serial Number will be at offset 15, length 4bytes

In this example, Serial Number: 0647 6790

fredricewea at 2007-7-15 1:41:18 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 4

... or use the JCOP JCShell Card Manger command "get-cplc". It's a little bit easier.

cm> get-cplc

Status: No Error

IC Fabricator : 4070

IC Type: 4472

Operating System ID: 4051

Operating System release date: 5158 (7.6.2005)

Operating System release level: 2400

IC Fabrication Date: 7474

IC Serial Number: 6E6E6E62

IC Batch Identifier: 6262

IC Module Fabricator: 4070

IC Module Packaging Date: 7575

ICC Manufacturer: 0000

IC Embedding Date: 0000

IC Pre-Personalizer: 5758

IC Pre-Perso. Equipment Date: 594E

IC Pre-Perso. Equipment ID : 4E4E4E4E

IC Personalizer: 0000

IC Personalization Date: 0000

IC Perso. Equipment ID : 00000000

HartmutForJCOPa at 2007-7-15 1:41:18 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 5
Sorry,HartmutForJCOP was right. Didnt mean to mislead you.Regards,Socx
socxa at 2007-7-15 1:41:18 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 6

I have already googled for this and haven't found a clear answer. Maybe someone here could provide me with one.

The serial number, in a java card, is fabricator dependent or is there some global entity that manages it?

Because i need to use some data from the card (it would be better to use "hardcoded" data instead of managing it on the applet) to diversify a key.

FinalXa at 2007-7-15 1:41:18 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 7
Read out the key derivation tag 'CF'. select CMinit-update/ext-authenticateGET DATA (80/84 00 CF 00)You will get unique data constructed from CM AID and CPLC.
lexdabeara at 2007-7-15 1:41:18 > top of Java-index,Java Mobility Forums,Consumer and Commerce...