Java Card Application Development - PowerPoint PPT Presentation

1 / 48
About This Presentation
Title:

Java Card Application Development

Description:

Java Card Runtime Environment (JCRE) ?? e?t?? ???ta? efa? ????. ?fa? ???? pe??t? ... Java Card Runtime Environment. Applets. 9/14/09. Java Card Application ... – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 49
Provided by: mathind
Category:

less

Transcript and Presenter's Notes

Title: Java Card Application Development


1
Java CardApplication Development
  • ??µa???t?? ?as??e???
  • ?????d?? ????a?d???

2
??sa????
  • ???p?e? ???te?
  • ?pe?e??ast?? ded?µ????
  • ???µ? t??a?a? p??sp??as?? (RAM)
  • ????µ? µ??µ? (EEPROM ? Flash)
  • ???t?p? ISO/IEC 7816, t? 1987
  • ???te? ??a ???pt????f?s?
  • ?pe?e??ast??
  • ?????µa ???pt????f?s??
  • ??d??? µ??µ?

3
??sa????
  • Java Card
  • ???pt??? efa?µ???? se ???p?e? ???te?
  • ?p?s????? t?? Java
  • ??s???? t? 1997
  • ???pt??? Java Card ?????
  • ?ata???s? e?????? te???????a?
  • G??s? ?????? a??pt????

4
???a?e?a ???pt????
  • Java Development Kit
  • JDK 1.4.1 1.6.0
  • Java Card Development Kit
  • JCDK 2.1.1
  • Integrated Development Environment
  • JBuilder 2005 Enterprise
  • Card Manager
  • Gemplus JCard Manager v4.0

5
? te???????a t?? Java Card
  • ?????e??a?a?t???st???

6
St???e?a Java Card ?????
  • ????µata APDU
  • ?? e?t?? ???ta? efa?µ????
  • Applets
  • Java Card Runtime Environment (JCRE)
  • ?? e?t?? ???ta? efa?µ????
  • ?fa?µ???? pe??t?
  • ?????t???? efa?µ????

7
APDU µ???µata
  • ?p????????a ???ta? te?µat????
  • ???t?p? ISO/IEC 7816-3 ?a? 7816-4
  • ??µ?µ??? s?st????a ???e??
  • ?e?ae?ad??? µ??f?
  • ??? t?p??
  • APDU e?t???? (command APDU)
  • APDU ap??t?s?? (response APDU)

8
??t??? APDU
  • ?p? t? te?µat??? p??? t?? ???ta
  • ??? µ???
  • ?efa??da (header) - ?p???e?t???
  • S?µa (body) - p??a??et???

9
??t??? APDU
10
?p??t?s? APDU
  • ?p? t?? ???ta st? te?µat???
  • ??? µ???
  • S?µa (Body) - p??a??et???
  • ???? (Trailer) - ?p???e?t???

11
?p??t?s? APDU
12
???t??a ???pt????
  • ??? µ??t??a
  • ?? pa?ad?s?a?? µ??t??? APDU
  • ?? µ??t??? t?? ap?µa???sµ???? ???s?? µe??d??, RMI
  • ??af????
  • ??t?? ???ta? efa?µ????
  • ??t?? ???ta? efa?µ????
  • ?e?te?? t? RMI µ??t??? - ??d?s? 2.2 t?? JC

13
APDU vs RMI
  • ?????? ??e???? t?? APDU µ???µ?t??
  • ??d?s? e?t????
  • ???s? p???e???s?a? efa?µ???? (proxy)
  • ?p??t?ta Applet efa?µ????
  • ?p????????a t?? Applet µ?s? d?aµ???a??µe???
    d?as??des??
  • ?p?????? t?? APDU µ???µ?t??
  • ???s? µe??d??
  • ???s? efa?µ???? ste?????? (stub)
  • ????p???? efa?µ??? Applet
  • ?d??at? ? ???p???s? d?aµ???a??µe??? d?as??des??

14
Applets
  • ??te??s?µe? efa?µ???? ???ta?
  • ?µ???t?te? µe ta Applets t?? Java
  • ???a??sta?ta? ?a? a?????p?????ta? µ?a f???
  • ?e? te?µat????? p?t?
  • ? µ??f? t?? Applet e?a?t?ta? ap? t? µ??t???

15
Applets
  • ?as???? µ???d??
  • Install
  • ???at?stas? a?t??e?µ????
  • Register
  • ?ata????s? st??µ??t?p??
  • Select
  • ?p????? t?? efa?µ????
  • Process
  • ??t??es? e?t???? e?t?? efa?µ????
  • Deselect
  • ???at??e??? t?? efa?µ????

16
AID
  • ??a?????st??? pa??t?? ?a? efa?µ????
  • ???t?p? ISO/IEC 7816-5
  • ???e??? ap? 5 ??? 16 bytes
  • ?a p??ta 5 bytes s???st??? t? a?a?????st??? t??
    eta???a? ????sµ???? (RID)
  • ?a ?p????pa 0-11 ep??????ta? e?e??e?a (PIX)
  • Applets ???????µ??? t? AID t?? pa??t??

17
AID
  • ?a??de??µa

18
??t?? ???ta? efa?µ????
  • ?p????????a t?? ???st? µe t?? ???ta
  • ?etat??p? e?t???? ?????? ep?p?d?? st??
    a?t?st???e? ?aµ????
  • ???at?t?ta ???p???s?? µe d??f??e? ???sse?
  • ????e?ta? ? a??pt??? se Java
  • ??af????? ap? ??a APDU se ??a RMI ????

19
??t?? ???ta? efa?µ????st? APDU µ??t???
  • ?p?te?e?ta?
  • ?fa?µ??? pe??t?
  • ????e???s?a efa?µ???
  • ?????t???? efa?µ????
  • ???p???s? t?? efa?µ???? pe??t? ?a? p???e???s?a?
  • ?? ß????t???? efa?µ???? pa?????ta? ?t??µe?

20
??t?? ???ta? efa?µ????st? APDU µ??t???
  • ?fa?µ??? pe??t?
  • ??as??des? µe t?? ???st?
  • ?p????????a µe p???e???s?a
  • ??a?e???s? e?a???se?? t?? p???e???s?a? efa?µ????
  • ?e????? ??e???? ded?µ????
  • ?a???s?as? ded?µ???? st?? ???st?

21
??t?? ???ta? efa?µ????st? APDU µ??t???
  • ????e???s?a efa?µ???
  • ?p????????a µe t? ????sµ??? t?? te?µat????
  • Gef????e? t? ??sµa pe??t? ???ta?
  • ?etat??p? e?a???se?? ???ta? se e?a???se?? ??????
    e?t??es??
  • G??s? e?t???? ?aµ???? ep?p?d?? t?? ???ta?
  • ??a p???e???s?a ??a µ?a efa?µ??? ???ta?

22
??t?? ???ta? efa?µ????st? RMI µ??t???
  • S?????? ???p??e?ta? µ??? ? efa?µ??? pe??t?
  • ?e? ?p???e? p???e???s?a efa?µ???
  • ???s? efa?µ???? ste?????? (stub)
  • ?p??????
  • ??t???? ?aµ???? ep?p?d??
  • ????µ?t?? APDU

23
?p????????a ???ta? te?µat????
  • St???e?a p?? ?aµß????? µ????
  • ?fa?µ???? e?t?? ???ta?
  • ?fa?µ??? pe??t? (Back End)
  • ????e???s?a efa?µ??? (Host)
  • ????sµ??? te?µat???? (Card Acceptance Device)
  • ?fa?µ???? e?t?? ???ta?
  • Java Card Runtime Environment
  • Applets

24
?p????????a ???ta? te?µat????
  • ?? ????sµ??? te?µat???? e??a? ?d? ???p???µ???
  • Open Card Framework
  • Security And Trust Services API
  • JDK 6
  • ?? µ??t??? RMI ßas??eta? st? p??t?p? ep????????a?
    t?? µ??t???? APDU

25
?p????????a ???ta? te?µat????
26
?p????????a ???ta? te?µat????
27
?p????????a µeta??efa?µ???? ???ta?
  • ? eµß??e?a µ?a? efa?µ???? ?????ete?ta? ap? ta
    p?a?s?a (contexts)
  • ??a?s?a ?e?????ta? ta pa??ta
  • ???a??sµ?? Firewall
  • ?? JCRE ??e? ?a?????? p??sßas? se ??a ta p?a?s?a
    ?a? se ??a ta ped?a a?t??
  • ???at?t?ta ep????????a? µeta?? efa?µ???? µ?sa
    st?? ???ta

28
?p????????a µeta??efa?µ???? ???ta?
  • ???a??sµ?? p??sßas??
  • ???a??µata t?? JCRE
  • ???sßas? µ?s? t?? JCRE
  • ?a??????? p??a?e? (Global Arrays)
  • ??s? d?aµ???a??µe??? d?as??des??(Shareable
    Interface)

29
??aµ???a??µe?? d?as??des?
  • ?as??eta? st?? pa???aµ?? t?? Firewall
  • ??p??? Applet ???p??e? µ?a d?aµ???a??µe??
    d?as??des?
  • ? d?aµ???a??µe?? d?as??des? ????e? t?? µe??d???
    p??? d?aµ???asµ?
  • ???s? t?? d?aµ???a??µe??? d?as??des?? ap? ???a
    Applets
  • ??a RMI Applet de? ?p?st????e? t?? µ??a??sµ? a?t?

30
??aµ???a??µe?? d?as??des?
JCRE
Firewall
Client Applet
Server Applet
31
?????? ???pt????
  • ?p? t?? p??a?? ??d??a st?? efa?µ???? ???ta?

32
??ad??as?a a??pt????
  • ???pt??? t?? ??d??a
  • ?eta???tt?s? t?? p??a??? ??d??a
  • ?a?a???? ??d??a ???ta?
  • ??e???? e?????t?ta? (p??a??et???)
  • F??t?s? t?? ??d??a ???ta?

33
???pt??? ??d??a
  • ???pt??? ?p?? ???e pa?ad?s?a?? efa?µ???
  • S?????? a?apt?sseta? se ??a IDE
  • ??e??????s? t?? p????aµµat?st?
  • ???a???? e?t?p?sµ?? sfa?µ?t??
  • ?????? d?a?e???s? ?????
  • ???pt??? efa?µ???? pe??t? ?a? ???ta?
  • Se ??a APDU ???? µp????? a?????? se d?af??et???
    project
  • Se ??a RMI ???? p??pe? ?a a?apt?????? st? ?d??

34
?eta???tt?s? ??d??a
  • ??????a µe t?? ??d?s? t?? JCDK ???eta? ???s? t??
    ?at??????? JDK
  • ???s? d?af??et???? JDK ??a pe??t? - ???ta
  • ?eta???tt?s? p?????µµat?? ???ta? µe t?? e?
    ???sµ?? µeta???tt?st?
  • ?eta???tt?s? ??d??a ???ta? µ?s? t?? ??aµµ??
    e?t????

35
?a?a???? a??e??? ???ta?
  • ?p? ta µeta???tt?sµ??a a??e?a pa?????ta? ta
    a??e?a ???ta?, Converted APplet (CAP)
  • ??a?? ?a f??t????? ?a? ?a e?te?est??? st?
    pe??ß????? t?? ???ta?
  • ???s? e??a?e??? µetat??p??, converter t?? JCDK
  • ?s?? t? p?? ????? ß?µa st? d?ad??as?a a??pt????

36
?a?a???? a??e??? ???ta?
  • ???sµata t?? µetat??p?a
  • Export a??e?a
  • AID efa?µ???? ?a? pa??t??
  • ?p????? pa?a??µe??? a??e???
  • ?????e?s? ??d??a ap? t?? µetat??p?a
  • ???s? ap? s???e???µ??? d?ad??µ?
  • ?µad?p???s? ???sµ?t?? se ??a a??e??

37
Export a??e?a
  • ?e??????ta? p????f???e?
  • ?????ep?d?as?? µe ???e? efa?µ????
  • ???s?? ß?ß????????
  • ?a export a??e?a t?? ß?ß???????? ?a???????? t??
    ??d?s? t?? pa?a??µe??? ??d??a ???ta?
  • ???s? a??e??? export ????? efa?µ???? ?ta? ?p???e?
    ep????????a µe a?t??

38
?a?a???? a??e??? ???ta?
  • ? µetat??p? µp??e? ?a pa???e? a??e?a t???? t?p??
  • ???e?? ??d??a ???ta?
  • Export a??e??
  • ???e?? ??d??a ???ta? se assembly

39
?a?a???? a??e??? ???ta?
Java Compiler
40
F??t?s? ?a? e?t??es? efa?µ????
  • ?? a??e?? µe t?? ??d??a ???ta? e??a? ?t??µ? ??a
    f??t?s?
  • ?etat??p? se APDU
  • ?p?st??? st?? ???ta
  • ??µ??????a e??? st??µ??t?p?? t?? efa?µ????
  • ??t??es? t?? efa?µ????

41
?e??ß????? p??s?µ???s??
  • ???a?e?a p??s?µ???s??
  • C language JCRE (CREF)
  • ????????? µ??µe? EEPROM
  • ??st? a?apa??stas? t?? JCRE
  • ??t??es? ??d??a ???ta?
  • Java Card Workstation Development
    Environment(JCWDE)
  • ???as?a µe µeta???tt?sµ??a a??e?a
  • ?d??aµ?a ?p?st?????? ?e?t??????? t?? JCRE

42
???s?µ???s? µe t? CREF
  • ?etat??p? a??e??? ???ta? se APDUs µe t? e??a?e??
    scriptgen
  • ?p????e?s? APDUs se a??e?? script
  • ???s?es? apa?a?t?t?? p????f????? st?? a??? ?a?
    st? t???? t?? script
  • AID
  • ?ed?µ??a a?????p???s??
  • ??t??? e??at?stas??

43
???s?µ???s? µe t? CREF
  • ??µ??????a a??e??? e???????? EEPROM µe t? CREF
  • ?p?st??? a??e??? script µe t? apdutool
  • ? ???a ep????????a? t?? CREF ?a? apdutool p??pe?
    ?a s?µf??e? (e? ???sµ?? ? 9025)
  • ? e??????? µ??µ? e??a? ?t??µ? ??a ???s?
  • ?????µa e???????? µ??µ?? µe t? CREF

44
???s?µ???s? µe t? CREF
Converted Applet
cref
45
??a?µat??? pe??ß?????
  • ?p????? a??e??? ???ta? µe t?? e?t??? Quick Load,
    µ?s? t?? JCard Manager
  • ??s????µe t?? a?a??a?e? pa?aµ?t????
  • AID
  • ?ed?µ??a p??? a?????p???s?
  • ??e?d? p?st?p???s??
  • ??te???µe t?? d?ad??as?a ap?st????

46
??a?µat??? pe??ß?????
JCard Manager Quick Load
JCRE
47
S?????
  • ??? µ??t??a a??pt????
  • ?sfa?? e?t??es? p????aµµ?t??
  • ???pt??? efa?µ???? se Java Card
  • ?ata???s? e?????? te???????a?
  • G??s? ?????? a??pt????

48
???t?se??
Write a Comment
User Comments (0)
About PowerShow.com