KR20050053158A - Java smart card and byte code execution method of the card - Google Patents

Java smart card and byte code execution method of the card Download PDF

Info

Publication number
KR20050053158A
KR20050053158A KR1020030086776A KR20030086776A KR20050053158A KR 20050053158 A KR20050053158 A KR 20050053158A KR 1020030086776 A KR1020030086776 A KR 1020030086776A KR 20030086776 A KR20030086776 A KR 20030086776A KR 20050053158 A KR20050053158 A KR 20050053158A
Authority
KR
South Korea
Prior art keywords
card
java
applet
command
card reader
Prior art date
Application number
KR1020030086776A
Other languages
Korean (ko)
Other versions
KR100576967B1 (en
Inventor
김태선
김봉규
Original Assignee
케이비 테크놀러지 (주)
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 케이비 테크놀러지 (주) filed Critical 케이비 테크놀러지 (주)
Priority to KR1020030086776A priority Critical patent/KR100576967B1/en
Publication of KR20050053158A publication Critical patent/KR20050053158A/en
Application granted granted Critical
Publication of KR100576967B1 publication Critical patent/KR100576967B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/077Constructional details, e.g. mounting of circuits in the carrier
    • G06K19/07745Mounting details of integrated circuit chips

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Stored Programmes (AREA)

Abstract

본 발명은 자바 스마트 카드에 관한 발명으로, 상기 자바 스마트 카드는 다운로드되는 애플릿의 바이트코드 데이터를 저장하기 위한 제1메모리와; 다운로드된 애플릿의 실행중에 전송 받은 커맨드를 혹은 애플릿의 다운로드를 위해 전송 받은 커맨드를 처리하여 그 응답결과를 카드 리더기로 전송하여 주되, 상기 전송 받은 커맨드 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기정보를 카드 리더기로 전송하는 트랜잭션을 처리하는 자바카드 가상 머신이 저장된 제2메모리를 포함함을 특징으로 한다.The present invention relates to a Java smart card, the Java smart card comprising: a first memory for storing bytecode data of an applet to be downloaded; Process the received command during execution of the downloaded applet or the received command for downloading the applet, and transmit the response result to the card reader. When the received command processing time exceeds the prescribed unit time, communication is performed. And a second memory in which a Java card virtual machine for processing a transaction for transmitting standby information to a card reader is stored.

Description

자바 스마트 카드와 그 카드의 바이트 코드 실행방법{JAVA SMART CARD AND BYTE CODE EXECUTION METHOD OF THE CARD}JAVA SMART CARD AND BYTE CODE EXECUTION METHOD OF THE CARD}

본 발명은 자바 스마트 카드에 관한 것으로, 특히 카드 리더기와의 타임아웃 에러를 방지하기 위한 트랜잭션 처리를 자바 카드 가상머신에서 수행하는 자바 스마트 카드와 그 카드의 바이트코드 실행방법에 관한 것이다.The present invention relates to a Java smart card, and more particularly, to a Java smart card for performing transaction processing in a Java card virtual machine to prevent a timeout error with a card reader and a byte code execution method of the card.

자바(Java)는 객체 지향 컴퓨터 언어로서, 자바 언어로 씌어진 프로그램은 플랫폼에 독립적이고 자체 내장된 보안성을 갖고 있으므로 소프트웨어의 프로그래밍과 분배를 더 용이하고 안전하게 한다. 자바 스마트 카드에 포함된 응용 프로그램은 사용자에 의해 쉽고 편리하게 수정되거나 업데이트될 수 있다는 장점을 가지고 있어 앞으로 그 보급이 급속히 신장될 것으로 예측된다.Java is an object-oriented computer language. Programs written in the Java language are platform independent and have built-in security, making software programming and distribution easier and safer. Applications included in Java smart cards have the advantage that they can be easily and conveniently modified or updated by the user.

자바 기반의 스마트 카드, 즉 자바 스마트 카드는 크게 두 종류로 분류할 수 있다. 그 첫 번째는 도 1에 도시한 바와 같이 자바 칩을 이용한 스마트 카드이며, 두 번째는 자바 플랫폼을 탑재한 스마트 카드이다.Java-based smart cards, or Java smart cards, can be classified into two types. The first is a smart card using a Java chip as shown in Figure 1, the second is a smart card equipped with a Java platform.

참고적으로 자바 칩을 이용한 스마트 카드는 도 1에 도시되어 있는 바와 같이 데이터를 저장하는 램(RAM), 기본적인 작동 프로그램을 저장하고 있는 롬(ROM), 갱신이 가능한 작동 데이터를 저장하고 있는 EEPROM을 포함하는 개념의 메모리(10)와, 주변 장치들과의 조정 역할을 담당하는 제어부(30) 및 각종 연산의 수행을 담당하는 자바 프로세서(20), 외부로부터 스마트 카드의 데이터를 보호하고 내용을 암호화하는 암호화부(40) 및 외부와의 통신을 위한 입출력부(50)를 포함한다.For reference, a smart card using a Java chip includes a RAM that stores data, a ROM that stores basic operation programs, and an EEPROM that stores updateable operation data, as shown in FIG. 1. The memory 10 of the concept including, the control unit 30 for coordinating the peripheral devices and the Java processor 20 for performing various operations, to protect the data of the smart card from the outside and encrypt the contents The encryption unit 40 and an input / output unit 50 for communication with the outside.

참고적으로 자바 플랫폼을 탑재한 스마트 카드는 인터럽트(interrupt) 신호의 처리를 위한 인터럽트부를 더 포함하는 구성을 갖는다.For reference, the smart card equipped with the Java platform has a configuration further including an interrupt unit for processing an interrupt signal.

상술한 바와 같은 구성을 가지는 자바 스마트 카드의 특징은 앞서 언급한 바와 같이 원하는 서비스의 애플릿을 다운로드 받거나 다운로드 받은 애플릿을 자유롭게 지울 수 있다는 것이다.The characteristic of the Java smart card having the configuration described above is that as described above, the applet of the desired service can be downloaded or the downloaded applet can be freely deleted.

일반적으로 애플릿 코드의 사이즈는 해당 애플릿의 서비스 기능에 따라 다를 수 있다. 사이즈가 큰 애플릿을 자바 스마트 카드에 다운로드할 때 특정 명령어에서 처리 시간이 길어질 수 있다. 이와 같이 자바 스마트 카드측에서 특정 명령어를 처리하기 위한 시간이 지연되면 카드 리더기측에서는 규정 시간 응답이 없기 때문에 카드측과의 통신을 단절하게 된다. 이러한 통신 단절은 곧 애플릿 다운로드의 실패를 의미하기 때문에, 통신 단절을 막기 위한 방안으로서 애플릿 설계자들은 통신 대기를 지시하는 널 바이트(null byte)를 카드 리더기로 전송하여 주는 일련의 트랜잭션 실행루틴이 포함된 애플릿을 설계해야 하는 부담을 안고 있다.In general, the size of the applet code may vary depending on the service capabilities of the applet. When downloading a large applet to a Java smart card, processing time may be longer for certain commands. As such, when the time for processing a specific command is delayed on the Java smart card side, communication with the card side is broken because there is no prescribed time response on the card reader side. Since this disconnection means that the applet download failed, applet designers included a series of transaction execution routines that send a null byte to the card reader indicating that the communication is waiting. The burden is to design applets.

이에 본 발명의 목적은 애플릿 설계자들의 편의를 제공하기 위해 자바 카드의 가상머신 혹은 그 보다 넓은 의미의 자바 카드 런타임 환경에서 통신 대기를 지시하여 주는 정보를 발생하여 카드 리더기측으로 전송하여 줄 수 있는 자바 스마트 카드 및 그 카드에서의 바이트코드 실행방법을 제공함에 있다.Accordingly, an object of the present invention is to provide a convenience for applet designers Java smart that can generate the information indicating the communication wait in the Java card virtual machine or a Java card runtime environment of the broader meaning and transmit to the card reader side A card and a method of executing bytecode on the card are provided.

상기 목적을 달성하기 위한 본 발명의 일실시예에 따른 자바 스마트 카드는,Java smart card according to an embodiment of the present invention for achieving the above object,

애플릿의 바이트코드 데이터가 저장되는 제1메모리와;A first memory for storing bytecode data of an applet;

상기 애플릿 실행중 카드 리더기로부터 전송 받은 커맨드를 처리하여 그 응답결과를 전송하여 주되, 상기 전송 받은 커맨드의 처리시간이 규정 단위의 시간을 초과할때 마다 통신 대기정보를 발생하여 상기 카드 리더기로 전송하는 트랜잭션을 처리하는 자바카드 가상 머신이 저장된 제2메모리;를 포함함을 특징으로 한다.During the execution of the applet, the command received from the card reader is processed and the response result is transmitted. When the processing time of the received command exceeds the prescribed unit time, communication waiting information is generated and transmitted to the card reader. And a second memory in which a Java card virtual machine for processing a transaction is stored.

본 발명의 또 다른 실시예에 따른 자바 스마트 카드는,Java smart card according to another embodiment of the present invention,

다운로드되는 애플릿의 바이트코드 데이터를 저장하기 위한 제1메모리와;A first memory for storing bytecode data of an applet to be downloaded;

다운로드된 애플릿의 실행중에 전송 받은 커맨드를 혹은 애플릿의 다운로드를 위해 전송 받은 커맨드를 처리하여 그 응답결과를 전송하여 주되, 상기 전송 받은 커맨드 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기정보를 카드 리더기로 전송하는 트랜잭션을 처리하는 자바카드 가상 머신이 저장된 제2메모리를 포함함을 특징으로 한다.Process the received command during execution of the downloaded applet or the received command for downloading the applet, and transmit the response result.Whenever the received command processing time exceeds the prescribed unit time, communication waiting information is sent. And a second memory in which a Java Card virtual machine for processing transactions transmitted to the card reader is stored.

상술한 본 발명의 특징에 따르면, 본 발명의 자바 스마트 카드에 탑재된 자바카드 가상 머신은 카드 리더기로부터 전송 받은 커맨드 처리시간이 장기화되는 경우에도 지속적으로 널 바이트와 같은 통신 대기정보를 카드 리더기측으로 전송하여 줌으로서 카드 리더기와의 통신 상태를 유지할 수 있게 되는 것이다.According to the features of the present invention described above, the Java card virtual machine mounted on the Java smart card of the present invention continuously transmits communication wait information such as null bytes to the card reader side even when the command processing time received from the card reader is prolonged. By zooming in, communication with the card reader can be maintained.

이와 같이 자바카드 가상 머신에서 널 바이트와 같은 통신 대기정보를 전송하여 주는 트랜잭션이 처리되도록 함으로서, 애플릿 설계자들에게 편의를 제공하여 줄 수 있게 되는 것이다.As such, the transaction that transmits communication wait information such as null byte is processed in the Java Card virtual machine, thereby providing convenience to applet designers.

이하 본 발명의 바람직한 실시예를 첨부 도면을 참조하여 상세히 설명하기로 한다. 본 발명을 설명함에 있어, 관련된 공지 기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, when it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present invention, a detailed description thereof will be omitted.

우선 도 2는 본 발명의 실시예에 따른 자바 스마트 카드의 계층 구조도를 도시한 것이다.2 illustrates a hierarchical structure diagram of a Java smart card according to an embodiment of the present invention.

도 2를 참조하면, 최상위 계층에 위치하는 애플릿들(69)은 자바 언어를 사용하여 제작된 하나의 서비스 툴로서 발급자의 인증과정을 거쳐 언제든지 카드(60)에 추가/삭제가 가능하다. 이러한 애플릿들은 도 1에 도시한 자바 스마트 카드의 하드웨어 구성중 메모리, 보다 구체적으로는 EEPROM에 저장된다.Referring to FIG. 2, the applets 69 located in the top layer are a service tool produced using the Java language, and can be added / deleted to the card 60 at any time through an issuer's authentication process. These applets are stored in a memory, more specifically, EEPROM, in the hardware configuration of the Java smart card shown in FIG.

자바카드 프레임워크(framework) 및 API(67)는 애플릿 개발자들이 자바 카드의 각종 기능들을 사용할 수 있도록 클래스(class) 및 메써드(methods)를 제공하는 역할을 담당한다.The Java Card framework and API 67 are responsible for providing classes and methods for applet developers to use the various features of Java Card.

자바 카드 가상머신(일명 자바카드 VM이라고도 함)(65)은 애플릿의 바이트코드(byte code)를 분석하여 실행시키는 역할을 담당한다. 이러한 자바 카드 가상머신(65)은 다운로드된 애플릿의 실행중에 전송 받은 커맨드 혹은 애플릿의 다운로드를 위해 전송 받은 커맨드를 처리하여 그 응답결과를 카드 리더기(70)로 전송하여 주되, 상기 전송 받은 커맨드 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기정보(null byte)를 카드 리더기(70)로 전송하는 트랜잭션을 실행시킨다. 이러한 자바카드 가상 머신(65)은 도 1에 도시한 자바 스마트 카드의 하드웨어 구성중 롬(ROM)에 저장된다.The Java Card virtual machine (also called Java Card VM) 65 is responsible for analyzing and executing the byte code of the applet. The Java card virtual machine 65 processes a command received during execution of the downloaded applet or a command received for downloading the applet, and transmits the response result to the card reader 70, wherein the received command processing time Whenever the time of this prescribed unit is exceeded, a transaction for transmitting communication wait information (null byte) to the card reader 70 is executed. This Java card virtual machine 65 is stored in a ROM (ROM) of the hardware configuration of the Java smart card shown in FIG.

카드 운영체계(63)는 스마트 카드 하드웨어(61)의 각종 장치들을 제어할 수 있는 드라이버들이 존재한다. 이와 같은 카드 OS(63)는 스마트 카드의 하드웨어 구성들을 JCRE(Java Card Runtime Environment)가 사용할 수 있도록 하는 역할을 담당한다. 이러한 카드 운영체계(63) 역시 도 1에 도시한 자바 스마트 카드의 하드웨어 구성중 롬(ROM)에 저장된다.The card operating system 63 includes drivers that can control various devices of the smart card hardware 61. The card OS 63 is responsible for enabling the hardware configuration of the smart card to be used by the Java Card Runtime Environment (JCRE). This card operating system 63 is also stored in a ROM (ROM) of the hardware configuration of the Java smart card shown in FIG.

상기 JCRE는 자바카드 프레임워크 및 API(Application Program Interface)(67), JCVM(65), 카드 OS(63)를 포괄하여 일컫는 용어로서, 애플릿이 실행될 수 있는 런타임 환경을 말한다. 이러한 JCRE는 단말기인 카드 리더기로부터 명령어를 받고 분석하여 해당 애플릿에게 전달하는 역할을 수행한다.The JCRE is a term encompassing a Java card framework, an application program interface (API) 67, a JCVM 65, and a card OS 63. The JCRE refers to a runtime environment in which applets can be executed. This JCRE receives commands from the card reader, which is a terminal, analyzes them, and delivers them to the applet.

경우에 따라서는 자바 스마트 카드의 소프트웨어를 크게 애플릿과 자바카드 가상머신으로 구분 가능한데, 이러한 경우의 자바카드 가상머신은 상술한 자바카드 프레임워크 및 API(67), JCVM(65), 카드 OS(63)를 포괄한다. 이와 같이 API(67), JCVM(65), 카드 OS(63)를 포괄하는 자바카드 가상머신 역시 애플릿 실행중에 전송 받은 커맨드 혹은 애플릿의 다운로드를 위해 전송 받은 커맨드를 처리하여 그 응답결과를 카드 리더기(70)로 전송하여 주되, 상기 전송 받은 커맨드 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기정보(null byte)를 카드 리더기(70)로 전송하는 트랜잭션을 실행시킬 수 있다.In some cases, the Java smart card software can be largely divided into applets and Java card virtual machines. In this case, the Java card virtual machine includes the above-described Java card framework and API (67), JCVM (65), and card OS (63). ). As described above, the Javacard virtual machine including the API 67, the JCVM 65, and the card OS 63 also processes the command transmitted during the execution of the applet or the command received for downloading the applet, and returns the response result to the card reader ( 70). Whenever the received command processing time exceeds a prescribed unit of time, a transaction for transmitting communication wait information (null byte) to the card reader 70 may be executed.

이하 애플릿 다운로드시 상술한 계층 구조도를 가지는 자바 스마트 카드(60)에서 카드 리더기(70)로 널 바이트(null byte)와 같은 통신 대기정보가 발생되어 전송되는 과정을 도 3을 참조하여 보다 상세히 설명하기로 한다.Hereinafter, a process in which communication waiting information such as a null byte is generated and transmitted from the Java smart card 60 having the above-described hierarchical structure to the card reader 70 will be described in detail with reference to FIG. 3. Shall be.

도 3은 본 발명의 실시예에 따른 자바 스마트 카드(60)에서 실행 가능한 통신 방법을 설명하기 위한 흐름도를 도시한 것이다.3 is a flowchart illustrating a communication method executable in the Java smart card 60 according to an embodiment of the present invention.

도 3을 참조하면, 우선 본 발명의 실시예에 따른 자바 스마트 카드(60)는 일반 자바 스마트 카드와 같이 일반적인 통신 방식에 따라 초기 동작한다. 즉, 자바 스마트 카드(60)와 카드 리더기(70) 사이에는 초기 동작으로서 카드 인식(80단계)과, 카드 및 단말기 상호 인증(90단계)이 이루어진다.Referring to FIG. 3, the Java smart card 60 according to an embodiment of the present invention initially operates according to a general communication scheme like a general Java smart card. That is, the card recognition (step 80) and the card and terminal mutual authentication (step 90) are performed between the Java smart card 60 and the card reader 70 as an initial operation.

이와 같이 자바 스마트 카드(60)와 카드 리더기(70) 사이에 초기 동작이 완료되면, 애플릿 다운로드를 위해 우선 카드 리더기(70)는 커맨드 헤더인 APDU(Application Protocol Data Unit) 헤더 5바이트를 스마트 자바 카드(60)측으로 전송(100단계)하여 거래를 시작한다.When the initial operation between the Java smart card 60 and the card reader 70 is completed as described above, the card reader 70 first sends 5 bytes of an APDU (Application Protocol Data Unit) header, which is a command header, to download the applet. Transfer to step 60 (100) to start a transaction.

카드 리더기(70)로부터 애플릿 다운로드를 위한 커맨드 헤더를 전송 받은 자바 스마트 카드(60)는, 전송 받은 커맨드 헤더를 처리하여 그 응답결과를 전송(110단계)하여 주되, 상기 전송 받은 커맨드 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기상태를 지시하는 널(null)바이트 정보를 상기 카드 리더기(70)로 전송하는 제1트랜잭션을 실행시킨다.The Java smart card 60 which received the command header for downloading the applet from the card reader 70 processes the received command header and transmits the response result (step 110), wherein the received command processing time is defined. Whenever the unit time is exceeded, a first transaction for transmitting null byte information indicating the communication waiting state to the card reader 70 is executed.

상기 제1트랜잭션을 보다 구체적인 예를 들어 설명하면, 자바 스마트 카드(60)의 자바카드 가상 머신(65)은 커맨드 헤더인 APDU를 전송 받는 즉시 타이머를 카운팅 개시하고, 그 카운팅 값이 반복적으로 1초가 되면 그때마다 자동으로 널 바이트를 전송하면서 상기 전송 받은 명령어를 계속적으로 처리한다. 만약 명령어 처리가 정상적으로 끝나면 그 응답으로서 ACK 바이트를 110단계에서 전송한다. 기타 장애로 정상적인 응답을 보낼 수 없다면 자바카드 가상머신(65)은 스테이터스 워드(Status Word)응답을 110단계에서 전송하여 주면 된다.Referring to the first transaction as a specific example, the Java card virtual machine 65 of the Java smart card 60 starts counting a timer immediately after receiving the command header APDU, and the counting value is repeatedly 1 second. Whenever a null byte is automatically transmitted, the received command is continuously processed. If the command processing is completed normally, an ACK byte is transmitted in step 110 as the response. If the normal response cannot be sent due to other failures, the Javacard virtual machine 65 may transmit a status word response in step 110.

상술한 바와 같이 커맨드 헤더를 수신하고 처리한 응답결과가 카드 리더기(70)로 전송되면, 카드 리더기(70)는 자바 스마트 카드(60)로부터 전송 받은 응답을 검사하여 커맨드 바디(body)인 APDU 바디(body) 데이터를 전송(120단계)할 것인지 아니면 1초를 기다릴 것인지 판단한다. 판단 근거로서의 예를 들면, 110단계에서 전송 받은 응답 데이터가 통신 대기상태를 지시하는 널 바이트라면 1초를 기다리면 된다. 만약 전송 받은 응답 데이터가 ACK 바이트라면 바로 APDU 커맨드 바디를 전송하고, 전송 받은 응답 데이터가 스테이터스 워드(SW)라면 그에 따른 후처리를 수행하면 된다.As described above, when the response result of receiving and processing the command header is transmitted to the card reader 70, the card reader 70 examines the response received from the Java smart card 60 to determine the APDU body which is the command body. (body) It is determined whether to transmit the data (step 120) or wait one second. For example, if the response data received in step 110 is a null byte indicating a communication waiting state, one second may be waited. If the received response data is an ACK byte, the APDU command body is immediately transmitted. If the received response data is a status word SW, post processing according to the received response data is performed.

한편 자바 스마트 카드(60)의 자바카드 가상머신(65)은 상기 카드 리더기(70)로부터 커맨드 바디(body)의 전송이 있는 경우 그 커맨드 바디(body)를 처리하여 그 응답결과를 전송(130단계)하여 주되, 상기 전송 받은 커맨드 바디 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기상태를 지시하는 널(null)바이트 정보를 상기 카드 리더기(70)로 전송하는 제2트랜잭션을 실행시킨다.On the other hand, the Java card virtual machine 65 of the Java smart card 60, if there is a transmission of the command body from the card reader 70 processes the command body and transmits the response result (step 130). Whenever the received command body processing time exceeds a prescribed unit of time, a second transaction for transmitting null byte information indicating a communication waiting state to the card reader 70 is executed.

즉, 자바 스마트 카드(60)의 가상머신(65)은 커맨드 바디를 전송 받는 즉시 타이머를 카운팅 개시하고, 그 카운팅 값이 반복적으로 1초가 되면 그때마다 자동으로 널 바이트를 전송하면서 상기 전송 받은 명령어를 계속적으로 처리한다. 만약 명령어 처리가 정상적으로 끝나면 그 응답으로서 스테이터스 워드 1,2(SW1,SW2)를 전송하여 커맨드 바디의 처리종료를 지시하여 준다.That is, the virtual machine 65 of the Java smart card 60 starts counting the timer as soon as it receives the command body. When the counting value is repeatedly 1 second, the virtual machine 65 automatically transmits a null byte and executes the received command. Continue to process If command processing is completed normally, status word 1,2 (SW1, SW2) is sent as a response to indicate the end of processing of command body.

이상에서 설명한 바와 같이 본 발명의 실시예에 따른 자바 스마트 카드의 가상 머신 혹은 자바 프로세서 등은 애플릿 전송시 특정 명령어 처리시간이 장기화 될 경우에도 지속적으로 통신 대기정보인 널 바이트(null byte)를 전송하여 줌으로서, 명령어 처리 시간 지연으로 인한 카드와 단말기간의 통신 단절 현상을 사전에 예방하여 주는 역할을 수행한다.As described above, a virtual machine or a Java processor of a Java smart card according to an embodiment of the present invention When sending applets Even if a certain instruction processing time is prolonged, it continuously transmits null byte, which is communication waiting information, and prevents the communication disconnection between the card and the terminal due to the instruction processing time delay. .

한편 본 발명의 또 다른 실시예로서 자바카드의 가상머신(65) 혹은 자바 프로세서 등은 애플릿 실행중에 카드 리더기로부터 전송된 커맨드의 처리시간이 규정 단위의 시간을 초과하면 통신 대기를 지시하여 주는 널 바이트를 카드 리더기(70)로 전송하여 주는 트랜잭션을 처리하여 주기도 한다.On the other hand, as another embodiment of the present invention, the virtual machine 65 or the Java processor of the Java card may indicate a communication wait when the processing time of the command transmitted from the card reader during the execution of the applet exceeds the prescribed unit time. It may also process the transaction to send to the card reader 70.

예를 들면, 본 발명의 실시예에 따른 자바 스마트 카드의 가상머신(65)은 EEPROM에 설치된 애플릿의 바이트 코드들을 하나씩 번역하여 실행한다. 그 예로서 자바 스마트 카드의 가상머신(65)은 번역한 바이트 코드의 실행지침에 따라 카드 리더기(70)로 소정의 데이터를 전송(1단계)한다. 상기 데이터 전송에 응답하는 커맨드(혹은 데이터)가 카드 리더기(70)로부터 전송되면, 자바 스마트 카드의 가상머신(65)은 내부 타이머를 카운팅 개시(2단계)하고 상기 커맨드(혹은 데이터)를 처리하기 위한 바이트 코드들을 번역하여 실행(3단계)한다. 애플릿의 실행 개시는 카드 리더기의 실행 개시 커맨드에 의해 이루어지므로, 애플릿 실행 개시의 경우에는 상기 1단계는 생략되고 실행 개시 커맨드가 전송되면 상기 2단계 및 3단계를 실행한다. 상기 3단계에서 바이트 코드들의 실행중 커맨드 처리시간이 규정 단위의 시간을 초과할때 마다 자바 스마트 카드의 가상머신(65)은 통신 대기정보를 발생하여 상기 카드 리더기(70)로 전송(4단계)한다. 상기 통신 대기정보의 전송은 상기 내부 타이머가 지정된 시간에 도달함에 따라 발생하는 인터럽트의 처리루틴에 의해 바이트 코드의 실행 도중에 우선적으로 처리된다.For example, the virtual machine 65 of the Java smart card according to the embodiment of the present invention translates and executes byte codes of applets installed in the EEPROM one by one. As an example, the virtual machine 65 of the Java smart card transmits predetermined data to the card reader 70 in accordance with the execution instructions of the translated byte code (step 1). When a command (or data) in response to the data transmission is transmitted from the card reader 70, the virtual machine 65 of the Java smart card starts counting an internal timer (step 2) and processes the command (or data). Translate and execute byte codes for execution (step 3). Since the execution of the applet is executed by the execution start command of the card reader, the first step is omitted in the case of the execution of the applet, and the steps 2 and 3 are executed when the execution start command is transmitted. Whenever the command processing time during execution of the byte codes in the step 3 exceeds the time of the prescribed unit, the virtual machine 65 of the Java smart card generates communication waiting information and transmits it to the card reader 70 (step 4). do. The transmission of the communication wait information is preferentially processed during execution of the byte code by an interrupt processing routine that occurs when the internal timer reaches a specified time.

물론 커맨드 처리가 완료되어 응답이 카드 리더기(70)로 전송되었다면 타이머 카운팅은 종료될 것이며(이에 따라 내부 타이머를 정지시키고 리더기로부터 응답을 기다린다), 애플릿을 구성하는 일련의 바이트 코드의 실행 역시 완료되었다면 그에 따른 애플릿 역시 실행 종료됨은 당연한 사실이다.Of course, if command processing is complete and a response is sent to the card reader 70, timer counting will end (and thus stop the internal timer and wait for a response from the reader), and if execution of the sequence of byte codes that make up the applet is also completed It is no wonder that the resulting applet is also terminated.

상술한 바와 같이 애플릿 실행중 카드 리더기(70)로부터 전송된 커맨드(혹은 데이터)의 처리시간이 장기화 될 경우에도 통신 대기정보인 널 바이트(null byte)를 카드 리더기로 전송하여 줌으로서, 커맨드(혹은 데이터) 처리 시간 지연으로 인한 카드와 단말기간의 통신 단절 현상을 사전에 예방하여 주는 효과를 얻을 수 있게 되는 것이다.As described above, even when the processing time of the command (or data) transmitted from the card reader 70 is prolonged during the execution of the applet, the command (or Data) It is possible to prevent the communication disconnection between the card and the terminal due to the processing time delay.

한편 본 발명의 실시예들에서는 애플릿 실행중, 그리고 애플릿 다운로드중 통신 대기정보인 널 바이트를 발생하여 카드 리더기로 전송하여 주는 자바카드 가상 머신에 대해 설명하였으나, 본 발명의 실시예에 따른 자바카드 가상 머신(65)은 다운로드된 애플릿의 실행중에 전송 받은 커맨드 혹은 애플릿의 다운로드를 위해 전송 받은 커맨드를 처리하는 시간이 규정 단위의 시간을 초과할 때마다 통신 대기정보를 발생하여 카드 리더기(70)로 전송할 수도 있다.Meanwhile, the embodiments of the present invention have described a Java card virtual machine that generates a null byte, which is communication waiting information, and transmits it to a card reader while the applet is running and downloading the applet. The machine 65 generates and transmits communication waiting information to the card reader 70 whenever the processing time of the received command or the received command for downloading the applet exceeds the prescribed unit time during execution of the downloaded applet. It may be.

상술한 바와 같이 본 발명은 자바카드의 가상머신이 애플릿 다운로드 혹은 애플릿 실행중에 통신 대기정보를 발생하여 카드 리더기로 전송하여 줌으로서, 애플릿 설계자들은 커맨드 처리 지연으로 인한 카드와 카드 리더기간의 통신 단절을 예방하기 위한 별도의 작업을 고려함 없이 편리하게 애플릿을 설계할 수 있는 이점이 있다.As described above, according to the present invention, the virtual machine of the Java card generates communication waiting information and transmits it to the card reader while the applet is downloaded or the applet is executed. The advantage is that you can design applets conveniently without considering extra work to prevent them.

한편 본 발명은 도면에 도시된 실시예들을 참고로 설명되었으나 이는 예시적인 것에 불과하며, 당해 기술분야에 통상의 지식을 지닌자라면 이로부터 다양한 변형 및 균등한 타실시예가 가능하다는 점을 이해할 것이다. 따라서 본 발명의 진정한 기술적 보호범위는 첨부된 특허청구범위에 의해서만 정해져야 할 것이다. On the other hand, the present invention has been described with reference to the embodiments shown in the drawings, which are merely exemplary, and those skilled in the art will understand that various modifications and equivalent other embodiments are possible therefrom. Therefore, the true technical protection scope of the present invention should be defined only by the appended claims.

도 1은 자바 칩을 이용한 일반적인 자바 스마트 카드의 구성도.1 is a block diagram of a typical Java smart card using a Java chip.

도 2는 본 발명의 실시예에 따른 자바 스마트 카드의 계층 구조도.2 is a hierarchical structure diagram of a Java smart card according to an embodiment of the present invention.

도 3은 본 발명의 실시예에 따른 자바 스마트 카드에서 실행 가능한 통신 방법을 설명하기 위한 흐름도.3 is a flowchart illustrating a communication method executable in a Java smart card according to an embodiment of the present invention.

도 4는 본 발명의 또 다른 실시예를 따른 애플릿 실행중의 통신 방법을 설명하기 위한 도면.4 is a diagram for explaining a communication method during execution of an applet according to another embodiment of the present invention;

Claims (5)

카드 운영체계 및 카드 하드웨어를 제어할 수 있는 드라이버가 탑재된 자바 스마트 카드에 있어서,In the Java smart card with a driver to control the card operating system and card hardware, 애플릿의 바이트코드 데이터가 저장되는 제1메모리와;A first memory for storing bytecode data of an applet; 상기 애플릿 실행중 카드 리더기로부터 전송 받은 커맨드를 처리하여 그 응답결과를 전송하여 주되, 상기 전송 받은 커맨드의 처리시간이 규정 단위의 시간을 초과할때 마다 통신 대기정보를 발생하여 상기 카드 리더기로 전송하는 트랜잭션을 처리하는 자바카드 가상 머신이 저장된 제2메모리;를 포함함을 특징으로 하는 자바 스마트 카드.During the execution of the applet, the command received from the card reader is processed and the response result is transmitted. When the processing time of the received command exceeds the prescribed unit time, communication waiting information is generated and transmitted to the card reader. And a second memory in which a Java card virtual machine for processing a transaction is stored. 카드 운영체계 및 카드 하드웨어를 제어할 수 있는 드라이버가 탑재된 스마트 자바 카드에 있어서,Smart Java Card with a driver that can control the card operating system and card hardware, 다운로드되는 애플릿의 바이트코드 데이터를 저장하기 위한 제1메모리와;A first memory for storing bytecode data of an applet to be downloaded; 애플릿의 다운로드를 위해 전송 받은 커맨드를 처리하여 그 응답결과를 전송하여 주되, 상기 전송 받은 커맨드 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기정보를 상기 카드 리더기로 전송하는 트랜잭션을 처리하는 자바카드 가상 머신이 저장된 제2메모리를 포함함을 특징으로 하는 자바 스마트 카드.Java which processes the received command for downloading the applet and transmits the response result, and processes a transaction for transmitting communication wait information to the card reader whenever the received command processing time exceeds the prescribed unit time. Java smart card, characterized in that the card virtual machine includes a second memory stored. 카드 운영체계 및 카드 하드웨어를 제어할 수 있는 드라이버가 탑재된 스마트 자바 카드에 있어서,Smart Java Card with a driver that can control the card operating system and card hardware, 다운로드되는 애플릿의 바이트코드 데이터를 저장하기 위한 제1메모리와;A first memory for storing bytecode data of an applet to be downloaded; 다운로드된 애플릿의 실행중에 전송 받은 커맨드를 혹은 애플릿의 다운로드를 위해 전송 받은 커맨드를 처리하여 그 응답결과를 전송하여 주되, 상기 전송 받은 커맨드 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기정보를 카드 리더기로 전송하는 트랜잭션을 처리하는 자바카드 가상 머신이 저장된 제2메모리를 포함함을 특징으로 하는 자바 스마트 카드.Process the received command during execution of the downloaded applet or the received command for downloading the applet, and transmit the response result.Whenever the received command processing time exceeds the prescribed unit time, communication waiting information is sent. Java smart card, characterized in that it comprises a second memory that stores a Java card virtual machine for processing transactions sent to the card reader. 청구항 1 내지 청구항 3중 어느 한 항에 있어서, 상기 자바카드 가상 머신은;The system of claim 1, wherein the Javacard virtual machine; 클래스(class) 및 메써드(methods)를 제공하기 위한 자바카드 프레임워크(framework) 및 API(application program interface)와;A Java Card framework and application program interface (API) for providing classes and methods; 카드 하드웨어를 제어하기 위한 드라이버들이 존재하는 카드 운영체계;를 더 포함함을 특징으로 하는 자바 스마트 카드.And a card operating system in which drivers for controlling the card hardware are present. 자바카드의 가상머신 혹은 자바 프로세서가 기 설치된 애플릿의 바이트 코드들을 번역하여 실행하는 방법에 있어서,In a method of translating and executing byte codes of a pre-installed applet by a virtual machine of Java Card or a Java processor 번역한 바이트 코드의 실행지침에 따라 카드 리더기로 전송하였던 소정의 데이터에 대한 커맨드 또는 애플릿의 최초 수행 커맨드를 상기 카드 리더기로부터 전송받는 단계와;Receiving, from the card reader, a command for predetermined data or an applet's first execution command for the predetermined data transmitted to the card reader according to the execution instructions of the translated byte code; 상기 전송받은 커맨드 혹은 데이터를 처리하여 그 응답결과를 전송하여 주되, 상기 전송받은 커맨드 처리시간이 규정 단위의 시간을 초과할 때마다 통신 대기정보를 상기 카드 리더기로 전송하는 트랜잭션 수행단계;를 포함함을 특징으로 하는 자바 스마트 카드의 바이트 코드 실행방법.Received the above And processing a command or data to transmit a response result, and transmitting a communication wait information to the card reader whenever the received command processing time exceeds a prescribed unit time. How to execute byte code of Java smart card.
KR1020030086776A 2003-12-02 2003-12-02 Java smart card KR100576967B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030086776A KR100576967B1 (en) 2003-12-02 2003-12-02 Java smart card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030086776A KR100576967B1 (en) 2003-12-02 2003-12-02 Java smart card

Publications (2)

Publication Number Publication Date
KR20050053158A true KR20050053158A (en) 2005-06-08
KR100576967B1 KR100576967B1 (en) 2006-05-10

Family

ID=37248899

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030086776A KR100576967B1 (en) 2003-12-02 2003-12-02 Java smart card

Country Status (1)

Country Link
KR (1) KR100576967B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966443B (en) * 2019-05-20 2024-02-23 恒宝股份有限公司 Smart card and working method thereof
KR102474650B1 (en) 2020-11-03 2022-12-06 유비벨록스(주) Secure Element with Universal Subscriber Identified Module

Also Published As

Publication number Publication date
KR100576967B1 (en) 2006-05-10

Similar Documents

Publication Publication Date Title
US5826017A (en) Apparatus and method for communicating data between elements of a distributed system using a general protocol
CN100423013C (en) Method and apparatus for loading a trustable operating system
US7155550B2 (en) Program-executing apparatus and portable information processing apparatus
US11126753B2 (en) Secure processor chip and terminal device
EP2364481B1 (en) Method for securing java bytecode.
KR101843730B1 (en) Microprocessor system with secured runtime environment
JP3824580B2 (en) Mobile communication portable terminal and download program file management program
CN110414651A (en) Debug the method and device of smart card
US20160196170A1 (en) Integrated-circuit radio
KR100576967B1 (en) Java smart card
JP4742469B2 (en) IC card, IC card processing apparatus and processing method using a plurality of OSs
KR100879909B1 (en) System for providing applet service using scws and method thereof
JP4236830B2 (en) Storage device with upload function
US10664418B2 (en) Peripheral device controlling device, operation method thereof, and operation method of peripheral device controlling device driver
CN110888674A (en) Method and device for executing security calculation in Python virtual machine
KR101384536B1 (en) System and method for calling API of host terminal in smart-card, host terminal and smart-card, and recording medium thereof
US20040015876A1 (en) Method and structure of implementing a safe pointer
US10489775B2 (en) Integrated circuit card adapted to transfer first data from a first application for use by a second application
JP7234567B2 (en) Electronic information storage medium, processing method in electronic information storage medium, and program
JP2005525615A (en) Managing byte transmission in smart cards
KR100615890B1 (en) Method for patching smart card operating system
JP2024046675A (en) IC chip
KR20160102040A (en) Integrated-circuit radio
CN115687238A (en) System on chip comprising program installation software
CN115859225A (en) Reinforcement method, registration method, operation method, electronic device, and storage medium

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130329

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20140211

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20150126

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20160105

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20170307

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20180213

Year of fee payment: 13