KR101177184B1 - Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore - Google Patents

Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore Download PDF

Info

Publication number
KR101177184B1
KR101177184B1 KR1020100004749A KR20100004749A KR101177184B1 KR 101177184 B1 KR101177184 B1 KR 101177184B1 KR 1020100004749 A KR1020100004749 A KR 1020100004749A KR 20100004749 A KR20100004749 A KR 20100004749A KR 101177184 B1 KR101177184 B1 KR 101177184B1
Authority
KR
South Korea
Prior art keywords
class driver
host
ums
usb
wrapper
Prior art date
Application number
KR1020100004749A
Other languages
Korean (ko)
Other versions
KR20100012889A (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 KR1020100004749A priority Critical patent/KR101177184B1/en
Publication of KR20100012889A publication Critical patent/KR20100012889A/en
Application granted granted Critical
Publication of KR101177184B1 publication Critical patent/KR101177184B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/08Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers from or to individual record carriers, e.g. punched card, memory card, integrated circuit [IC] card or smart card
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Abstract

본 발명은 스마트카드가 내장된 USB 동글(Dongle)과 호스트 사이의 USB 매스 스토리지 통신을 하게 하는 방법 및 이를 위한 USB 동글 장치에 관한 것이다.
본 발명은, 스마트카드가 내장된 유에스비 동글과 호스트 사이의 통신 방법에 있어서,
호스트(20)가 유에스비 동글(10)에서 데이터 블록을 독출 시에,
유에스비 동글(10) 측에 존재하고 메스 스토리지를 제어하는 제1 UMS 클래스 드라이버(13)에, 호스트(20) 측에 존재하고 메스 스토리지를 제어하는 제2 UMS 클래스 드라이버(23)가, 코멘드 블록 관련 정보를 가지고 있는 패킷인 코멘드 블럭 랩퍼(CBW)를 전송하는 단계; 상기 코멘드 블럭 랩퍼(CBW)를 수신한 상기 제1 UMS 클래스 드라이버(13)가, 제2 UMS 클래스 드라이버(23)에 데이터 블록을 전송하는 단계; 데이터 블록을 전송한 상기 제1 UMS 클래스 드라이버(13)가, 앞선 코멘드 블록의 상태를 가지고 있는 패킷인 코멘트 상태 랩퍼(CSW)를 상기 제2 UMS 클래스 드라이버(23)에 전송하는 단계를 포함하고,
호스트(20)가 유에스비 동글(10)에 데이터 블록을 기록 시에,
상기 제2 UMS 클래스 드라이버(23)가 상기 제1 UMS 클래스 드라이버(13)에, 상기 코멘드 블럭 랩퍼(CBW)를 전송하는 단계; 상기 코멘드 블럭 랩퍼(CBW)를 전송한 상기 제2 UMS 클래스 드라이버(23)가, 상기 제1 UMS 클래스 드라이버(23)에 데이터 블록을 전송하는 단계; 데이터 블록을 수신한 상기 제1 UMS 클래스 드라이버(13)가, 코멘드 상태 랩퍼(CSW)를 상기 제2 UMS 클래스 드라이버(23)에 전송하는 단계를 포함하는 것을 특징으로 한다.
이상과 같은 본 발명을 이용하면, 스마트 카드와 호스트가 통신 가능하게 하는 통신 방법 및 이를 위한 USB 동글 장치를 제공하여, 강력한 보안성과 가입자 확인이 가능하고, 서비스 제공자들이 원하는 다양한 어플리케이션을 탑재 할 수 있는 스마트 카드를 유통함으로써, 저작권 보호, 마케팅 등을 위한 유연한 라이센스 정책을 실현할 수 있게 된다.
The present invention relates to a method for enabling USB mass storage communication between a USB dongle with a smart card and a host, and a USB dongle device for the same.
The present invention provides a communication method between a USB card and a host with a built-in smart card,
When the host 20 reads a data block from the USB dongle 10,
In the first UMS class driver 13 that exists on the USS dongle 10 and controls mass storage, the second UMS class driver 23 that exists on the host 20 side and controls mass storage is associated with the command block. Transmitting a command block wrapper (CBW), which is a packet having information; Transmitting, by the first UMS class driver (13), the data block to the second UMS class driver (23) after receiving the command block wrapper (CBW); Transmitting, by the first UMS class driver 13, which has transmitted the data block, to the second UMS class driver 23, a comment state wrapper (CSW), which is a packet having a state of a previous command block.
When the host 20 writes a block of data to the USB dongle 10,
Sending, by the second UMS class driver (23), the command block wrapper (CBW) to the first UMS class driver (13); Transmitting, by the second UMS class driver (23), the command block wrapper (CBW), to the first UMS class driver (23); And the first UMS class driver 13 receiving the data block transmits a command state wrapper (CSW) to the second UMS class driver 23.
By using the present invention as described above, by providing a communication method and a USB dongle device for enabling a smart card and the host to communicate, it is possible to secure a strong security and subscriber, and to mount a variety of applications desired by service providers By distributing smart cards, flexible licensing policies for copyright protection, marketing, and the like can be realized.

Description

스마트카드가 내장된 유에스비 동글과 호스트 사이의 통신 방법 및 이를 위한 유에스비 동글장치{Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore}Communication method between USB dongle and host with smart card built-in and a USB dongle device for the same {Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore}

본 발명은 스마트카드가 내장된 USB 동글(Dongle)과 호스트 사이의 USB 매스 스토리지 통신 방법 및 이를 위한 USB 동글 장치에 관한 것이다.The present invention relates to a USB mass storage communication method between a USB dongle (Dongle) and a host with a smart card and a USB dongle device for the same.

스마트 카드에는 마이크로 프로세서, 보안 모듈, 메모리(저장장치) 등을 구비한 집적회로(IC) 칩이 장착되어 있어서, 다양한 정보의 기록이나 신원 확인, 전자 화폐, 신용카드 또는 전자 통장 등의 결제 수단으로 널리 사용되고 있다. The smart card is equipped with an integrated circuit (IC) chip including a microprocessor, a security module, and a memory (storage device), and is used as a means of payment for recording or identifying various information, electronic money, credit card, or electronic bank account. It is widely used.

그래서, 최근에는 휴대폰과 같은 이동통신단말기에 탈착식으로 스마트 카드의 일종인 SIM(USIM)카드를 장착하고, 이 SIM카드의 메모리에 대용량의 플래시 메모리를 사용하여, 이 SIM 카드에 가입자 확인 정보나 자신의 전화번호부(폰북)나 SMS/MMS 뿐만 아니라, 통신 사업자/사용자들의 대용량 멀티미디어 데이터 등의 다양한 콘텐츠나 어플리케이션을 저장하여 사용 가능하게 되었다. Therefore, recently, a mobile communication terminal such as a mobile phone is detachably equipped with a SIM (USIM) card, which is a kind of smart card, and a large-capacity flash memory is used for the memory of the SIM card. In addition to the phone book (Phonebook) and SMS / MMS of a variety of contents and applications such as a large amount of multimedia data carriers / users can be stored and used.

이때, 일반적으로 스마트카드와 단말기 사이에서는 APDU통신(SIO통신)을 수행하여, 데이터 교환에 사용되는 전송 프로토콜은 Character based T=0 와 Block Based T=1 이고, 스마트카드와 단말기가 통신을 하기 위해서는 스마트카드는 T=0 protocol 을 기본으로 제공해야 하며, 단말기는 T=0 와 T=1 protocol 모두를 기본으로 지원해야 한다.In this case, in general, APDU communication (SIO communication) is performed between the smart card and the terminal, and the transmission protocols used for data exchange are Character based T = 0 and Block Based T = 1, in order for the smart card and the terminal to communicate. Smart card should provide T = 0 protocol by default, and terminal should support both T = 0 and T = 1 protocol by default.

한편, 호스트(PC)가 서버에 연결되어 있는 콘텐츠(예:인터넷 강의 등)를 사용하기 위해서는, 기존에는 일반 사용자가 해당 서버용 ID와 패스워드를 입력하면 누구나 무단으로 콘텐츠를 이용할 수 있고 하드디스크나 USB 메모리 장치에 관련 데이터를 다운받을 수 있다.
이로 인해 불법 복제 및 ID와 패스워드 공유가 많아, 특히 온라인 유통 시장에서 컨텐츠 제공자(Contents Provider) 입장에선 많은 손실이 있을 수 밖에 없다.
그래서 서비스 제공자(Service Provider)는, 컨텐츠 제공자에게 다양한 컨텐츠 라이센싱(Licensing)을 보증 할 수 있는 신뢰성 있는 유통 시장 제공과 개인 정보 활용 및 보호의 필요성을 항상 제기하여 왔다.
On the other hand, in order to use the content (for example, Internet lecture, etc.) connected to the server, the host (PC) can use the content without permission if an ordinary user enters the ID and password for the server. The relevant data can be downloaded to the memory device.
As a result, there is a lot of illegal copying and ID and password sharing, and there is a lot of loss for content providers, especially in the online distribution market.
Therefore, Service Provider has always raised the need for providing a reliable distribution market that can guarantee various content licensing to the content provider, and utilizing and protecting personal information.

삭제delete

삭제delete

본 발명은 이상과 같은 필요성을 감안하여, 스마트 카드와 호스트가 통신 가능하게 하는 통신 방법 및 이를 위한 USB 동글 장치를 제공하여, 강력한 보안성과 가입자 확인이 가능하고, 서비스 제공자들이 원하는 다양한 어플리케이션을 탑재 할 수 있는 스마트 카드를 유통함으로써, 저작권 보호, 마케팅 등을 위한 유연한 라이센스 정책을 실현할 수 있게 한다.In view of the above necessity, the present invention provides a communication method and a USB dongle device for allowing a smart card and a host to communicate with each other, thereby providing strong security and subscriber identification, and enabling a variety of applications desired by service providers. By distributing smart cards, it is possible to realize flexible licensing policies for copyright protection, marketing, and the like.

이상과 같은 기술적 과제를 달성하기 위하여, 본 발명의 일실시예에서는, 스마트카드가 내장된 유에스비 동글과 호스트 사이의 통신 방법에 있어서,In order to achieve the above technical problem, in one embodiment of the present invention, in the communication method between a USB card and a host with a built-in smart card,

호스트(20)가 유에스비 동글(10)에서 데이터 블록을 독출 시에,When the host 20 reads a data block from the USB dongle 10,

유에스비 동글(10) 측에 존재하고 메스 스토리지를 제어하는 제1 UMS 클래스 드라이버(13)에, 호스트(20) 측에 존재하고 메스 스토리지를 제어하는 제2 UMS 클래스 드라이버(23)가, 코멘드 블록 관련 정보를 가지고 있는 패킷인 코멘드 블럭 랩퍼(CBW)를 전송하는 단계; 상기 코멘드 블럭 랩퍼(CBW)를 수신한 상기 제1 UMS 클래스 드라이버(13)가, 제2 UMS 클래스 드라이버(23)에 데이터 블록을 전송하는 단계; 데이터 블록을 전송한 상기 제1 UMS 클래스 드라이버(13)가, 앞선 코멘드 블록의 상태를 가지고 있는 패킷인 코멘트 상태 랩퍼(CSW)를 상기 제2 UMS 클래스 드라이버(23)에 전송하는 단계를 포함하고,In the first UMS class driver 13 that exists on the USS dongle 10 and controls mass storage, the second UMS class driver 23 that exists on the host 20 side and controls mass storage is associated with the command block. Transmitting a command block wrapper (CBW), which is a packet having information; Transmitting, by the first UMS class driver (13), the data block to the second UMS class driver (23) after receiving the command block wrapper (CBW); Transmitting, by the first UMS class driver 13, which has transmitted the data block, to the second UMS class driver 23, a comment state wrapper (CSW), which is a packet having a state of a previous command block.

호스트(20)가 유에스비 동글(10)에 데이터 블록을 기록 시에,When the host 20 writes a block of data to the USB dongle 10,

상기 제2 UMS 클래스 드라이버(23)가 상기 제1 UMS 클래스 드라이버(13)에, 상기 코멘드 블럭 랩퍼(CBW)를 전송하는 단계; 상기 코멘드 블럭 랩퍼(CBW)를 전송한 상기 제2 UMS 클래스 드라이버(23)가, 상기 제1 UMS 클래스 드라이버(23)에 데이터 블록을 전송하는 단계; 데이터 블록을 수신한 상기 제1 UMS 클래스 드라이버(13)가, 코멘드 상태 랩퍼(CSW)를 상기 제2 UMS 클래스 드라이버(23)에 전송하는 단계를 포함하는 것을 특징으로 한다.Sending, by the second UMS class driver (23), the command block wrapper (CBW) to the first UMS class driver (13); Transmitting, by the second UMS class driver (23), the command block wrapper (CBW), to the first UMS class driver (23); And the first UMS class driver 13 receiving the data block transmits a command state wrapper (CSW) to the second UMS class driver 23.

또한, 본 발명의 다른 실시예에서는, 스마트카드가 내장된 유에스비 동글 장치에 있어서,In addition, in another embodiment of the present invention, in the USB dongle device built-in smart card,

유에스비 장치 포트(11); 상기 유에스비 장치를 제어하는 유에스비 장치 드라이버(12); 메스 스토리지(17)를 제어하는 UMS 클래스 드라이버(13); 상기 UMS 디바이스 드라이버(13)와 자바카드 VM 솔루션(15) 사이에서, 성능 및 동작을 달성하기 위한 커스터마이징 및 튜닝을 하고, APDU 통신을 수행하는 APDU 랩퍼(14)를 포함하는 것을 특징으로 한다.USB device port 11; A USB device driver (12) for controlling the USB device; A UMS class driver 13 for controlling the mass storage 17; Between the UMS device driver 13 and the Java Card VM solution 15, it is characterized in that it comprises an APDU wrapper 14 for customizing and tuning to achieve performance and operation, and performing APDU communication.

이상과 같은 본 발명을 이용하면, 스마트 카드와 호스트가 통신 가능하게 하는 통신 방법 및 이를 위한 USB 동글 장치를 제공하여, 강력한 보안성과 가입자 확인이 가능하고, 서비스 제공자들이 원하는 다양한 어플리케이션을 탑재 할 수 있는 스마트 카드를 유통함으로써, 저작권 보호, 마케팅 등을 위한 유연한 라이센스 정책을 실현할 수 있게 된다.By using the present invention as described above, by providing a communication method and a USB dongle device for enabling a smart card and the host to communicate, it is possible to secure a strong security and subscriber, and to mount a variety of applications desired by service providers By distributing smart cards, flexible licensing policies for copyright protection, marketing, and the like can be realized.

도1은 본 발명의 전체적인 구성을 나타내는 도면.
도2는 본 발명의 USB 동글의 구성 및 외형을 도시함.
도3은 본 발명에서 데이터 블럭을 읽고 쓰는 방법을 도시함.
도4, 5는 본 발명의 데이터 송수신을 하기 위한 패킷 포맷을 도시함.
도6은 호스트가 애플렛/어플리케이션과 데이터를 송수신하는 과정을 설명하는 순서도.
1 is a view showing the overall configuration of the present invention.
Figure 2 shows the configuration and appearance of the USB dongle of the present invention.
Figure 3 illustrates a method of reading and writing data blocks in the present invention.
4 and 5 show a packet format for data transmission and reception according to the present invention.
6 is a flow chart illustrating a process of a host transmitting and receiving data with an applet / application.

본 발명은 스마트 카드가 USB 동글(Dongle) 형태로 T=0 와 T=1 프로토콜이 지원되지 않는 호스트(PC)와 통신을 하게 하는 통신 방법에 관한 것이다.
The present invention relates to a communication method for allowing a smart card to communicate with a host (PC) that does not support the T = 0 and T = 1 protocols in the form of a USB dongle.

도1은 본 발명의 스마트카드가 내장된 USB동글(10)과 호스트(PC)(20)간의 관계와, USB동글(10)의 내부 구성을 나타내는 도면이다.1 is a view showing the relationship between the USB dongle 10 and the host (PC) 20 in which the smart card of the present invention is embedded, and the internal structure of the USB dongle 10.

USB 동글(10)은 호스트(20)와 USB포트(11, 21)를 통해 USB 케이블로 연결된다.The USB dongle 10 is connected to the host 20 through a USB cable through the USB ports 11 and 21.

USB 동글(10)에는 USB 디바이스 드라이버(12), UMS(USB Mass Storage) 클래스 드라이버(13), APDU Wrapper(14), Javacard2.2.1&VM(15), Applets(16)가 존재하고, UMS(USB Mass Storage) 클래스 드라이버(13)를 통해 대용량 저장장치(Mass Storage)인 NAND 플래시 메모리(17)에 데이터를 쓰거나 NAND 플래시 메모리(17)로부터 데이터를 읽어낸다.The USB dongle 10 includes a USB device driver 12, a UMS (USB Mass Storage) class driver 13, an APDU Wrapper 14, a Javacard 2.2.1 & VM 15, and an Applets 16, and a UMS (USB Mass storage) writes data to or reads data from the NAND flash memory 17, which is a mass storage device, through the class driver 13.

호스트(20)에는 USB 호스트 드라이버(22), UMS 클래스 드라이버(23), APDU Wrapper(24), Host PC OS(25), Host PC file System(26), Application(27)이 존재한다.The host 20 includes a USB host driver 22, a UMS class driver 23, an APDU Wrapper 24, a Host PC OS 25, a Host PC file System 26, and an Application 27.

UMS 클래스 드라이버(13, 23)는 메스 스토리지(Mass Storage)를 제어하는 드라이버이다.The UMS class drivers 13 and 23 are drivers for controlling mass storage.

APDU Wrapper(14, 24)는 UMS를 통해 APDU 통신을 할 수 있는 모듈로서, UMS 디바이스 드라이버(12, 22)와 COS/Java Card 2.2VM Solution(15)/HOST PC OS(25) 사이에서, 적합한 성능 및 동작을 달성하기 위한 Customizing 및 Tuning을 수행하며, 이하의 도4에서 기록시의 데이터 포맷에 나타난 Magic Number(4 bytes), File Status(4 bytes), Command(1 byte)를 점검한 뒤 이 부분을 짤라내고 나머지 부분에 대해서 T=0, T=1 프로토콜 수행하고, 프로토콜 수행 후 응답 결과(SW1, SW2) (이하에서 설명하는 도5에서 읽을 때의 데이터 포맷에 도시됨)에 대해 적합한 Magic Number(4 bytes), File Status(1 bytes), Length(2 byte)를 붙여서 데이터 포멧을 형성하여 송신하는 기능을 수행한다. 나머지 모듈은 통상적인 것들이므로 추가적인 설명을 생략한다.
APDU Wrapper (14, 24) is a module that can perform APDU communication through UMS, and is suitable between UMS device driver (12, 22) and COS / Java Card 2.2VM Solution (15) / HOST PC OS (25). Customizing and Tuning are performed to achieve performance and operation, and after checking Magic Number (4 bytes), File Status (4 bytes), and Command (1 byte) shown in the data format at the time of recording in FIG. Cut the part and perform the T = 0, T = 1 protocol for the remaining part, and then perform the appropriate Magic for the response result (SW1, SW2) (shown in the data format when reading in Fig. 5 described below) after performing the protocol. Performs a function of forming and transmitting a data format by attaching a Number (4 bytes), a File Status (1 bytes), and a Length (2 bytes). The remaining modules are conventional ones, so further explanations are omitted.

도2는 본 발명에 적용된 스마트카드 장착 가능 USB 동글(10)의 내부 구성(도2의 왼쪽 도면) 및 외형도(도3의 오른쪽 도면)이다. 2 is an internal configuration (left view of FIG. 2) and an outline view (right view of FIG. 3) of the smart card mountable USB dongle 10 applied to the present invention.

도2의 왼쪽 도면에 나타난 바와 같이, 스마트카드 장착 가능 USB 동글(10)의 외형은 USB 메모리 장치와 유사하여 사용자가 이 장치를 호스트(PC)의 USB 포트에 끼우면 된다.As shown in the left figure of Fig. 2, the appearance of the smart card mountable USB dongle 10 is similar to that of a USB memory device, and the user inserts the device into a USB port of the host PC.

내부에는 도2의 오른쪽에 나타난 구성들이 포함되어 있는데, 스마트카드용 소켓(SIM 소켓)이 존재하여 여기에 스마트카드를 장착하면 된다.2 includes the components shown on the right side of FIG. 2, and a smart card socket (SIM socket) exists, and the smart card may be mounted therein.

또한, 이러한 본 발명의 USB 동글(10)이 서비스 프로바이더들이 일반 사용자들에게 무료로 제공할 가능성이 높기 때문에, 제조 단가를 낮추기 위하여 스마트카드에는 다양한 어플리케이션과 저장 기능을 할 수 있게 하는 NAND 메모리(도2에서는 128M bytes)를 제공하고, 사용자가 큰 용량의 저장공간이 필요한 경우에는 사용자가 Micro SD 카드(MSD)를 구입하여 장착함으로써 저장공간을 확장 가능하게 MSD 소켓이 제공되어 있다. MSD 콘트롤러(MSD C)는 확장되는 MSD를 제어하는 제어 장치이다.
In addition, since the USB dongle 10 of the present invention is highly likely to be provided to service providers free of charge to general users, the NAND memory (NAND memory) that enables various applications and storage functions in the smart card in order to reduce manufacturing costs. In FIG. 2, 128M bytes) is provided, and when the user needs a large storage space, the MSD socket is provided to expand the storage space by purchasing and installing a micro SD card (MSD). The MSD controller (MSD C) is a control device that controls the extended MSD.

도3은 USB 동글(10)과 호스트(20) 사이에서 데이터 블럭을 읽고 쓰는 방법을 도시한 것이다.3 shows a method of reading and writing data blocks between the USB dongle 10 and the host 20.

USB 동글(10)과 호스트(20) 각각에는 USB 통신을 위한 UMS 클래스 드라이버(13, 23)가 존재한다. 그리고 CBW(Command Block Wrapper)는 Command Block과 관련 정보를 가지고 있는 패킷이고, CSW(Command Status Wrapper)는 앞선 Command Block의 Status를 가지고 있는 패킷이다.Each of the USB dongle 10 and the host 20 has UMS class drivers 13 and 23 for USB communication. Command Block Wrapper (CBW) is a packet that contains a command block and related information, and Command Status Wrapper (CSW) is a packet that has a status of a previous command block.

그래서, USB 동글(10)에서 블록 데이터를 읽을 때(Block Data Read)시에는 호스트(20)의 UMS 클래스 드라이버(23)는 CBW(READ10)을 USB 동글(10)의 UMS 클래스 드라이버(13)에 송신하고 나서, Data Block을 USB 동글(10)측에서 수신한 후에, CSW를 USB 동글(10) 측에서 수신한다.Therefore, when reading block data from the USB dongle 10 (Block Data Read), the UMS class driver 23 of the host 20 sends the CBW (READ10) to the UMS class driver 13 of the USB dongle 10. After the data block is received on the USB dongle 10 side after transmission, the CSW is received on the USB dongle 10 side.

USB 동글(10)로 블록 데이터를 기록할 때(Block Data Write)에는 호스트(20)의 UMS 클래스 드라이버(23)는 CBW(WRITE10)을 USB 동글(10)의 UMS 클래스 드라이버(13)에 송신하고 나서, Data Block을 USB 동글(10)측에 송신한 후에, CSW를 USB 동글(10) 측에서 수신한다.When writing block data with the USB dongle 10 (Block Data Write), the UMS class driver 23 of the host 20 sends the CBW (WRITE10) to the UMS class driver 13 of the USB dongle 10. Then, after transmitting the data block to the USB dongle 10 side, the CSW is received on the USB dongle 10 side.

여기서, 참고로 READ10와 WRITE10는 USB 스펙에 있는 SCSI Command 중의 하나이고, SCSI Command는 SCSI(Small Computer Systems Interface)병렬 인터페이스를 사용하는 저장 장치를 위한 명령이고, 이 장치의 정보를 알아내고, 장치의 동작을 제어하며, 이 장치로부터 데이터 블록을 읽고 쓸 수 있는 기반을 제공한다.Here, for reference, READ10 and WRITE10 are one of the SCSI commands in the USB specification, and the SCSI command is for a storage device using a parallel computer interface (SCSI). It controls the operation and provides the basis for reading and writing data blocks from the device.

이 SCSI Command에서, READ10은 호스트가 READ 명령을 디바이스에 보내서 디바이스의 저장매체로부터 블록 데이터를 요청하는 명령이고, WRITE10은 호스트가 WRITE 명령을 디바이스에 보내서 디바이스가 블록 데이터를 저장매체에 쓰도록 요청하는 명령이다. In this SCSI command, READ10 is a command for the host to request block data from the device's storage medium by sending a READ command to the device. Command.

결국, 호스트(20)는 앞선 CBW의 CSW를 수신하기 전에는 새로운 CBW를 보낼 수 없다. 그래서 호스트(20)가 두 개의 연속적인 CBW를 CSW 또는 RESET 없이 전송한다면, 두 번째 CBW는 무시한다. 즉, 단일 Command로 양방향 데이터 전송을 지원하지 않는다. As a result, the host 20 cannot send a new CBW until it receives the CSW of the previous CBW. So if the host 20 sends two consecutive CBWs without CSW or RESET, the second CBW is ignored. That is, it does not support bidirectional data transfer with a single command.

이렇게 단방향 전송만을 수행하는 것은, 본 발명에서 호스트(20)와 USB 동글(10)이 도1에서와 같이 외형적으로는 USB 포트(11, 21)를 이용한 USB 통신을 수행하고, USB 통신이 한쪽 방향으로만 전송이 이루어지는 Half Duplex(반 이중 방식) 통신을 하기 때문이다.This unidirectional transmission is only performed in the present invention, the host 20 and the USB dongle 10 in appearance as shown in Figure 1 performs the USB communication using the USB port (11, 21), USB communication is one side This is because half duplex communication is performed in which the transmission is performed in only one direction.

다음으로, 본 발명의 UMS 데이터 송수신을 하기 위한 패킷 포맷(Data Format)에 대해 도4, 5를 통해 살펴 보기로 한다.Next, the packet format (Data Format) for UMS data transmission and reception of the present invention will be described with reference to FIGS. 4 and 5.

도4은 기록시의 패킷 포맷을 나타내는 것이고, 도5는 읽을 때의 패킷 포맷을 나타낸다. 여기서, Magic Number(4 bytes)는 유효한 파일인지 검사하기 위한 값이고, File Status(4 bytes)는 USB 동글(10)의 파일 연산에 대한 값을 설정하며, Command(1byte)는 USB 동글(10)과 호스트(20) 사이의 API의 인터페이스를 정의한다. CLA , INS, P1, P2, Lc, Le, SW1, SW2는 스펙 ISO/IEC 7816-4와 ETSI TS 102.221에 정의된 스펙 용어이므로, 자세한 설명을 생략한다.Fig. 4 shows the packet format at the time of recording, and Fig. 5 shows the packet format at the time of reading. Here, Magic Number (4 bytes) is a value for checking whether a file is valid, File Status (4 bytes) sets a value for file operation of the USB dongle 10, and Command (1 byte) is a USB dongle 10 Defines an interface of the API between the host and the host 20. CLA, INS, P1, P2, Lc, Le, SW1, SW2 are specification terms defined in the specifications ISO / IEC 7816-4 and ETSI TS 102.221, and thus detailed description thereof will be omitted.

USB 동글(10) 내의 스마트카드는 호스트(20)가 송신한 명령을 처리한 후, 그 결과를 Status 바이트인 SW1과 SW2를 이용하여 호스트(20)로 전송하게 된다.The smart card in the USB dongle 10 processes the command sent by the host 20 and transmits the result to the host 20 using SW1 and SW2, which are Status bytes.

이때, 한번에 송수신하는 데이터의 최대 크기는 512Byte이다.
At this time, the maximum size of data transmitted / received at once is 512 bytes.

이제, 도6을 참고로 하여, 호스트(20)가 USB 동글(10)에 내장된 스마트카드의 애플렛(Applets)(16) 또는 호스트(20)내의 어플리케이션(27)에 데이터를 전달하고, 애플렛(16) 또는 어플리케이션(27)이 수신한 데이터를 이용하여 처리를 한 후에 그 결과를 호스트(20)에 전달하는 과정을 설명하기로 한다.
Referring now to FIG. 6, the host 20 delivers data to an applet 16 of the smart card embedded in the USB dongle 10 or an application 27 in the host 20, and the applet ( 16) or a process of processing the data using the data received by the application 27 and transmitting the result to the host 20 will be described.

먼저, 호스트(20)는 WRITE10_CMD를 UMS 클래스 드라이버(13, 23)에 송신하고 나서, 블록 데이터 패킷(CPROS Packet)을 UMS 클래스 드라이버(13, 23)에 송신하면, UMS 클래스 드라이버(13, 23)는 호스트(20)에 CWS를 송신한다.First, the host 20 transmits WRITE10_CMD to the UMS class drivers 13 and 23, and then transmits a block data packet (CPROS Packet) to the UMS class drivers 13 and 23, and then the UMS class drivers 13 and 23. Sends the CWS to the host 20.

이제, UMS 클래스 드라이버(13, 23)는, 수신한 블록 데이터 패킷(CPROS Packet)을 APDU Wrapper(14, 24)에 송신하고, APDU Wrapper(14, 24)는 위에서 설명한 Customizing 및 Tuning을 수행하여 애플렛(16) 또는 어플리케이션(27)에 데이터를 전달하고, 애플렛(16) 또는 어플리케이션(27)은 이 데이터를 수신하여 처리를 수행한 후에 그 결과(Result)를 APDU Wrapper(14, 24)와 UMS 클래스 드라이버(13, 23)에 전달한다.Now, the UMS class driver 13, 23 transmits the received block data packet (CPROS Packet) to the APDU Wrapper 14, 24, and the APDU Wrapper 14, 24 performs the customization and tuning described above to perform the applet. (16) or data is passed to the application 27, the applet 16 or the application 27 receives the data and performs the processing, the result (Result) and the APDU Wrapper (14, 24) and the UMS class Transfer to driver 13, 23.

그러면, 호스트(20)는 READ10_CMD를 송신하고, UMS 클래스 드라이버(13, 23)는 결과(Result)를 호스트(20)에 송신하고 CSW를 송신한다.
Then, the host 20 transmits READ10_CMD, and the UMS class drivers 13 and 23 transmit a result to the host 20 and transmit a CSW.

이상에서는 본 발명의 바람직한 실시예를 설명하였지만, 본 발명은 이러한 실시예에 한정되는 것이 아니라 본 발명의 정신을 벗어나지 않는 범위 내에서 다양한 변형 및 변경이 가능하다는 것을 유의해야 한다.While the preferred embodiments of the present invention have been described above, it should be noted that the present invention is not limited to these embodiments, but various modifications and changes can be made without departing from the spirit of the present invention.

10 : USM 동글
20 : 호스트
11 : USB 포트
12 : USB 디바이스 드라이버
13, 23 : USB 메스 스토리지 클래스 드라이버
14, 24: APDU 랩퍼
16 : 애플렛
10: USM Dongle
20: host
11: USB port
12: USB device driver
13, 23: USB mass storage class driver
14, 24: APDU wrapper
16: applet

Claims (6)

스마트카드가 내장된 유에스비 동글과 호스트 사이의 통신 방법에 있어서,
호스트(20)가 유에스비 동글(10)에서 데이터 블록을 독출 시에,
유에스비 동글(10) 측에 존재하고 메스 스토리지를 제어하는 제1 UMS 클래스 드라이버(13)에, 호스트(20) 측에 존재하고 메스 스토리지를 제어하는 제2 UMS 클래스 드라이버(23)가, 코멘드 블록 관련 정보를 가지고 있는 패킷인 코멘드 블럭 랩퍼(CBW)를 전송하는 단계;
상기 코멘드 블럭 랩퍼(CBW)를 수신한 상기 제1 UMS 클래스 드라이버(13)가, 제2 UMS 클래스 드라이버(23)에 데이터 블록을 전송하는 단계;
데이터 블록을 전송한 상기 제1 UMS 클래스 드라이버(13)가, 앞선 코멘드 블록의 상태를 가지고 있는 패킷인 코멘트 상태 랩퍼(CSW)를 상기 제2 UMS 클래스 드라이버(23)에 전송하는 단계를 포함하고,
호스트(20)가 유에스비 동글(10)에 데이터 블록을 기록 시에,
상기 제2 UMS 클래스 드라이버(23)가 상기 제1 UMS 클래스 드라이버(13)에, 상기 코멘드 블럭 랩퍼(CBW)를 전송하는 단계;
상기 코멘드 블럭 랩퍼(CBW)를 전송한 상기 제2 UMS 클래스 드라이버(23)가, 상기 제1 UMS 클래스 드라이버(23)에 데이터 블록을 전송하는 단계;
데이터 블록을 수신한 상기 제1 UMS 클래스 드라이버(13)가, 코멘드 상태 랩퍼(CSW)를 상기 제2 UMS 클래스 드라이버(23)에 전송하는 단계를 포함하고,
유에스비 동글(10)과 상기 호스트(20) 각각에는 유에스비 메스 스토리지를 통해 APDU 통신을 수행하며, 상기 제1, 2 UMS 디바이스 드라이버(13, 23)와 자바카드 VM 솔루션(15) 또는 호스트 OS(25) 사이에서, 성능 및 동작을 달성하기 위한 커스터마이징 및 튜닝을 수행하는 APDU 랩퍼(14, 24)는, 상기 기록시에는 상기 패킷 포맷에서 매직 넘버 영역과 파일 상태 영역과 코멘트 영역을 잘라낸 나머지 부분에 대해 T=0, T=1 프로토콜을 수행하며, 상기 독출시에는 프로토콜 수행 후 응답 결과(SW1, SW2)에 매직 넘버 영역과 파일 상태 영역과 길이 영역(Length)을 붙여서 송신하는 기능을 수행하는 것을 특징으로 하는, 스마트카드가 내장된 유에스비 동글과 호스트 사이의 통신 방법.
In the communication method between a USB card with a built-in smart card and the host,
When the host 20 reads a data block from the USB dongle 10,
In the first UMS class driver 13 that exists on the USS dongle 10 and controls mass storage, the second UMS class driver 23 that exists on the host 20 side and controls mass storage is associated with the command block. Transmitting a command block wrapper (CBW), which is a packet having information;
Transmitting, by the first UMS class driver (13), the data block to the second UMS class driver (23) after receiving the command block wrapper (CBW);
Transmitting, by the first UMS class driver 13, which has transmitted the data block, to the second UMS class driver 23, a comment state wrapper (CSW), which is a packet having a state of a previous command block.
When the host 20 writes a block of data to the USB dongle 10,
Sending, by the second UMS class driver (23), the command block wrapper (CBW) to the first UMS class driver (13);
Transmitting, by the second UMS class driver (23), the command block wrapper (CBW), to the first UMS class driver (23);
The first UMS class driver 13 receiving the data block, sending a command state wrapper (CSW) to the second UMS class driver 23,
Each of the USB bus dongle 10 and the host 20 performs APDU communication through the USB bus storage, and the first and second UMS device drivers 13 and 23, the Java card VM solution 15, or the host OS 25. APDU wrappers 14 and 24, which perform customization and tuning to achieve performance and operation, for the remaining portions cut out of the magic number area, file status area, and comment area from the packet format at the time of the recording. T = 0 and T = 1 protocols, and when reading the data, a function of transmitting a magic number area, a file status area, and a length area to the response results SW1 and SW2 after performing the protocol is transmitted. A communication method between a USB card with a built-in smart card and the host.
제1항에 있어서,
상기 제1 UMS 클래스 드라이버(13)에 의해 제어되는 상기 유에스비 동글(10) 측의 메스 스토리지는 낸드 플래시 메모리인 것을 특징으로 하는, 스마트카드가 내장된 유에스비 동글과 호스트 사이의 통신 방법.
The method of claim 1,
The mass storage on the side of the USB dongle (10) controlled by the first UMS class driver (13) is a NAND flash memory, the communication method between the USB card embedded host and the USB.
삭제delete 삭제delete 삭제delete 삭제delete
KR1020100004749A 2010-01-19 2010-01-19 Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore KR101177184B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100004749A KR101177184B1 (en) 2010-01-19 2010-01-19 Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100004749A KR101177184B1 (en) 2010-01-19 2010-01-19 Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore

Publications (2)

Publication Number Publication Date
KR20100012889A KR20100012889A (en) 2010-02-08
KR101177184B1 true KR101177184B1 (en) 2012-08-24

Family

ID=42086996

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100004749A KR101177184B1 (en) 2010-01-19 2010-01-19 Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore

Country Status (1)

Country Link
KR (1) KR101177184B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100631620B1 (en) 2005-05-06 2006-10-09 삼성전자주식회사 Apparatus and method for allowing to access to its equipped storage means
KR100781926B1 (en) 2005-02-24 2007-12-04 엔이씨 일렉트로닉스 가부시키가이샤 Computer system and control method of the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100781926B1 (en) 2005-02-24 2007-12-04 엔이씨 일렉트로닉스 가부시키가이샤 Computer system and control method of the same
KR100631620B1 (en) 2005-05-06 2006-10-09 삼성전자주식회사 Apparatus and method for allowing to access to its equipped storage means

Also Published As

Publication number Publication date
KR20100012889A (en) 2010-02-08

Similar Documents

Publication Publication Date Title
US7350717B2 (en) High speed smart card with flash memory
EP1473664B1 (en) Smart card device as mass storage device
EP1643372B1 (en) USB device with secondary USB on-the-go function
JP2008210301A (en) Storage medium, communication system, and control device
KR20080100172A (en) Nested memory system with near field communications capability
US20100181377A1 (en) Card reader with near field communication function and near field communication device thereof
US20060053244A1 (en) Generic universal serial bus device operable at low and full speed and adapted for use in a smart card device
US7328849B2 (en) Smart card providing data mapping for multiple applications and related methods
GB2434661A (en) Portable communication device with smart card functionality
CN101359413B (en) Wireless terminal for processing personalization smart card and method
GB2345781A (en) A smart card having a serial data interface and a second serial or parallel data interface
KR200329847Y1 (en) Usb driving device use smartcard reader
US20050240704A1 (en) Smart card with self-reconfiguration features and related methods
KR101177184B1 (en) Communication Method between USB Dongle having SMART Card and Host, and USB Dongle Apparatus therefore
JP2003022427A (en) Storage device with uploading function
KR20080082000A (en) Methods and devices for data access in combined sim and mass storage cards
US8756425B2 (en) Data security authentication system and related multi-function memory card and computer program product
US8276188B2 (en) Systems and methods for managing storage devices
KR100638383B1 (en) Usb apparatus which is installed a smart card, and using method thereof
CN101754448B (en) Dual-core intelligent card for mobile communication and data transmission and processing method thereof
KR100738032B1 (en) Smart card of supporting large size memory and method thereof
KR100762205B1 (en) Smart card having flash memory, and usb device having thereof, and portable terminal using thereof
EP2159711A1 (en) A method for managing data between a terminal and a token, corresponding token and system
KR20120029521A (en) Secure memory card
EP2211264A1 (en) Versatile electronic storage device

Legal Events

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

Payment date: 20150723

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20180821

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20190719

Year of fee payment: 8