KR20030035171A - Smart card and method for writing/erasing and operating an os program the same - Google Patents

Smart card and method for writing/erasing and operating an os program the same Download PDF

Info

Publication number
KR20030035171A
KR20030035171A KR1020010067125A KR20010067125A KR20030035171A KR 20030035171 A KR20030035171 A KR 20030035171A KR 1020010067125 A KR1020010067125 A KR 1020010067125A KR 20010067125 A KR20010067125 A KR 20010067125A KR 20030035171 A KR20030035171 A KR 20030035171A
Authority
KR
South Korea
Prior art keywords
card
program
rom
memory
flash memory
Prior art date
Application number
KR1020010067125A
Other languages
Korean (ko)
Other versions
KR100399603B1 (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 KR10-2001-0067125A priority Critical patent/KR100399603B1/en
Publication of KR20030035171A publication Critical patent/KR20030035171A/en
Application granted granted Critical
Publication of KR100399603B1 publication Critical patent/KR100399603B1/en

Links

Classifications

    • 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
    • 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/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system

Abstract

PURPOSE: A smart card, and its OS(Operating System) management method are provided to make it possible to store the OS program at a flash memory of a smart card via a card reader, and executing the OS program. CONSTITUTION: The method comprises several steps. A CPU of a smart card, if powered on, checks whether a ROM/flash selection signal of the smart card is detected(S10). In a case that the ROM selection signal is detected, a memory controller changes a structure of a semiconductor memory(S12). Then, the CPU checks whether a signal input via a card reader is a flash memory deletion or programming signal(S14). In a case of a flash memory deletion signal, the CPU activates a control program stored at a ROM, and deletes the flash memory according to the control program(S16). On the contrary, in a case of a flash memory programming signal, the CPU loads the OS program codes, transmitted via the card reader, at corresponding addresses of the flash memory according to the control program(S18). In a case that the flash selection signal is detected in the step S10, the memory controller changes a structure of a semiconductor memory for excluding the ROM from an actual executing structure(S20).

Description

스마트 카드와 이의 OS 프로그램 저장/삭제 및 실행방법{SMART CARD AND METHOD FOR WRITING/ERASING AND OPERATING AN OS PROGRAM THE SAME}SMART CARD AND METHOD FOR WRITING / ERASING AND OPERATING AN OS PROGRAM THE SAME}

본 발명은 스마트 카드에 관한 것으로서, 특히 스마트 카드의 반도체 메모리 칩이 제작된 후에도 카드 리더기를 통해 OS(Operating System) 프로그램을 스마트 카드 내부에 있는 플래시 메모리에 저장시킬 수 있는 스마트 카드와 이의 OS 프로그램 저장/삭제 및 실행방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a smart card, and in particular, even after a semiconductor memory chip of a smart card is manufactured, a smart card and an OS program storage capable of storing an operating system (OS) program in a flash memory inside the smart card through a card reader. / Deletes and executes them.

일반적으로 스마트 카드는 집적 회로(IC) 카드라고 하며, 반도체 메모리와 중앙 처리부(CPU)를 탑재한 반도체 칩이 내장되어 있다. 스마트 카드는 자기(magnetic)형 카드에 비해 기억 용량이 크고 중앙 처리부가 내장되어 있어 판단, 연산, 데이터 보호 등 고도의 기능을 수행할 수 있다. 또한, 최근의 스마트 카드는 I/O 프로토콜과 OS 및 응용 프로그램 등을 내장하여 카드 리더기와 정보를 양방향으로 전달을 할 수 있다. 따라서, 스마트 카드는 암호 처리, 접속 대상의 인증, 기억 데이터의 관리 등 보안 기능이 뛰어나 안정성이 높고 위조가 불가능한 특징이 있어서 은행 카드, 신분 증명 카드, 유료 방송 수신 카드 등으로 사용되고 있다.Generally, a smart card is called an integrated circuit (IC) card, and a semiconductor chip including a semiconductor memory and a central processing unit (CPU) is embedded therein. Smart cards have a larger memory capacity and a central processing unit than magnetic cards, and can perform advanced functions such as judgment, calculation, and data protection. In addition, the latest smart card has a built-in I / O protocol, OS, and application programs to be able to transfer information to the card reader and bidirectional. Therefore, smart cards have excellent security functions such as encryption processing, authentication of connection targets, management of stored data, high stability, and cannot be forged, and thus are used as bank cards, identity cards, pay-broadcast reception cards, and the like.

도 1은 종래 기술에 의한 스마트 카드의 구성도이다. 도 1을 참조하면, 종래 스마트 카드(1)는 반도체 메모리부(10)와, 중앙 처리부(20)와, 버스(30)와, 입출력 인터페이스(40)로 이루어진다. 미설명된 도면 부호 2는 카드 리더기이며 4는 호스트 컴퓨터이다.1 is a block diagram of a smart card according to the prior art. Referring to FIG. 1, the conventional smart card 1 includes a semiconductor memory unit 10, a central processing unit 20, a bus 30, and an input / output interface 40. Unexplained reference numeral 2 is a card reader and 4 is a host computer.

반도체 메모리(10)는 보편적으로 OS 프로그램이 저장된 ROM(12)과, 영구 데이터가 저장된 EEPROM(16)과, OS의 실행시 임시 데이터를 저장하는 RAM(18)으로 구성된다. 이때, 반도체 메모리(10)는 플래시 메모리(14)를 더 포함하는데, 여기에는 스마트 카드(1)의 저장 및 삭제 가능한 데이터와 응용 프로그램 및 ROM의 제어 프로그램이 저장되어 있다.The semiconductor memory 10 is generally composed of a ROM 12 in which an OS program is stored, an EEPROM 16 in which permanent data is stored, and a RAM 18 in which temporary data is stored when the OS is executed. In this case, the semiconductor memory 10 further includes a flash memory 14, which stores data that can be stored and deleted in the smart card 1, and a control program of an application program and a ROM.

이러한 종래 기술에 의한 스마트 카드(1)는 반도체 메모리(10)의 칩 제작시 ROM(12)에 저장된 OS 프로그램에 의해 구동해서 카드 리더기(2)와 데이터를 통신한다. 현재 스마트 카드(1)의 추세는 다양한 기능을 구현하기 위해 예컨대 8비트(bit) 연산 기능을 갖는 중앙 처리부(20)에서 32 비트 연산이 가능한 중앙 처리부(20)로 확장되고 이에 따라 카드 OS 프로그램의 크기가 커지고 제어가 복잡해지고 있다.The smart card 1 according to the related art is driven by an OS program stored in the ROM 12 when the chip of the semiconductor memory 10 is manufactured to communicate data with the card reader 2. The trend of the current smart card 1 has been extended from the central processing unit 20 having an 8-bit computing function to the central processing unit 20 capable of 32-bit operation in order to implement various functions. It is growing in size and complicated in control.

그런데, 종래 스마트 카드(1)는 한번 카드의 OS 프로그램을 ROM(12)에 저장시킨 후에는 교체 및 변경이 불가능하였다. 즉, 카드내 OS 프로그램에 오류가 존재하거나 OS 프로그램을 업그레이드할 경우 기존의 스마트 카드는 사용할 수 없고 새로운 카드로 교체해야하는 문제점이 있었다.However, in the conventional smart card 1, once the OS program of the card is stored in the ROM 12, it is impossible to replace or change it. That is, when an error exists in the OS program in the card or when the OS program is upgraded, the existing smart card cannot be used, and there is a problem that a new card must be replaced.

본 발명의 목적은 이와 같은 종래 기술의 문제점을 해결하기 위하여 ROM에는 I/O 통신과 플래시 제어하는 제어 프로그램을 저장하고 플래시 메모리에는 카드의 OS 프로그램을 삭제 또는 저장하고 ROM 및 플래시 메모리를 선택 및 제어하는 메모리 제어부를 구비함으로써 스마트 카드의 OS 프로그램의 수정 및 추가가 용이한 스마트 카드를 제공하는데 있다.An object of the present invention is to store a control program for I / O communication and flash control in the ROM in order to solve the problems of the prior art, and to delete or store the OS program of the card in the flash memory and to select and control the ROM and flash memory It is to provide a smart card that is easy to modify and add the OS program of the smart card by having a memory control unit.

본 발명의 다른 목적은 ROM 선택 신호에 따라 ROM의 제어 프로그램이 구동되어 카드 리더기를 통해 카드의 OS 코드를 입력받아 플래시 메모리에 저장하거나 삭제하고, 플래시 선택 신호에 따라 플래시 메모리에 저장된 카드의 OS 프로그램이 실행됨으로써 언제든지 스마트 카드의 OS 프로그램 수정 및 삭제가 용이한 스마트 카드의 OS 프로그램 저장/삭제 및 실행방법을 제공하는데 있다.Another object of the present invention is to drive the control program of the ROM according to the ROM selection signal received the OS code of the card through the card reader to store or delete in the flash memory, the OS program of the card stored in the flash memory in accordance with the flash selection signal This is to provide an OS program storage / deletion and execution method of the smart card easy to modify and delete the OS program of the smart card at any time.

상기 목적을 달성하기 위하여 본 발명은 적어도 하나 이상의 메모리를 갖는 반도체 메모리부와 중앙 처리부를 탑재한 칩이 내장된 카드에 있어서, 반도체 메모리부는 ROM, 플래시 메모리, RAM으로 구성되고, ROM에는 플래시 메모리의 제어 및 입출력용 제어 코드를 갖는 제어 프로그램이 저장되며 플래시 메모리에는 카드의 OS 프로그램이 저장 및 삭제가능하며 RAM에는 카드의 구동시 임시 데이터가 저장되고, 카드의 메모리 선택 신호에 응답하여 플래시 메모리에 저장된 카드의 OS 프로그램을 선택하고, 선택에 따라 반도체 메모리부의 구조를 설정된 형태로 변경 및 활성화하는 메모리 제어부와, 카드에 접촉된 카드 리더기와의 내부 소자들의 입출력 신호를 전송하는 입출력 인터페이스와, 카드의 메모리 선택 신호와 카드 리더기로부터 입력된 신호에 응답하여 ROM의 제어 프로그램에 따라 메모리 제어부를 통해 플래시 메모리를 삭제하거나 카드 리더기로부터 전달된 OS 코드를 플래시 메모리의 해당 주소에 로딩시켜 OS 프로그램을 저장시키고, 저장된 플래시 메모리의 OS 프로그램 실행에 따라 카드 구동을 제어하는 중앙 처리부를 구비한다.In order to achieve the above object, the present invention provides a card having a semiconductor memory unit having at least one memory and a chip equipped with a central processing unit, wherein the semiconductor memory unit includes a ROM, a flash memory, and a RAM. A control program having control codes for control and input / output is stored, the OS program of the card can be stored and deleted in the flash memory, and temporary data is stored in the RAM when the card is driven and stored in the flash memory in response to the memory selection signal of the card. A memory controller which selects an OS program of the card and changes and activates the structure of the semiconductor memory unit in a set form according to the selection, an input / output interface for transmitting input / output signals of internal elements of the card reader in contact with the card, and a memory of the card In response to the selection signal and the signal input from the card reader Then, the flash memory is deleted through the memory control unit according to the ROM control program or the OS code transferred from the card reader is loaded to the corresponding address of the flash memory to store the OS program. It has a central processing unit for controlling.

상기 다른 목적을 달성하기 위하여 본 발명은 적어도 하나 이상의 반도체 메모리부와 중앙 처리부를 탑재한 칩이 내장된 카드내에 OS 프로그램을 저장/삭제 및실행하는 방법에 있어서, 카드의 메모리 선택 신호가 검출되는지를 판단하는 단계와, 카드의 메모리 선택 신호가 반도체 메모리부의 ROM 선택 신호일 경우 카드 리더기로부터 입력된 신호가 플래시 메모리의 삭제 또는 프로그래밍 신호인지를 판단하는 단계와, 카드 리더기로부터 입력된 신호가 삭제 신호일 경우 반도체 메모리부의 ROM내 제어 프로그램에 따라 플래시 메모리를 삭제하는 단계와, 카드 리더기로부터 입력된 신호가 프로그래밍 신호일 경우 반도체 메모리부의 ROM내 제어 프로그램에 따라 플래시 메모리에 카드 리더기로부터 전달된 OS 코드를 플래시 메모리의 해당 주소에 로딩시켜 OS 프로그램을 저장하는 단계를 포함한다.In order to achieve the above object, the present invention relates to a method of storing / deleting and executing an OS program in a card having a chip including at least one semiconductor memory unit and a central processing unit. Determining whether the signal selected from the card reader is the erase or programming signal of the flash memory when the memory selection signal of the card is the ROM selection signal of the semiconductor memory; and if the signal input from the card reader is the erase signal, Deleting the flash memory according to the ROM control program of the memory unit; and if the signal input from the card reader is a programming signal, the OS code transferred from the card reader to the flash memory according to the ROM program of the semiconductor memory unit corresponds to the flash memory. Load it into the address Storing the OS program.

도 1은 종래 기술에 의한 스마트 카드의 구성도,1 is a configuration diagram of a smart card according to the prior art,

도 2는 본 발명에 따른 스마트 카드의 구성도,2 is a block diagram of a smart card according to the present invention;

도 3a 및 도 3b는 본 발명의 스마트 카드에서 메모리 선택에 따라 변경된 메모리 구조의 예들을 나타낸 도면들,3A and 3B are diagrams showing examples of a memory structure changed according to memory selection in a smart card of the present invention;

도 4는 본 발명에 따른 스마트 카드에서 OS 프로그램 저장/삭제 및 실행방법을 나타낸 흐름도.4 is a flowchart illustrating a method for storing / deleting and executing an OS program in a smart card according to the present invention.

<도면의 주요부분에 대한 부호의 설명><Description of the code | symbol about the principal part of drawing>

100 : 스마트 카드 102 : 카드 리더기100: smart card 102: card reader

104 : 호스트 컴퓨터 106 : ROM/플래시 선택 신호104: host computer 106: ROM / flash select signal

110 : 반도체 메모리부 112 : ROM110: semiconductor memory section 112: ROM

114 : 플래시 메모리 116 : EEPROM114: flash memory 116: EEPROM

118 : RAM 120 : 메모리 제어부118: RAM 120: memory control

130 : 중앙 처리부 140 : 버스130: central processing unit 140: bus

150 : 입출력 인터페이스 160 : 입력 단자150: input and output interface 160: input terminal

이하 첨부된 도면을 참조하여 본 발명의 바람직한 실시예에 대해 설명하고자 한다.Hereinafter, exemplary embodiments of the present invention will be described with reference to the accompanying drawings.

도 2는 본 발명에 따른 스마트 카드의 구성도로서, 이를 참조하면 본 발명의 스마트 카드(100)는 반도체 메모리부(110)와, 메모리 제어부(120)와, 중앙 처리부(130)와, 버스(140)와, 입출력 인터페이스(150)와, 입력 단자(160)로 구성된다. 미 설명된 도면 부호 102는 카드 리더기이며 104는 호스트 컴퓨터이다.2 is a configuration diagram of a smart card according to the present invention, referring to the smart card 100 of the present invention is a semiconductor memory unit 110, a memory control unit 120, a central processing unit 130, a bus ( 140, an input / output interface 150, and an input terminal 160. Unexplained reference numeral 102 is a card reader and 104 is a host computer.

본 발명의 반도체 메모리부(110)는 ROM(112), 플래시 메모리(114), RAM(118)으로 구성된다. 여기서, ROM(112)은 반도체 메모리부(110)의 칩 제작시 미리 플래시 메모리(114)의 제어 및 입출력(I/O)용 제어 코드를 갖는 제어 프로그램이 저장된다. 플래시 메모리(114)에는 카드의 OS 프로그램이 저장 및 삭제가능하다. RAM(118)은 카드의 구동시 임시 데이터가 저장된다. 한편, 반도체 메모리부(110)는 카드의 구동마다 사용되는 영구 데이터가 저장된 또 다른 ROM을 포함할 수 있는데, 본 실시예에서는 EEPROM(116)을 사용한다.The semiconductor memory unit 110 of the present invention includes a ROM 112, a flash memory 114, and a RAM 118. Here, the ROM 112 stores a control program having the control of the flash memory 114 and the control code for input / output (I / O) before the chip of the semiconductor memory unit 110 is manufactured. The flash memory 114 stores and deletes an OS program of a card. The RAM 118 stores temporary data when the card is driven. Meanwhile, the semiconductor memory unit 110 may include another ROM in which permanent data used for each drive of the card is stored. In this embodiment, the EEPROM 116 is used.

본 발명의 메모리 제어부(120)는 카드의 ROM/ 플래시 선택 신호(106)에 응답하여 플래시 메모리(114)에 저장된 카드의 OS 프로그램을 선택한다. 그리고, 선택에 따라 반도체 메모리부(110)의 구조를 설정된 형태로 변경하고 활성화한다.The memory controller 120 of the present invention selects the OS program of the card stored in the flash memory 114 in response to the ROM / flash selection signal 106 of the card. In addition, according to the selection, the structure of the semiconductor memory unit 110 is changed into a set form and activated.

본 발명의 중앙 처리부(130)는 카드의 ROM/ 플래시 선택 신호(106)와 카드 리더기(102)로부터 입력된 신호에 응답하여 ROM(112)의 제어 프로그램을 구동해서 메모리 제어부(120)를 통해 플래시 메모리(114)를 삭제한다. 또는 카드 리더기(102)로부터 전달된 OS 코드를 플래시 메모리(114)의 해당 주소에 로딩시킴으로써 OS 프로그램을 저장한다. 그리고, 플래시 메모리(114)에 저장된 OS 프로그램의 실행에 따라 카드의 구동을 제어한다.The central processing unit 130 of the present invention drives the control program of the ROM 112 in response to the signal input from the card ROM / flash selection signal 106 and the card reader 102 of the card to flash through the memory controller 120. The memory 114 is deleted. Or by loading the OS code transmitted from the card reader 102 to the corresponding address of the flash memory 114 to store the OS program. Then, the driving of the card is controlled according to the execution of the OS program stored in the flash memory 114.

본 발명의 입출력 인터페이스(150)는 접촉카드의 표준인 ISO 7816에 명시된 데이터 포맷으로 입출력(I/O) 신호를 전송하는 모듈로서, 카드(100)에 접촉된 카드 리더기(102)와 내부 소자들 사이의 입출력 신호를 전송한다.The input / output interface 150 of the present invention is a module for transmitting an input / output (I / O) signal in a data format specified in ISO 7816, a contact card standard, and the card reader 102 and internal elements in contact with the card 100. Transmit input and output signals between.

그리고 본 발명의 입력 단자(160)는 ROM(112)의 제어 프로그램과 플래시 메모리(114)의 OS 프로그램 중에서 어느 하나를 선택하기 위한 카드의 ROM/ 플래시 선택 신호(106)를 입력받아 메모리 제어부(120)에 전달한다.In addition, the input terminal 160 of the present invention receives the ROM / flash selection signal 106 of the card for selecting any one of the control program of the ROM 112 and the OS program of the flash memory 114, and then the memory controller 120. To pass).

상기와 같이 구성된 본 발명의 스마트 카드(1)는 전원이 인가된 상태에서 입력 단자(160)를 통해 ROM 선택 신호(106)가 입력되면, 메모리 제어부(120)가 반도체 메모리부(110)의 ROM(112)을 활성화시켜 ROM(112)에 저장된 제어 프로그램을 실행시킨다. ROM(112)의 제어 프로그램내 플래시 메모리 제어 및 입출력(I/O) 제어 코드에 따라 입출력 인터페이스(150)는 카드 리더기(102)로부터 접촉카드의 표준인 ISO 7816에 명시된 데이터 포맷으로 카드의 OS 프로그램이 입력된다. 이에 메모리 제어부(120)는 플래시 메모리(114)에 카드의 OS 프로그램을 저장한다. OS 프로그램의 저장이 완료된 후에, 입력 단자(106)를 통해 플래시 선택 신호(106)가 입력되면, 메모리 제어부(120)는 반도체 메모리부(110)의 구성 요소에서 ROM(112)을 제외시키고 플래시 메모리(114)를 활성화시켜 앞서 저장된 카드의 OS 프로그램이 실행된다.In the smart card 1 of the present invention configured as described above, when the ROM selection signal 106 is input through the input terminal 160 in a state where power is applied, the memory controller 120 is a ROM of the semiconductor memory unit 110. (112) is activated to execute the control program stored in the ROM (112). According to the flash memory control and input / output (I / O) control codes in the control program of the ROM 112, the input / output interface 150 receives the OS program of the card from the card reader 102 in the data format specified in ISO 7816, the standard for contact cards. Is input. The memory controller 120 stores the OS program of the card in the flash memory 114. After the storage of the OS program is completed, when the flash selection signal 106 is input through the input terminal 106, the memory controller 120 excludes the ROM 112 from the components of the semiconductor memory unit 110 and flash memory. By activating 114, the OS program of the previously stored card is executed.

한편, 본 발명의 스마트 카드(1)는 전원이 인가된 상태에서 입력 단자(160)를 통해 ROM 선택 신호(106)가 입력되면, 카드 리더기(102)로부터 입력된 명령에 따라 메모리 제어부(120)에서 ROM(112)의 제어 프로그램이 활성화되어 플래시 메모리(114)에 저장된 카드의 OS 프로그램을 삭제할 수도 있다.Meanwhile, when the ROM selection signal 106 is input through the input terminal 160 while the smart card 1 of the present invention is powered on, the memory controller 120 according to a command input from the card reader 102 is performed. The control program of the ROM 112 may be activated to delete the OS program of the card stored in the flash memory 114.

도 3a 및 도 3b는 본 발명의 스마트 카드에서 메모리 선택에 따라 변경된 메모리 구조의 예들을 나타낸 도면들이다.3A and 3B are diagrams showing examples of a memory structure changed according to memory selection in the smart card of the present invention.

도 3a를 참조하면, 입력 단자(160)를 통해 카드의 ROM 선택 신호(106)가 입력될 경우 메모리 제어부(120)는 반도체 메모리부(110)의 구조를 ROM(112), 플래시 메모리(114), EEPROM(116) 및 RAM(118)을 포함하도록 변경한다. 도 3b를 참조하면, 입력 단자(160)를 통해 카드의 플래시 선택 신호(106)가 입력될 경우 메모리 제어부(120)는 반도체 메모리부(110)의 구조를 플래시 메모리(114), EEPROM(116), RAM(118)을 포함하도록 변경한다. 상기 도면에서 미설명된 도면 부호 113 및 117은 메모리의 빈 영역을 나타낸 것이다.Referring to FIG. 3A, when the ROM selection signal 106 of the card is input through the input terminal 160, the memory controller 120 changes the structure of the semiconductor memory 110 into the ROM 112 and the flash memory 114. To include the EEPROM 116 and the RAM 118. Referring to FIG. 3B, when the flash selection signal 106 of the card is input through the input terminal 160, the memory controller 120 changes the structure of the semiconductor memory unit 110 into the flash memory 114 and the EEPROM 116. To include the RAM 118. Reference numerals 113 and 117 which are not described in this figure represent empty areas of the memory.

다음은 도 4를 참조하여 상기와 같이 구성된 본 발명의 스마트 카드 작동(OS 프로그램의 저장/삭제 및 실행) 과정을 구체적으로 설명한다. 도 4는 본 발명에 따른 스마트 카드에서 OS 프로그램 저장/삭제 및 실행방법을 나타낸 흐름도이다.Next, the smart card operation (storing / deleting and executing the OS program) of the present invention configured as described above will be described in detail with reference to FIG. 4. 4 is a flowchart illustrating a method of storing / deleting and executing an OS program in a smart card according to the present invention.

먼저, 본 발명의 스마트 카드(100)내 중앙 처리부(130)는 전원이 인가된 후에 입력 단자(160)를 통해 카드의 ROM/ 플래시 선택 신호(106)가 검출되는지를 판단한다.(S10)First, the central processing unit 130 in the smart card 100 of the present invention determines whether the ROM / flash selection signal 106 of the card is detected through the input terminal 160 after the power is applied (S10).

S10의 판단 결과, ROM 선택 신호가 검출될 경우 메모리 제어부(120)는 반도체 메모리(110)의 구조를 도 3a와 같이 변경한다.(S12)As a result of the determination in S10, when the ROM selection signal is detected, the memory controller 120 changes the structure of the semiconductor memory 110 as shown in FIG. 3A.

이에 중앙 처리부(130)는 입출력 인터페이스(150)를 통해 카드 리더기(102)로부터 입력된 신호가 플래시 메모리의 삭제 또는 프로그래밍 신호인지를 판단한다.(S14)The central processing unit 130 determines whether the signal input from the card reader 102 through the input / output interface 150 is the erase or programming signal of the flash memory (S14).

S14의 판단 결과, 만약 카드 리더기(102)로부터 입력된 신호가 삭제 신호일 경우 중앙 처리부(130)는 메모리 제어부(120)를 제어해서 ROM(112)에 저장된 제어 프로그램을 활성화시키고 제어 프로그램내 코드에 따라 플래시 메모리(114)를 삭제시킨다.(S16) 반면에, 카드 리더기(102)로부터 입력된 신호가 프로그래밍 신호일 경우 중앙 처리부(130)는 ROM(112)에 저장된 제어 프로그램내 코드에 따라 카드 리더기(102)로부터 전달된 OS 코드를 플래시 메모리(114)의 해당 주소에 로딩시켜 카드의 OS 프로그램을 저장시킨다.(S18)As a result of the determination in S14, if the signal input from the card reader 102 is the erase signal, the central processing unit 130 controls the memory control unit 120 to activate the control program stored in the ROM 112 and according to the code in the control program. The flash memory 114 is deleted. (S16) On the other hand, if the signal input from the card reader 102 is a programming signal, the central processing unit 130 according to the code in the control program stored in the ROM 112, the card reader 102. The OS code transferred from) is loaded into the corresponding address of the flash memory 114 to store the OS program of the card.

예를 들어, 카드 리더기(102)로부터 명령어 및 OS 코드가 입력되면,ROM(112)에 있는 제어 프로그램에 의해 명령어를 해석해서 도 3a와 같이 0x10000번지에 위치한 플래시 메모리(114)를 삭제하거나 OS 코드를 플래시 메모리(114)의 원하는 주소에 로딩하게 된다. 이때, 플래시 메모리(114)의 삭제 명령은 전체 삭제와 섹터 삭제로 구분할 수 있다.For example, when the command and the OS code are input from the card reader 102, the command is interpreted by the control program in the ROM 112 to delete the flash memory 114 located at 0x10000 as shown in FIG. 3A or the OS code. To the desired address of the flash memory 114. In this case, the erase command of the flash memory 114 may be divided into an entire erase and a sector erase.

한편, S10의 판단 결과, 메모리 제어부(120)에서 플래시 선택 신호가 검출될 경우 반도체 메모리부(110)의 구조에서 ROM(112)을 제외(도 3b 참조)하도록 변경한다.(S20)On the other hand, when the flash selection signal is detected by the memory control unit 120 as a result of the determination in S10, the structure of the semiconductor memory unit 110 is changed to exclude the ROM 112 (see FIG. 3B).

도 3b와 같이 반도체 메모리부(110)의 구조를 변경한 후에, 중앙 처리부(130)는 플래시 메모리(114)에 저장된 OS 프로그램에 따라 카드의 구동을 제어한다.After changing the structure of the semiconductor memory unit 110 as shown in FIG. 3B, the central processing unit 130 controls the driving of the card according to the OS program stored in the flash memory 114.

이상 설명한 바와 같이, 본 발명은 종래 스마트 카드에서 OS 프로그램을 ROM에 저장하였기 때문에 한번 OS 프로그램을 저장시키면 변경이 불가능한 단점을 극복하고 OS 개발자가 언제든지 스마트 카드의 OS 프로그램을 플래시 메모리에 자유롭게 변경할 수 있다.As described above, in the present invention, since the OS program is stored in a ROM in a conventional smart card, once the OS program is stored, the OS can overcome the disadvantage of being impossible to change and the OS developer can freely change the OS program of the smart card into the flash memory at any time. .

즉, 본 발명의 스마트 카드는 카드의 OS 프로그램을 메모리 칩 제작이후에 카드 리더기를 통해 플래시 메모리에 로딩시킬 수 있으므로 OS 개발자는 카드의 반도체 메모리 칩의 제작과 동시에 카드의 OS를 ROM에 마스킹할 필요가 없으며 카드에서 OS를 요구할 때 언제든지 카드의 OS 입력이 가능하다. 그러므로, 플래시 메모리에 OS 저장이 완료된 후에 스마트 카드의 메모리 선택 신호를 변경하면 스마트카드의 메모리 구조가 변경되어 ROM에 저장된 프로그램은 무시되고 플래시 메모리에 저장된 OS 프로그램이 실행되어 원하는 스마트 카드의 기능을 구현할 수가 있다.That is, the smart card of the present invention can load the OS program of the card into the flash memory through the card reader after fabrication of the memory chip, so that the OS developer needs to mask the OS of the card to the ROM simultaneously with the fabrication of the semiconductor memory chip of the card. The card's OS can be entered at any time when the card requires an OS. Therefore, if the memory selection signal of the smart card is changed after the OS storage is completed in the flash memory, the memory structure of the smart card is changed, the program stored in the ROM is ignored, and the OS program stored in the flash memory is executed to implement the desired smart card function. There is a number.

따라서, 본 발명은 스마트 카드의 기능이 향상됨에 따라 카드의 OS 프로그램이 대용량화 및 복잡해지더라도 스마트 카드의 OS 프로그램 입력과 오류의 수정 및 OS 변경이 용이하여 스마트 카드의 OS 개발 효율성이 높아진다.Therefore, according to the present invention, as the function of the smart card is improved, even if the OS program of the card becomes large and complicated, OS program input and error correction and OS change of the smart card are easy, and thus OS development efficiency of the smart card is increased.

한편, 본 발명은 상술한 실시예에 국한되는 것이 아니라 후술되는 청구범위에 기재된 본 발명의 기술적 사상과 범주내에서 당업자에 의해 여러 가지 변형이 가능하다.On the other hand, the present invention is not limited to the above-described embodiment, various modifications are possible by those skilled in the art within the spirit and scope of the present invention described in the claims to be described later.

Claims (7)

적어도 하나 이상의 메모리를 갖는 반도체 메모리부와 중앙 처리부를 탑재한 칩이 내장된 카드에 있어서,A card in which a chip equipped with a semiconductor memory unit having at least one memory and a central processing unit is embedded, 상기 반도체 메모리부는 ROM, 플래시 메모리, RAM으로 구성되고, 상기 ROM에는 상기 플래시 메모리의 제어 및 입출력용 제어 코드를 갖는 제어 프로그램이 저장되며 상기 플래시 메모리에는 상기 카드의 OS 프로그램이 저장 및 삭제가능하며 상기 RAM에는 상기 카드의 구동시 임시 데이터가 저장되고,The semiconductor memory unit includes a ROM, a flash memory, and a RAM. The ROM stores a control program having control and input / output codes of the flash memory, and the OS program of the card can be stored and deleted in the flash memory. RAM stores temporary data when the card is driven, 상기 카드의 메모리 선택 신호에 응답하여 상기 플래시 메모리에 저장된 상기 카드의 OS 프로그램을 선택하고, 상기 선택에 따라 상기 반도체 메모리부의 구조를 설정된 형태로 변경 및 활성화하는 메모리 제어부;A memory controller configured to select an OS program of the card stored in the flash memory in response to a memory selection signal of the card, and change and activate a structure of the semiconductor memory unit in a set form according to the selection; 상기 카드에 접촉된 카드 리더기와의 내부 소자들의 입출력 신호를 전송하는 입출력 인터페이스; 및An input / output interface for transmitting input / output signals of internal elements with a card reader in contact with the card; And 상기 카드의 메모리 선택 신호와 상기 카드 리더기로부터 입력된 신호에 응답하여 상기 ROM의 제어 프로그램에 따라 상기 메모리 제어부를 통해 상기 플래시 메모리를 삭제하거나 상기 카드 리더기로부터 전달된 OS 코드를 상기 플래시 메모리의 해당 주소에 로딩시켜 OS 프로그램을 저장시키고, 상기 저장된 플래시 메모리의 OS 프로그램 실행에 따라 카드 구동을 제어하는 중앙 처리부를 구비한 것을 특징으로 하는 스마트 카드.In response to a memory selection signal of the card and a signal input from the card reader, the flash memory is deleted through the memory controller or the OS code transmitted from the card reader is stored according to the control program of the ROM. And a central processor configured to store an OS program and control card driving according to execution of the OS program of the stored flash memory. 제 1항에 있어서, 상기 반도체 메모리부의 ROM의 제어 프로그램과 플래시 메모리의 OS 프로그램 중에서 어느 하나를 선택하기 위한 상기 카드의 메모리 선택 신호가 입력되는 입력 단자를 더 포함하는 것을 특징으로 하는 스마트 카드.The smart card according to claim 1, further comprising an input terminal to which a memory selection signal of the card for selecting one of a control program of a ROM of the semiconductor memory unit and an OS program of a flash memory is input. 제 1항에 있어서, 상기 반도체 메모리부는 데이터를 영구 저장하는 다른 ROM을 더 포함하는 것을 특징으로 하는 스마트 카드.The smart card of claim 1, wherein the semiconductor memory unit further comprises another ROM which permanently stores data. 제 1항 또는 제 3항에 있어서, 상기 카드의 메모리 선택 신호가 상기 반도체 메모리부의 ROM 선택 신호일 경우 상기 메모리 제어부는 상기 반도체 메모리부를 ROM, 플래시 메모리, RAM, 다른 ROM을 포함하는 구조로 변경시키는 것을 특징으로 하는 스마트 카드.The method of claim 1 or 3, wherein when the memory selection signal of the card is a ROM selection signal of the semiconductor memory unit, the memory controller changes the semiconductor memory unit to a structure including a ROM, a flash memory, a RAM, and another ROM. Featured smart card. 제 1항 또는 제 3항에 있어서, 상기 카드의 메모리 선택 신호가 상기 반도체 메모리부의 플래시 선택 신호일 경우 상기 메모리 제어부는 상기 반도체 메모리부를 플래시 메모리, RAM, 다른 ROM을 포함하는 구조로 변경시키는 것을 특징으로 하는 스마트 카드.The method of claim 1 or 3, wherein when the memory selection signal of the card is a flash selection signal of the semiconductor memory unit, the memory controller changes the semiconductor memory unit to a structure including a flash memory, a RAM, and another ROM. Smart card. 적어도 하나 이상의 반도체 메모리부와 중앙 처리부를 탑재한 칩이 내장된 카드내에 OS 프로그램을 저장/삭제 및 실행하는 방법에 있어서,A method of storing / deleting and executing an OS program in a card in which at least one semiconductor memory unit and a chip including a central processing unit are embedded, 상기 카드의 메모리 선택 신호가 검출되는지를 판단하는 단계;Determining whether a memory selection signal of the card is detected; 상기 카드의 메모리 선택 신호가 상기 반도체 메모리부의 ROM 선택 신호일 경우 상기 카드 리더기로부터 입력된 신호가 상기 플래시 메모리의 삭제 또는 프로그래밍 신호인지를 판단하는 단계;Determining whether a signal input from the card reader is an erase or programming signal of the flash memory when the memory selection signal of the card is a ROM selection signal of the semiconductor memory unit; 상기 카드 리더기로부터 입력된 신호가 삭제 신호일 경우 상기 반도체 메모리부의 ROM내 제어 프로그램에 따라 상기 플래시 메모리를 삭제하는 단계; 및Deleting the flash memory according to a control program in a ROM of the semiconductor memory unit when the signal input from the card reader is a delete signal; And 상기 카드 리더기로부터 입력된 신호가 프로그래밍 신호일 경우 상기 반도체 메모리부의 ROM내 제어 프로그램에 따라 상기 플래시 메모리에 상기 카드 리더기로부터 전달된 OS 코드를 상기 플래시 메모리의 해당 주소에 로딩시켜 OS 프로그램을 저장하는 단계를 포함하여 이루어진 것을 특징으로 하는 스마트 카드의 OS 프로그램 저장/삭제 및 실행방법.If the signal input from the card reader is a programming signal, storing the OS program by loading the OS code transferred from the card reader to a corresponding address of the flash memory according to a control program in a ROM of the semiconductor memory unit; OS program storage / deletion and execution method of the smart card, characterized in that made. 제 6항에 있어서, 상기 카드의 메모리 선택 신호가 상기 반도체 메모리부의 플래시 선택 신호일 경우,The method of claim 6, wherein when the memory selection signal of the card is a flash selection signal of the semiconductor memory unit, 상기 플래시 메모리의 OS 프로그램 실행에 따라 카드 구동을 제어하는 단계를 더 포함하는 것을 특징으로 하는 스마트 카드의 OS 프로그램 저장/삭제 및 실행방법.And controlling the driving of a card according to the execution of the OS program of the flash memory.
KR10-2001-0067125A 2001-10-30 2001-10-30 Smart card and method for writing/erasing and operating an os program the same KR100399603B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2001-0067125A KR100399603B1 (en) 2001-10-30 2001-10-30 Smart card and method for writing/erasing and operating an os program the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2001-0067125A KR100399603B1 (en) 2001-10-30 2001-10-30 Smart card and method for writing/erasing and operating an os program the same

Publications (2)

Publication Number Publication Date
KR20030035171A true KR20030035171A (en) 2003-05-09
KR100399603B1 KR100399603B1 (en) 2003-09-29

Family

ID=29567020

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2001-0067125A KR100399603B1 (en) 2001-10-30 2001-10-30 Smart card and method for writing/erasing and operating an os program the same

Country Status (1)

Country Link
KR (1) KR100399603B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100678609B1 (en) * 2005-09-13 2007-02-06 주식회사 하이스마텍 System and method for calling command function in smartcard, and patch system and method therefor
KR100689223B1 (en) * 2005-04-18 2007-03-02 삼성에스디에스 주식회사 Method for optimizing patch and for security patch of smart card operating system
KR100865326B1 (en) * 2006-12-26 2008-10-27 삼성전자주식회사 Semiconductor device and data sensing method preventing mismatch of reference signal at data sensing
KR100971120B1 (en) * 2003-07-10 2010-07-20 주식회사 비즈모델라인 Method for Adjusting Memory of Working Element File in Smart Card
KR101020059B1 (en) * 2008-07-10 2011-03-09 주식회사 비즈모델라인 Method for Adjusting Memory of Working Element File in ICC

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102535243B1 (en) 2017-12-18 2023-05-23 에스케이하이닉스 주식회사 Memory system and operating method thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100971120B1 (en) * 2003-07-10 2010-07-20 주식회사 비즈모델라인 Method for Adjusting Memory of Working Element File in Smart Card
KR100689223B1 (en) * 2005-04-18 2007-03-02 삼성에스디에스 주식회사 Method for optimizing patch and for security patch of smart card operating system
KR100678609B1 (en) * 2005-09-13 2007-02-06 주식회사 하이스마텍 System and method for calling command function in smartcard, and patch system and method therefor
KR100865326B1 (en) * 2006-12-26 2008-10-27 삼성전자주식회사 Semiconductor device and data sensing method preventing mismatch of reference signal at data sensing
US7724579B2 (en) 2006-12-26 2010-05-25 Samsung Electronics Co., Ltd. Semiconductor memory devices and method for preventing mismatch of reference signals in data sending
KR101020059B1 (en) * 2008-07-10 2011-03-09 주식회사 비즈모델라인 Method for Adjusting Memory of Working Element File in ICC

Also Published As

Publication number Publication date
KR100399603B1 (en) 2003-09-29

Similar Documents

Publication Publication Date Title
US11169594B2 (en) Card and host apparatus
EP0451936B1 (en) Program control system for portable data storage device
EP2642422B1 (en) Ic card and ic card control method
EP2224335B1 (en) Information processing apparatus, method, and program
US10498671B2 (en) IC card, portable electronic apparatus, and IC card processing apparatus
KR100399603B1 (en) Smart card and method for writing/erasing and operating an os program the same
KR20020036717A (en) Microcomputer and method for controlling the same
JP4896842B2 (en) Portable electronic device
JP2006293706A (en) Multi-application ic card with application updating function
US7346730B2 (en) Mobile electronic device
JP5214291B2 (en) IC card and IC card control method
US20090083273A1 (en) Portable electronic apparatus and control method for portable electronic apparatus
JP7322923B2 (en) Secure element, transaction control method and device
JP7424536B1 (en) Electronic information storage medium, IC chip, IC card, communication parameter transmission method, and program
JP4734838B2 (en) Information recording medium, program, and command execution control method
JP2018194995A (en) Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program
JP6984328B2 (en) Electronic information storage medium, IC card, external device, data writing method and data writing program
JP2022132923A (en) IC card
JP2019168944A (en) Electronic information storage medium, IC card, command group execution method, and command group execution program
JP2008134945A (en) Storage device, program for storage device and storage processing method
JP2009075816A (en) Portable electronic device, and method of managing data in portable electronic device

Legal Events

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

Payment date: 20080905

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee