29.01.2015 Views

Applications & SmartCard : JavaCard - Identification - LIFL

Applications & SmartCard : JavaCard - Identification - LIFL

Applications & SmartCard : JavaCard - Identification - LIFL

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>JavaCard</strong>.Framework.Applet.register()<br />

<strong>JavaCard</strong>.Framework.Applet<br />

• Updates the applet table<br />

AID<br />

Registers the applet within the JCRE<br />

Located in the install() method<br />

• Two protected methods<br />

register() uses applet’s AID for the instance’s AID<br />

register(array offset length) allows to define<br />

an AID for an instance, and multiple-instanciation.<br />

• 0. Applet design and download<br />

• 1. Install ()<br />

• 2. Register ()<br />

• 3. Select ()<br />

• 4. Process ()<br />

• 5. Deselect ()<br />

• 6. Power loss<br />

http://www.lifl.fr/~grimaud/Cours<br />

<strong>JavaCard</strong> System & Framework 37<br />

http://www.lifl.fr/~grimaud/Cours<br />

<strong>JavaCard</strong> System & Framework 38<br />

<strong>JavaCard</strong>.Framework.Applet.select()<br />

<strong>JavaCard</strong>.Framework.Applet.select()<br />

Applet<br />

sources<br />

Applet<br />

class files<br />

remove<br />

remove<br />

Applet<br />

cap file<br />

load<br />

Applet<br />

Loaded<br />

Applet<br />

Activited<br />

Install / Register<br />

Applet<br />

Selected<br />

JCVM<br />

Applet<br />

Processing<br />

Off-card<br />

On-card<br />

CLA Select P1 P2 Lc AID<br />

SW1<br />

SW2<br />

Please select Applet which AID is...<br />

OK, selection accepted<br />

• Called by the JCRE to inform an applet that it has<br />

been selected<br />

• Indicates the applet is ready to accept incoming<br />

APDUs<br />

• Once the applet has been selected, commands that<br />

cannot be interpreted by the JCRE are sent to the<br />

process() method<br />

Select →<br />

← Deselect<br />

Process →<br />

← return<br />

Use selectingApplet() for filtering out the applet selection<br />

APDU (returns TRUE if the applet is being selected)<br />

http://www.lifl.fr/~grimaud/Cours<br />

<strong>JavaCard</strong> System & Framework 39<br />

http://www.lifl.fr/~grimaud/Cours<br />

<strong>JavaCard</strong> System & Framework 40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!