SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Smart(Java)Card
...
What & Why
What - smart card
• Tiny PC without Human Interface capabilities
• CPU: 16b/32b RISC @ handful of MhZ
• Math co-processor: RSA/DES/AES/ECC
• RAM: X KB
• HDD: XX..XXX KB (EEPROM)
• NET: "Ethernet" (contact) or "WiFi" (contactless)
• "The size of a Raspberry Pi but with specs worse than XT!"
Application Protocol Data Unit
BIBO
Bytes go In & Bytes come Out
(request - response)
What - JavaCard
• BASIC in BIOS: Java VM
• DOS: App(let) manager (GlobalPlatform)
Choose your Weapon
• ASM / C (OpenCard* by CryptoExperts)
• C (MULTOS)
• BASIC (BasicCard by ZeitControl)
• Java (JavaCard)
Why - JavaCard
• Meaningful abstraction layer!
• Commodity platform
• Multiple vendors
• Multiple applications
• "Open platform" - Oracle ...
• "Portable" - Java ...
From Academia and Business

to 

Open Source Developers
Step 1

Get the necessary hardware
Open JavaCard
• At least 3 online shops in EU (in English)
• + Canada, US
• Must be OPEN Java Card
• No "rooting" yet ;(
• Form factor: ID-1 ("credit card") or USB token
• From 5€ (Feitian) to 50€ (NXP)
• javacard.pro / Google:
"JavaCard Buyer's Guide of 2015"
Smart Card Reader
• Any* will work (Contact)
• Ludovic Rousseau's USB CCID driver (298/323)
• Google: "Readers sorted by 'section' field"
• Carefully consider contactless
• PC/SC is not a hardware standard!
Step 2

Prepare your tools
1. Normal Java development!
• Favourite editor, IDE, compiler
• Catch: running requires emulation
2. Conversion into card-loadable format (CAP file)
• Against Oracle's JavaCard SDK
3. Loading onto card
• Using GlobalPlatform
JavaCard SDK
• From Oracle ...
• No OpenJavaCardSDK :(
• Java components are cross-platform
• Suitable max version depends on card version.
ant-javacard
• ANT task for turning Java source code into a
loadable CAP file
• Any platform (Linux, OS X, Windows)
• Any version of JavaCard SDK
• Simple. Easy to use. Seriously.
Application IDentifier
GlobalPlatform
• Every package (CAP file) has an AID
• Each applet (class) has an AID
• Every on-card entity has an AID
• Packages and classes and instances
• 5..16 bytes (5+11)
GlobalPlatformPro
• Easy to use Java tool to:
• LOAD CAP files to the card
• INSTALL applets (AID-s)
• CREATE applet instances (AID-s)
• DELETE applets and packages (AID-s)
• Add/change/delete keys
• And more ...
Lock/Unlock
$ gp -l!
AID: A000000003000000 (|........|)
ISD SECURED: Security Domain, Card lock, Card terminate, Default selected, CVM (PIN) management
!
AID: A0000000035350 (|.....SP|)
ExM LOADED: (none)
A000000003535041 (|.....SPA|)
!
$ gp -lock B4F75CE0A95EA3F86BBD051CB77C0FAE
Card locked with: DES3:B4F75CE0A95EA3F86BBD051CB77C0FAE
Write this down, DO NOT FORGET/LOSE IT!
$ gp -l!
openkms.gp.GPException: STRICT WARNING: Card cryptogram invalid!
Card: CC73F92AD03A131D
Host: A358609D53744EEB
!!! DO NOT RE-TRY THE SAME COMMAND/KEYS OR YOU MAY BRICK YOUR CARD !!!
at openkms.gp.GlobalPlatform.printStrictWarning(GlobalPlatform.java:156)
at openkms.gp.GlobalPlatform.openSecureChannel(GlobalPlatform.java:476)
at openkms.gp.GPTool.main(GPTool.java:348)
$ gp -key B4F75CE0A95EA3F86BBD051CB77C0FAE -unlock
Default DES3:404142434445464748494A4B4C4D4E4F set as master key.
$ gp -l!
AID: A000000003000000 (|........|)
ISD SECURED: Security Domain, Card lock, Card terminate, Default selected, CVM (PIN) management
!
AID: A0000000035350 (|.....SP|)
ExM LOADED: (none)
A000000003535041 (|.....SPA|)
Step 4

Learn, Learn, Learn
Read
• JavaCard API Specification
• and Runtime Environment
• Google: "JavaCard Tutorial"
• ISO 7816-4 (and javacard.framework.APDU)
• Google: "University Smart Card Paper"
• CLA/INS/P1/P2/Lc/Le/SW/0x9000
• ISO 7816/14443, ETSI, BSI, NFC, NIST etc etc
• Beware of outdated/wrong/irrelevant information on the web!
ISO 7816-7 (1999)
Structured Card Query Language
AppletPlayground
• "Ready to eat" dog food from the internet
• Almost all open source applets that may do
something
• Import into Eclipse
• Build with ANT (eclipse/cmdline)
Step 5

Engage with the Community
• Oracle JavaCard Forum / kenai.com: dead
• Stack Overflow: "javacard", "globalplatform",
"smartcard" tags: some life
• OpenSC / pcsc-lite lists: open source but no Java!
• GitHub: depends!
• IRC: #opensc
javacard.pro

Weitere ähnliche Inhalte

Was ist angesagt?

IOT Protocols
IOT  Protocols IOT  Protocols
IOT Protocols Nagesh Rao
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)Kruti Niranjan
 
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linaro
 
Soc architecture and design
Soc architecture and designSoc architecture and design
Soc architecture and designSatya Harish
 
Zigbee based two way wireless chatting system
Zigbee based two way wireless chatting systemZigbee based two way wireless chatting system
Zigbee based two way wireless chatting systemShashidhar Reddy
 
Q4.11: Introduction to eMMC
Q4.11: Introduction to eMMCQ4.11: Introduction to eMMC
Q4.11: Introduction to eMMCLinaro
 
RFID TECHNOLOGIES AND ITS APPLICATION ON IOT
RFID TECHNOLOGIES AND ITS APPLICATION ON IOTRFID TECHNOLOGIES AND ITS APPLICATION ON IOT
RFID TECHNOLOGIES AND ITS APPLICATION ON IOTponraj leo
 
40G 100G gigabit ethernet technology overview
40G 100G gigabit ethernet technology overview40G 100G gigabit ethernet technology overview
40G 100G gigabit ethernet technology overviewMapYourTech
 
Automation of shopping cart to ease queue in malls by using RFID
Automation of shopping cart to ease queue in malls by using RFIDAutomation of shopping cart to ease queue in malls by using RFID
Automation of shopping cart to ease queue in malls by using RFIDSudher Sun
 
Java card technology
Java card technologyJava card technology
Java card technologyAmol Kamble
 
IPv6 and IoT
IPv6 and IoTIPv6 and IoT
IPv6 and IoTAPNIC
 
SRAM read and write and sense amplifier
SRAM read and write and sense amplifierSRAM read and write and sense amplifier
SRAM read and write and sense amplifierSoumyajit Langal
 

Was ist angesagt? (20)

IOT Protocols
IOT  Protocols IOT  Protocols
IOT Protocols
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
 
Presentation on arp protocol
Presentation on arp protocolPresentation on arp protocol
Presentation on arp protocol
 
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
 
RFID Basics
RFID BasicsRFID Basics
RFID Basics
 
FPGA based mini Project.pptx
FPGA based mini Project.pptxFPGA based mini Project.pptx
FPGA based mini Project.pptx
 
Soc architecture and design
Soc architecture and designSoc architecture and design
Soc architecture and design
 
Zigbee based two way wireless chatting system
Zigbee based two way wireless chatting systemZigbee based two way wireless chatting system
Zigbee based two way wireless chatting system
 
Q4.11: Introduction to eMMC
Q4.11: Introduction to eMMCQ4.11: Introduction to eMMC
Q4.11: Introduction to eMMC
 
RFID TECHNOLOGIES AND ITS APPLICATION ON IOT
RFID TECHNOLOGIES AND ITS APPLICATION ON IOTRFID TECHNOLOGIES AND ITS APPLICATION ON IOT
RFID TECHNOLOGIES AND ITS APPLICATION ON IOT
 
40G 100G gigabit ethernet technology overview
40G 100G gigabit ethernet technology overview40G 100G gigabit ethernet technology overview
40G 100G gigabit ethernet technology overview
 
Automation of shopping cart to ease queue in malls by using RFID
Automation of shopping cart to ease queue in malls by using RFIDAutomation of shopping cart to ease queue in malls by using RFID
Automation of shopping cart to ease queue in malls by using RFID
 
Java card technology
Java card technologyJava card technology
Java card technology
 
IPv6 and IoT
IPv6 and IoTIPv6 and IoT
IPv6 and IoT
 
Sram pdf
Sram pdfSram pdf
Sram pdf
 
SRAM read and write and sense amplifier
SRAM read and write and sense amplifierSRAM read and write and sense amplifier
SRAM read and write and sense amplifier
 
ARM Micro-controller
ARM Micro-controllerARM Micro-controller
ARM Micro-controller
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
IOT Security
IOT SecurityIOT Security
IOT Security
 
Esd
EsdEsd
Esd
 

Andere mochten auch

OpenSC: eID interoperability through open source software
OpenSC: eID interoperability through open source softwareOpenSC: eID interoperability through open source software
OpenSC: eID interoperability through open source softwareMartin Paljak
 
Veebis allkirjastamine ID-kaardiga
Veebis allkirjastamine ID-kaardigaVeebis allkirjastamine ID-kaardiga
Veebis allkirjastamine ID-kaardigaMartin Paljak
 
eSmartlock a USB Javacard dongle with anti-piracy and DRM services
eSmartlock a USB Javacard dongle with anti-piracy and DRM serviceseSmartlock a USB Javacard dongle with anti-piracy and DRM services
eSmartlock a USB Javacard dongle with anti-piracy and DRM servicesYiannis Hatzopoulos
 
eSmartlock - an antipiracy dongle with integrated DRM functionalities
eSmartlock - an antipiracy dongle with integrated DRM functionalitieseSmartlock - an antipiracy dongle with integrated DRM functionalities
eSmartlock - an antipiracy dongle with integrated DRM functionalitiesYiannis Hatzopoulos
 

Andere mochten auch (8)

OpenSC: eID interoperability through open source software
OpenSC: eID interoperability through open source softwareOpenSC: eID interoperability through open source software
OpenSC: eID interoperability through open source software
 
Veebis allkirjastamine ID-kaardiga
Veebis allkirjastamine ID-kaardigaVeebis allkirjastamine ID-kaardiga
Veebis allkirjastamine ID-kaardiga
 
OpenDNIe Hackfest
OpenDNIe HackfestOpenDNIe Hackfest
OpenDNIe Hackfest
 
Codebits 2011
Codebits 2011Codebits 2011
Codebits 2011
 
ID-kaardist 100%
ID-kaardist 100%ID-kaardist 100%
ID-kaardist 100%
 
Javacardtech
JavacardtechJavacardtech
Javacardtech
 
eSmartlock a USB Javacard dongle with anti-piracy and DRM services
eSmartlock a USB Javacard dongle with anti-piracy and DRM serviceseSmartlock a USB Javacard dongle with anti-piracy and DRM services
eSmartlock a USB Javacard dongle with anti-piracy and DRM services
 
eSmartlock - an antipiracy dongle with integrated DRM functionalities
eSmartlock - an antipiracy dongle with integrated DRM functionalitieseSmartlock - an antipiracy dongle with integrated DRM functionalities
eSmartlock - an antipiracy dongle with integrated DRM functionalities
 

Ähnlich wie JavaCard development Quickstart

jCardSim – Java Card is simple!
jCardSim – Java Card is simple!jCardSim – Java Card is simple!
jCardSim – Java Card is simple!Mikhail Dudarev
 
Smart Cards, ePassports, and open source
Smart Cards, ePassports, and open sourceSmart Cards, ePassports, and open source
Smart Cards, ePassports, and open sourceMartijn Oostdijk
 
ARM uVisor Debug Refinement Project(debugging facility improvements)
ARM uVisor Debug Refinement Project(debugging facility improvements)ARM uVisor Debug Refinement Project(debugging facility improvements)
ARM uVisor Debug Refinement Project(debugging facility improvements)家榮 張
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
 
What is smart card on tam
What is smart card on tamWhat is smart card on tam
What is smart card on tam崇倍 洪
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionIntel® Software
 
FRDM-KL46Z_Hands-On_Presentation_v02
FRDM-KL46Z_Hands-On_Presentation_v02FRDM-KL46Z_Hands-On_Presentation_v02
FRDM-KL46Z_Hands-On_Presentation_v02Libor GECNUK
 
4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdfRynefelElopre2
 
2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT Fight2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT FightBruno Capuano
 
Alessandro Abbruzzetti - Kernal64
Alessandro Abbruzzetti - Kernal64Alessandro Abbruzzetti - Kernal64
Alessandro Abbruzzetti - Kernal64Scala Italy
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advancedImran Sheikh
 
Eclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersEclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersMicroEJ
 
Security's Once and Future King
Security's Once and Future KingSecurity's Once and Future King
Security's Once and Future KingKapil Sachdeva
 
One library for all Java encryption
One library for all Java encryptionOne library for all Java encryption
One library for all Java encryptionDan Cvrcek
 

Ähnlich wie JavaCard development Quickstart (20)

jCardSim – Java Card is simple!
jCardSim – Java Card is simple!jCardSim – Java Card is simple!
jCardSim – Java Card is simple!
 
Smart Cards, ePassports, and open source
Smart Cards, ePassports, and open sourceSmart Cards, ePassports, and open source
Smart Cards, ePassports, and open source
 
ARM uVisor Debug Refinement Project(debugging facility improvements)
ARM uVisor Debug Refinement Project(debugging facility improvements)ARM uVisor Debug Refinement Project(debugging facility improvements)
ARM uVisor Debug Refinement Project(debugging facility improvements)
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
What is smart card on tam
What is smart card on tamWhat is smart card on tam
What is smart card on tam
 
Smart logic
Smart logicSmart logic
Smart logic
 
Developing a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT EditionDeveloping a NodeBot using Intel XDK IoT Edition
Developing a NodeBot using Intel XDK IoT Edition
 
Vlsi lab
Vlsi labVlsi lab
Vlsi lab
 
FRDM-KL46Z_Hands-On_Presentation_v02
FRDM-KL46Z_Hands-On_Presentation_v02FRDM-KL46Z_Hands-On_Presentation_v02
FRDM-KL46Z_Hands-On_Presentation_v02
 
4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf4 Introduction to Arduino.pdf
4 Introduction to Arduino.pdf
 
arduino.pdf
arduino.pdfarduino.pdf
arduino.pdf
 
2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT Fight2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT Fight
 
Alessandro Abbruzzetti - Kernal64
Alessandro Abbruzzetti - Kernal64Alessandro Abbruzzetti - Kernal64
Alessandro Abbruzzetti - Kernal64
 
Embedded. What Why How
Embedded. What Why HowEmbedded. What Why How
Embedded. What Why How
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advanced
 
Craneboard
CraneboardCraneboard
Craneboard
 
Eclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersEclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for Microcontrollers
 
Security's Once and Future King
Security's Once and Future KingSecurity's Once and Future King
Security's Once and Future King
 
One library for all Java encryption
One library for all Java encryptionOne library for all Java encryption
One library for all Java encryption
 
108week2
108week2108week2
108week2
 

Kürzlich hochgeladen

Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 

Kürzlich hochgeladen (20)

2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 

JavaCard development Quickstart

  • 1.
  • 3. What - smart card • Tiny PC without Human Interface capabilities • CPU: 16b/32b RISC @ handful of MhZ • Math co-processor: RSA/DES/AES/ECC • RAM: X KB • HDD: XX..XXX KB (EEPROM) • NET: "Ethernet" (contact) or "WiFi" (contactless) • "The size of a Raspberry Pi but with specs worse than XT!"
  • 5. BIBO Bytes go In & Bytes come Out (request - response)
  • 6.
  • 7. What - JavaCard • BASIC in BIOS: Java VM • DOS: App(let) manager (GlobalPlatform)
  • 8. Choose your Weapon • ASM / C (OpenCard* by CryptoExperts) • C (MULTOS) • BASIC (BasicCard by ZeitControl) • Java (JavaCard)
  • 9. Why - JavaCard • Meaningful abstraction layer! • Commodity platform • Multiple vendors • Multiple applications • "Open platform" - Oracle ... • "Portable" - Java ...
  • 10. From Academia and Business
 to 
 Open Source Developers
  • 11. Step 1
 Get the necessary hardware
  • 12. Open JavaCard • At least 3 online shops in EU (in English) • + Canada, US • Must be OPEN Java Card • No "rooting" yet ;( • Form factor: ID-1 ("credit card") or USB token • From 5€ (Feitian) to 50€ (NXP) • javacard.pro / Google: "JavaCard Buyer's Guide of 2015"
  • 13.
  • 14.
  • 15. Smart Card Reader • Any* will work (Contact) • Ludovic Rousseau's USB CCID driver (298/323) • Google: "Readers sorted by 'section' field" • Carefully consider contactless • PC/SC is not a hardware standard!
  • 17. 1. Normal Java development! • Favourite editor, IDE, compiler • Catch: running requires emulation 2. Conversion into card-loadable format (CAP file) • Against Oracle's JavaCard SDK 3. Loading onto card • Using GlobalPlatform
  • 18. JavaCard SDK • From Oracle ... • No OpenJavaCardSDK :( • Java components are cross-platform • Suitable max version depends on card version.
  • 19. ant-javacard • ANT task for turning Java source code into a loadable CAP file • Any platform (Linux, OS X, Windows) • Any version of JavaCard SDK • Simple. Easy to use. Seriously.
  • 20.
  • 21.
  • 22.
  • 23.
  • 25. GlobalPlatform • Every package (CAP file) has an AID • Each applet (class) has an AID • Every on-card entity has an AID • Packages and classes and instances • 5..16 bytes (5+11)
  • 26. GlobalPlatformPro • Easy to use Java tool to: • LOAD CAP files to the card • INSTALL applets (AID-s) • CREATE applet instances (AID-s) • DELETE applets and packages (AID-s) • Add/change/delete keys • And more ...
  • 28. $ gp -l! AID: A000000003000000 (|........|) ISD SECURED: Security Domain, Card lock, Card terminate, Default selected, CVM (PIN) management ! AID: A0000000035350 (|.....SP|) ExM LOADED: (none) A000000003535041 (|.....SPA|) ! $ gp -lock B4F75CE0A95EA3F86BBD051CB77C0FAE Card locked with: DES3:B4F75CE0A95EA3F86BBD051CB77C0FAE Write this down, DO NOT FORGET/LOSE IT! $ gp -l! openkms.gp.GPException: STRICT WARNING: Card cryptogram invalid! Card: CC73F92AD03A131D Host: A358609D53744EEB !!! DO NOT RE-TRY THE SAME COMMAND/KEYS OR YOU MAY BRICK YOUR CARD !!! at openkms.gp.GlobalPlatform.printStrictWarning(GlobalPlatform.java:156) at openkms.gp.GlobalPlatform.openSecureChannel(GlobalPlatform.java:476) at openkms.gp.GPTool.main(GPTool.java:348) $ gp -key B4F75CE0A95EA3F86BBD051CB77C0FAE -unlock Default DES3:404142434445464748494A4B4C4D4E4F set as master key. $ gp -l! AID: A000000003000000 (|........|) ISD SECURED: Security Domain, Card lock, Card terminate, Default selected, CVM (PIN) management ! AID: A0000000035350 (|.....SP|) ExM LOADED: (none) A000000003535041 (|.....SPA|)
  • 30. Read • JavaCard API Specification • and Runtime Environment • Google: "JavaCard Tutorial" • ISO 7816-4 (and javacard.framework.APDU) • Google: "University Smart Card Paper" • CLA/INS/P1/P2/Lc/Le/SW/0x9000 • ISO 7816/14443, ETSI, BSI, NFC, NIST etc etc • Beware of outdated/wrong/irrelevant information on the web!
  • 31. ISO 7816-7 (1999) Structured Card Query Language
  • 32. AppletPlayground • "Ready to eat" dog food from the internet • Almost all open source applets that may do something • Import into Eclipse • Build with ANT (eclipse/cmdline)
  • 33.
  • 34. Step 5
 Engage with the Community
  • 35. • Oracle JavaCard Forum / kenai.com: dead • Stack Overflow: "javacard", "globalplatform", "smartcard" tags: some life • OpenSC / pcsc-lite lists: open source but no Java! • GitHub: depends! • IRC: #opensc