KR101347124B1 - Method of managing electronic prescription based on one-time public information and apparatus using the same - Google Patents

Method of managing electronic prescription based on one-time public information and apparatus using the same Download PDF

Info

Publication number
KR101347124B1
KR101347124B1 KR1020120103205A KR20120103205A KR101347124B1 KR 101347124 B1 KR101347124 B1 KR 101347124B1 KR 1020120103205 A KR1020120103205 A KR 1020120103205A KR 20120103205 A KR20120103205 A KR 20120103205A KR 101347124 B1 KR101347124 B1 KR 101347124B1
Authority
KR
South Korea
Prior art keywords
electronic prescription
authentication code
key
serial number
terminal
Prior art date
Application number
KR1020120103205A
Other languages
Korean (ko)
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 KR1020120103205A priority Critical patent/KR101347124B1/en
Application granted granted Critical
Publication of KR101347124B1 publication Critical patent/KR101347124B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0637Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0866Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3242Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

A method of processing an electronic prescription according to the present invention includes: a step that a hospital terminal generates serial number and authentication code of an electronic prescription to be issued; a step that the hospital terminal generates one-time base key (OTBK) and one-time public information (OTPI); a step that the hospital terminal generates encryption key (EK) and message authentication code key (MACK) for encrypting the electronic prescription using the OTBK; a step that the hospital terminal encrypts the electronic prescription using the encryption key; a step that the hospital terminal generates a message authentication code (MAC) for the electronic prescription using the MACK; a step that the hospital terminal transmits the serial number and authentication code to a mobile terminal of a patient and makes the serial number and authentication code to be used by the patient for requesting the electronic prescription in a drug store; and a step that the hospital terminal transmits the serial number, encrypted electronic prescription, MACK and OTPI to an electronic prescription server. [Reference numerals] (110) Hospital terminal; (111) Authentication code generation unit; (112,134) Encryption key generation unit; (113) Electronic prescription encryption unit; (114) Electronic prescription transmission unit; (115) Authentication code transmission unit; (120) Electronic prescription server; (121) Electronic prescription transmission and reception unit; (122) Electronic prescription processing unit; (123) Electronic prescription storage unit; (130) Drug store terminal; (131) Authentication input unit; (132) Electronic prescription request unit; (133) Electronic prescription reception unit; (135) Electronic prescription decoding unit; (140) Mobile terminal; (141) Authentication code reception unit; (142) Authentication code output unit

Description

일회용 공개 정보 기반 전자 처방전 처리 방법 및 이를 이용한 장치 {METHOD OF MANAGING ELECTRONIC PRESCRIPTION BASED ON ONE-TIME PUBLIC INFORMATION AND APPARATUS USING THE SAME}Disposable public information based electronic prescription processing method and device using same {METHOD OF MANAGING ELECTRONIC PRESCRIPTION BASED ON ONE-TIME PUBLIC INFORMATION AND APPARATUS USING THE SAME}

본 발명은 전자 처방전을 처리 시스템에 관한 것으로, 특히 전자 처방전의 암호화 시 E2E 암호화(End-To-End Encryption) 방식을 사용하여 전자 처방전의 기밀성을 제공할 뿐 아니라 전자 처방전 서버에서의 정보 유출을 방지하고, 전자 처방전의 무결성을 검증할 수 있는 전자 처방전 처리 기술에 관한 것이다.The present invention relates to an electronic prescription processing system, and in particular, the use of E2E encryption (End-To-End Encryption) when encrypting the electronic prescription not only provides confidentiality of the electronic prescription, but also prevents information leakage from the electronic prescription server. And an electronic prescription processing technology capable of verifying the integrity of the electronic prescription.

일반적으로 환자가 병원에 방문하여 의사로부터 진료를 받은 후에는 진료비를 계산한 후 종이로 된 처방전을 제공 받는다. 처방전을 받은 환자는 이를 병원 근처 가까운 약국에 제시하고, 약국의 약사는 환자에게서 전달받은 처방전에 따라 약을 조제한 후 환자에게 조제된 약을 제공하게 된다. 이와 같이 종이로 된 처방전을 이용하는 경우 환자가 매번 종이 처방전을 가지고 약국에 방문하여 이를 제공하는 것은 매우 번거롭다.Generally, after a patient visits a hospital and sees a doctor, he or she calculates the bill and is given a paper prescription. Patients who receive prescriptions are presented to the nearest pharmacy near the hospital, and the pharmacist in the pharmacy prepares the medicine according to the prescription received from the patient and then provides the medicine to the patient. As such, when using a paper prescription, it is very cumbersome for a patient to visit a pharmacy with a paper prescription each time.

전자 처방전 처리 시스템은 원내 또는 원격 진료 후 환자에게 종이 처방전 대신 전자 처방전을 발급 및 등록하고, 약국에서 환자가 의약품을 조제 받을 수 있도록 발급된 전자 처방전을 약국으로 전달하는 처리 시스템이다. 이 경우, 환자는 종이 처방전을 약국에 전달할 필요가 없으나, 전자 처방전을 중계하는 서버 등을 통하여 개인정보에 해당하는 처방전이 외부로 유출될 가능성이 있다.The electronic prescription processing system is a processing system for issuing and registering an electronic prescription instead of a paper prescription to a patient after in-hospital or telemedicine, and delivering the issued electronic prescription to the pharmacy so that the patient can receive the medicine at the pharmacy. In this case, the patient does not need to deliver the paper prescription to the pharmacy, but there is a possibility that the prescription corresponding to the personal information is leaked to the outside through a server for relaying the electronic prescription.

한국공개특허 제2012-0026194호는 전자 처방전이 서버를 통해 유출되는 것을 방지하기 위해 전자처방전을 암호화하여 바로 이동 단말로 전송하는 기술을 개시하고 있다. 그러나, 한국공개특허 제2012-0026194호는 서버를 통한 정보유출을 우려하여 전자 처방전을 이동 단말기를 거쳐서 약국 단말기로 전송하므로 무선 데이터 트래픽이 증가하는 문제가 있고, 이동 단말기의 데이터 통신 성능에 따라 전자 처방전 처리 성능이 좌우된다는 문제가 있다.Korean Laid-Open Patent No. 2012-0026194 discloses a technique of encrypting an electronic prescription and transmitting it directly to a mobile terminal in order to prevent the electronic prescription from leaking through a server. However, Korean Laid-Open Patent No. 2012-0026194 has a problem of increasing wireless data traffic because the electronic prescription is transmitted to the pharmacy terminal through the mobile terminal in fear of information leakage through the server, and according to the data communication performance of the mobile terminal, There is a problem that prescription treatment performance depends.

따라서, 전자처방전 서버를 통한 전자처방전 처리의 틀을 유지하면서도 효율적이고 안전하게 전자처방전 서버를 관리할 수 있는 새로운 기술의 필요성이 절실하게 대두된다.Therefore, there is an urgent need for a new technology capable of managing the electronic prescription discharge server efficiently and safely while maintaining the framework of the electronic prescription discharge process through the electronic prescription discharge server.

본 발명의 목적은 전자처방전 암호화 시 E2E 암호화(End-To-End Encryption) 방식을 사용함으로써 통신 주체들간의 전자처방전 송수신시 전자처방전이 기밀성을 효과적으로 제공하고 전자 처방전 서버에 적절히 암호화된 전자처방전만이 존재하도록 하여 전자처방전 서버에서의 정보 유출을 방지하는 것이다.It is an object of the present invention to provide the confidentiality of electronic prescriptions effectively during transmission and reception of electronic prescriptions between communication subjects by using E2E encryption (end-to-end encryption) method for electronic prescriptions, and only the electronic prescriptions properly encrypted in the electronic prescription server. It exists so as to prevent information leakage from the electronic prescription server.

또한, 본 발명의 목적은 암호화된 전자처방전에 대한 메시지 인증 코드(MAC; Message Authentication Code)를 통한 무결성 검증 기능을 제공하여 보안 강도를 보다 향상시키는 것이다.In addition, an object of the present invention is to further improve the strength of security by providing an integrity verification function through a message authentication code (MAC) for the encrypted electronic prescription.

또한, 본 발명의 목적은 디피-헬만(Diffie-Hellman) 방식의 키 공유(key sharing) 기법을 개량하여 일회용 공개 정보(OTPI; One-Time Public Information)를 공유함으로써 병원에서의 전자 처방전 발급 이후 환자가 개인 자율적으로 원하는 약국을 선택하는 경우에도 안전하게 처방된 약을 제공 받을 수 있도록 하여 전자 처방전 처리 시스템의 실효성을 높이는 것이다.It is also an object of the present invention to improve the key sharing technique of the Diffie-Hellman method to share the One-Time Public Information (OTPI) to the patient after issuing an electronic prescription in a hospital. Even if an individual chooses to autonomously select a desired pharmacy, it is possible to increase the effectiveness of the electronic prescription processing system by ensuring that the prescribed prescription is safely provided.

상기한 목적을 달성하기 위한 본 발명에 따른 전자 처방전 처리 방법은, 병원 단말기가, 발급하고자 하는 전자 처방전의 일련번호와 인증코드를 생성하는 단계; 상기 병원 단말기가, 일회용 베이스 키(OTBK; One-Time Base Key) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 생성하는 단계; 상기 병원 단말기가, 상기 일회용 베이스 키를 이용하여 상기 전자 처방전을 암호화하기 위한 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성하는 단계; 상기 병원 단말기가, 상기 암호화 키를 이용하여 상기 전자 처방전을 암호화하는 단계; 상기 병원 단말기가, 상기 메시지 인증 코드 키를 이용하여 상기 전자 처방전에 대한 메시지 인증 코드(MAC; Message Authentication Code)를 생성하는 단계; 상기 병원 단말기가, 상기 일련번호 및 상기 인증코드를 환자의 이동 단말기로 전송하여 상기 일련번호 및 상기 인증코드가 상기 환자가 약국에서 상기 전자 처방전을 요청하는데 사용되도록 하는 단계; 및 상기 병원 단말기가, 상기 일련번호, 암호화된 상기 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 전자 처방전 서버로 전송하는 단계를 포함한다.Electronic prescription processing method according to the present invention for achieving the above object, the hospital terminal, generating the serial number and authentication code of the electronic prescription to be issued; Generating, by the hospital terminal, a one-time base key (OTBK) and one-time public information (OTPI); Generating, by the hospital terminal, an encryption key (EK) and a message authentication code key (MACK) for encrypting the electronic prescription using the disposable base key; Encrypting, by the hospital terminal, the electronic prescription using the encryption key; Generating, by the hospital terminal, a message authentication code (MAC) for the electronic prescription using the message authentication code key; Sending, by the hospital terminal, the serial number and the authentication code to the patient's mobile terminal such that the serial number and the authentication code are used by the patient to request the electronic prescription at the pharmacy; And transmitting, by the hospital terminal, the serial number, the encrypted electronic prescription, the message authentication code, and the disposable public information to an electronic prescription server.

이 때, 상기 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 2048비트 이상의 소수, g는 Zp의 원소로서, 위수로

Figure 112012075406065-pat00001
를 갖는 생성자, R은
Figure 112012075406065-pat00002
인 난수)를 계산하여 생성되고, 상기 일회용 베이스 키는 상기 일회용 공개 정보에 대하여 OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 인증코드를 입력으로 해쉬 출력한 값에
Figure 112012075406065-pat00003
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 생성될 수 있다.At this time, the disposable public information is g R mod p (p is a decimal number of 2048 bits or more to determine the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00001
Constructor with R
Figure 112012075406065-pat00002
Is generated by calculating a random number), and the one-time base key is OTPI X mod p (OTPI is the one-time disclosure information and X is the hash number outputted as the input of the serial number and the authentication code) with respect to the one-time disclosure information.
Figure 112012075406065-pat00003
It can be generated by taking the upper 16 bytes by calculating the resulting value).

이 때, p의 크기는 2048비트 이상의 소수로서 예시를 하였으나, 다양한 적용 환경에 따라 p의 크기는 가변적으로 적용될 수 있다.In this case, the size of p is illustrated as a decimal number of 2048 bits or more, but the size of p may be variably applied according to various application environments.

이 때, 상기 전자 처방전을 암호화하는 단계는 상기 암호 키를 입력으로 해쉬(cryptographic hash algorithm) 출력된 값 중 상위 16바이트 값을 초기 벡터(IV; Initial Vector)로 하여 CBC(Cipher Block Chaining) 암호화 방식에 의해 상기 전자 처방전을 암호화할 수 있다.At this time, the step of encrypting the electronic prescription is a Cipher Block Chaining (CBC) encryption method using the upper 16 bytes of the cryptographic hash algorithm outputted as the initial vector (IV) as the input of the encryption key. The electronic prescription can be encrypted by.

이 때, 상기 인증코드는 상기 이동 단말기로 전송되기 전에 상기 환자의 공인인증서의 공개키로 암호화되고, 의사의 공인인증서의 비밀키로 전자서명될 수 있다.At this time, the authentication code is encrypted with the public key of the patient's official certificate before being transmitted to the mobile terminal, it may be digitally signed with the secret key of the doctor's official certificate.

이 때, 상기 인증코드는 상기 이동 단말기에 의해 수신된 후, 상기 의사에 대한 서명 검증을 수행하고 상기 서명 검증이 성공하면 상기 환자의 공인인증서의 비밀키로 복호화될 수 있다.In this case, after the authentication code is received by the mobile terminal, the signature verification for the doctor is performed, and if the signature verification is successful, the authentication code may be decrypted with the private key of the patient's authorized certificate.

이 때, 전자 처방전 처리 방법은 상기 이동 단말기가 상기 일련번호 및 상기 인증코드를 화면에 출력하는 단계; 상기 약국에 구비된 약국 단말기가 상기 일련번호 및 상기 인증코드를 입력 받는 단계; 상기 약국 단말기가 상기 전자 처방전 서버로 상기 일련번호에 상응하는 상기 전자 처방전을 요청하는 단계; 상기 전자 처방전 서버가 상기 일련번호를 이용하여, 암호화된 상기 전자 처방전을 검색하는 단계; 상기 전자 처방전 서버가 상기 일련번호에 상응하는 암호화된 상기 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 상기 약국 단말기로 전송하는 단계; 상기 약국 단말기가 상기 일회용 공개 정보를 이용하여 상기 암호화 키를 생성하는 단계; 및 상기 약국 단말기가 상기 암호화 키를 이용하여 암호화된 상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원하는 단계를 더 포함할 수 있다.At this time, the electronic prescription processing method includes the step of outputting the serial number and the authentication code on the screen by the mobile terminal; Receiving, by the pharmacy terminal provided in the pharmacy, the serial number and the authentication code; Requesting, by the pharmacy terminal, the electronic prescription corresponding to the serial number to the electronic prescription server; Searching, by the electronic prescription server, the encrypted electronic prescription using the serial number; Transmitting, by the electronic prescription server, the encrypted electronic prescription corresponding to the serial number, the message authentication code, and the disposable public information to the pharmacy terminal; Generating, by the pharmacy terminal, the encryption key using the disposable public information; And recovering, by the pharmacy terminal, the electronic prescription by decrypting the electronic prescription encrypted using the encryption key.

이 때, 전자 처방전 처리 방법은 상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원하는 단계 이전에, 상기 약국 단말기가 상기 일회용 공개 정보를 이용하여 상기 일회용 베이스 키를 복원하는 단계; 복원된 상기 일회용 베이스 키를 이용하여 상기 메시지 인증 코드 키를 복원하는 단계; 및 상기 메시지 인증 코드 키를 이용하여 암호화된 상기 전자 처방전의 메시지 인증 코드 검증을 수행하는 단계를 더 포함할 수 있다. 이 때, 상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원하는 단계는 상기 메시지 인증 코드 검증이 성공하여 무결성(integrity)이 검증된 경우에만 상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원할 수 있다.At this time, the electronic prescription processing method includes the step of restoring the disposable base key by the pharmacy terminal using the one-time disclosure information before the step of decoding the electronic prescription to restore the electronic prescription; Restoring the message authentication code key using the restored one-time base key; And performing the message authentication code verification of the electronic prescription encrypted using the message authentication code key. At this time, decrypting the electronic prescription and restoring the electronic prescription may restore the electronic prescription by decrypting the electronic prescription only when the message authentication code verification is successful and integrity is verified.

이 때, 상기 병원 단말기는 상기 일회용 베이스 키 및 상기 일회용 공개 정보를 생성하기 이전에 상기 의사의 공인인증서에 대한 패스워드 입력을 통해 상기 의사에 대한 사용자 인증을 수행하여 상기 의사에 대한 사용자 인증이 성공하면 상기 전자처방전에 대해 전자서명을 수행하고, 상기 이동 단말기는 상기 환자의 공인인증서에 대한 패스워드 입력을 통해 상기 환자에 대한 사용자 인증을 수행하여 상기 환자에 대한 사용자 인증이 성공하면 상기 일련번호 및 복호화된 상기 인증코드를 상기 화면에 출력하고, 상기 약국 단말기는 약사의 공인인증서에 대한 패스워드 입력을 통해 상기 약사에 대한 사용자 인증을 수행하여 상기 약사에 대한 사용자 인증이 성공하면 상기 일련번호를 포함하는 전자 처방전 요청 메시지를 생성하고, 생성된 전자 처방전 요청 메시지에 전자서명을 수행하여 전자 처방전 서버로 전송할 수 있다.At this time, the hospital terminal performs a user authentication for the doctor through the password input to the doctor's official certificate before generating the disposable base key and the disposable public information, if the user authentication for the doctor is successful The electronic signature is performed on the electronic prescription, and the mobile terminal performs user authentication on the patient by inputting a password for the patient's official certificate. When the user authentication on the patient succeeds, the serial number and decryption are performed. The authentication code is output on the screen, and the pharmacy terminal performs a user authentication for the pharmacist by inputting a password for a certified certificate of the pharmacist, if the user authentication for the pharmacist is successful, the electronic prescription including the serial number Generate request message, generated electronic prescription An electronic signature may be performed on the previous request message and transmitted to the electronic prescription server.

또한, 본 발명의 일실시예에 따른 병원 단말기는, 전자 처방전의 일련번호와 인증코드를 생성하는 인증코드 생성부; 일회용 베이스 키(OTBK; One-Time Base Key) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 생성하고, 상기 일회용 베이스 키를 이용하여 상기 전자 처방전을 암호화하기 위한 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성하는 암호키 생성부; 상기 암호화 키를 이용하여 상기 전자 처방전을 암호화하는 전자 처방전 암호부; 상기 메시지 인증 코드 키를 이용하여 상기 전자 처방전에 대하여 생성된 메시지 인증 코드(MAC; Message Authentication Code), 상기 일련번호, 암호화된 상기 전자 처방전 및 상기 일회용 공개 정보를 전자 처방전 서버로 전송하는 전자 처방전 전송부; 및 상기 일련번호 및 상기 인증코드를 환자의 이동 단말기로 전송하는 인증코드 전송부를 포함한다.In addition, the hospital terminal according to an embodiment of the present invention, the authentication code generation unit for generating a serial number and the authentication code of the electronic prescription; An encryption key (EK) for generating a one-time base key (OTBK) and one-time public information (OTPI) and encrypting the electronic prescription using the one-time base key. And an encryption key generator for generating a message authentication code key (MACK); An electronic prescription encryption unit for encrypting the electronic prescription using the encryption key; Electronic prescription transmission for transmitting a message authentication code (MAC), the serial number, the encrypted electronic prescription, and the disposable public information generated for the electronic prescription using the message authentication code key to an electronic prescription server. part; And an authentication code transmission unit for transmitting the serial number and the authentication code to the mobile terminal of the patient.

또한, 본 발명의 일실시예에 따른 약국 단말기는, 이동 단말기를 통해 표시된 전자 처방전의 일련번호와 인증코드를 입력 받는 인증코드 입력부; 상기 일련번호를 이용하여, 전자 처방전 서버로 상기 전자 처방전을 요청하는 전자 처방전 요청부; 상기 전자 처방전 서버로부터 암호화된 상기 전자 처방전, 메시지 인증 코드(MAC; Message Authentication Code) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 수신하는 전자 처방전 수신부; 상기 인증코드를 이용하여 상기 일회용 공개 정보로부터 일회용 베이스 키(OTBK; One-Time Base Key)를 생성하고, 상기 일회용 베이스 키를 이용하여 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성하는 암호키 생성부; 및 상기 메시지 인증 코드 키를 이용하여 암호화된 상기 전자 처방전에 대한 메시지 인증 코드 검증을 수행하고, 상기 검증 결과 무결성이 검증되면 상기 암호화 키를 이용하여 암호화된 상기 전자 처방전을 복호화하는 전자 처방전 복호부를 포함한다.In addition, the pharmacy terminal according to an embodiment of the present invention, the authentication code input unit for receiving the serial number and the authentication code of the electronic prescription displayed through the mobile terminal; An electronic prescription request unit which requests the electronic prescription to an electronic prescription server using the serial number; An electronic prescription receiver configured to receive the encrypted electronic prescription, a message authentication code (MAC) and one-time public information (OTPI) from the electronic prescription server; The one-time base key (OTBK) is generated from the one-time public information using the authentication code, and an encryption key (EK) and a message authentication code key (MACK) are used using the one-time base key. Encryption key generation unit for generating a Message Authentication Code Key); And an electronic prescription decryption unit that performs message verification code verification on the electronic prescription encrypted using the message authentication code key, and decrypts the electronic prescription encrypted using the encryption key when the verification result integrity is verified. do.

또한, 본 발명의 일실시예에 따른 전자 처방전 서버는, 병원 단말기로부터 전자 처방전의 일련번호, 암호화된 전자 처방전, 상기 전자 처방전에 상응하는 메시지 인증 코드(MAC; Message Authentication Code) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 수신하고, 약국 단말기의 요청에 따라 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 송신하는 전자 처방전 송수신부; 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 상기 일련번호에 따라 저장하는 전자 처방전 저장부; 및 상기 전자 처방전 저장부에서 상기 약국 단말기의 요청에 상응하는 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 검색하여 검색된 결과를 상기 전자 처방전 송수신부로 제공하고, 상기 약국 단말기로 전송된 정보를 삭제하는 전자 처방전 처리부를 포함한다.In addition, the electronic prescription server according to an embodiment of the present invention, from the hospital terminal, the serial number of the electronic prescription, the encrypted electronic prescription, the Message Authentication Code (MAC) corresponding to the electronic prescription and disposable public information ( An electronic prescription transmission / reception unit configured to receive one-time public information (OTPI) and transmit the encrypted electronic prescription, the message authentication code, and the disposable public information according to a request of a pharmacy terminal; An electronic prescription storage unit for storing the encrypted electronic prescription, the message authentication code, and the disposable public information according to the serial number; And searching the encrypted electronic prescription, the message authentication code, and the disposable public information corresponding to the request of the pharmacy terminal in the electronic prescription storage unit, provide the searched result to the electronic prescription transmitting and receiving unit, and transmitted to the pharmacy terminal. And an electronic prescription processing unit for deleting the information.

본 발명에 따르면, 전자처방전 암호화 시 E2E 암호화(End-To-End Encryption) 방식을 사용함으로써 통신 주체들간의 전자처방전 송수신시 전자처방전이 기밀성을 효과적으로 제공하고 전자 처방전 서버에 적절히 암호화된 전자처방전만이 존재하도록 하여 전자처방전 서버에서의 정보 유출을 방지할 수 있다.According to the present invention, by using the E2E encryption (End-To-End Encryption) method in the electronic prescription encryption, the electronic prescription discharge effectively provides confidentiality when transmitting and receiving electronic prescription discharge between communication subjects and only the electronic prescription discharge properly encrypted in the electronic prescription server Existing information can be prevented from being leaked from the electronic prescription server.

또한, 본 발명은 암호화된 전자처방전에 대한 메시지 인증 코드(MAC; Message Authentication Code)를 통한 무결성 검증 기능을 제공하여 보안 강도를 보다 향상시킬 수 있다.In addition, the present invention can further improve the security strength by providing an integrity verification function through a message authentication code (MAC) for the encrypted electronic prescription.

또한, 본 발명은 디피-헬만(Diffie-Hellman) 방식의 키 공유(key sharing) 기법을 개량하여 일회용 공개 정보(OTPI; One-Time Public Information)를 공유함으로써 병원에서의 전자 처방전 발급 이후 환자가 개인 자율적으로 원하는 약국을 선택하는 경우에도 안전하게 처방된 약을 제공 받을 수 있도록 하여 전자 처방전 처리 시스템의 실효성을 높일 수 있다.In addition, the present invention improves the Diffie-Hellman type key sharing technique to share the One-Time Public Information (OTPI), thereby allowing the patient to personalize after the issuance of the electronic prescription in the hospital. Even when autonomously selecting the desired pharmacy, it is possible to increase the effectiveness of the electronic prescription processing system by providing a safe prescription drug.

도 1은 인증서 기반의 PKI 서비스가 불가능한 환경에서의 본 발명의 일실시예에 따른 전자 처방전 처리 시스템을 나타낸 블록도이다.
도 2는 인증서 기반의 PKI 서비스가 가능한 환경에서의 본 발명의 일실시예에 따른 전자 처방전 처리 시스템을 나타낸 블록도이다.
도 3은 본 발명의 일실시예에 따른 전자 처방전 처리 방법을 나타낸 동작 흐름도이다.
도 4는 도 3에 도시된 암호화 키 생성 단계의 일 예를 나타낸 동작 흐름도이다.
1 is a block diagram illustrating an electronic prescription processing system according to an embodiment of the present invention in an environment where a certificate-based PKI service is not available.
Figure 2 is a block diagram showing an electronic prescription processing system according to an embodiment of the present invention in an environment capable of certificate-based PKI services.
3 is a flowchart illustrating an electronic prescription processing method according to an embodiment of the present invention.
4 is a flowchart illustrating an example of an encryption key generation step illustrated in FIG. 3.

본 발명을 첨부된 도면을 참조하여 상세히 설명하면 다음과 같다. 여기서, 반복되는 설명, 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능, 및 구성에 대한 상세한 설명은 생략한다. 본 발명의 실시형태는 당 업계에서 평균적인 지식을 가진 자에게 본 발명을 보다 완전하게 설명하기 위해서 제공되는 것이다. 따라서, 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다.The present invention will now be described in detail with reference to the accompanying drawings. Hereinafter, a repeated description, a known function that may obscure the gist of the present invention, and a detailed description of the configuration will be omitted. Embodiments of the present invention are provided to more fully describe the present invention to those skilled in the art. Accordingly, the shapes and sizes of the elements in the drawings and the like can be exaggerated for clarity.

이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.
Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

본 발명은 두 가지 적용 환경에 따라 실사용이 가능하도록 두 방안을 제시한다. 즉, 통신 주체들 각각 인증서 기반 PKI(Public Key Infrastructure) 서비스가 불가능한 일반적인 환경에서의 적용 방안과 PKI 서비스가 가능한 환경에서의 적용 방안의 두 방안을 각각 제시한다.
The present invention proposes two methods to enable practical use according to two application environments. In other words, each of the communication subjects proposes two methods of application in a general environment where certificate-based Public Key Infrastructure (PKI) services are not possible and in an environment where PKI services are possible.

도 1은 인증서 기반의 PKI 서비스가 불가능한 환경에서의 본 발명의 일실시예에 따른 전자 처방전 처리 시스템을 나타낸 블록도이다.1 is a block diagram illustrating an electronic prescription processing system according to an embodiment of the present invention in an environment where a certificate-based PKI service is not available.

도 1을 참조하면, 본 발명의 일실시예에 따른 전자 처방전 처리 시스템은 병원 단말기(110), 전자 처방전 서버(120), 약국 단말기(130) 및 이동 단말기(140)를 포함한다.Referring to FIG. 1, an electronic prescription processing system according to an embodiment of the present invention includes a hospital terminal 110, an electronic prescription server 120, a pharmacy terminal 130, and a mobile terminal 140.

병원 단말기(110)는 환자가 진료를 받은 병원에서 전자 처방전을 발행하는 단말기로, 퍼스널 컴퓨터, 랩탑, 태블릿 등의 다양한 단말기일 수 있다.The hospital terminal 110 is a terminal for issuing an electronic prescription in a hospital where a patient is treated, and may be various terminals such as a personal computer, a laptop, and a tablet.

병원 단말기(110)는 인증코드 생성부(111), 암호키 생성부(112), 전자 처방전 암호부(113), 전자 처방전 전송부(114) 및 인증코드 전송부(115)를 포함한다.The hospital terminal 110 includes an authentication code generator 111, an encryption key generator 112, an electronic prescription encryption unit 113, an electronic prescription transmission unit 114, and an authentication code transmission unit 115.

인증코드 생성부(111)는 전자 처방전의 일련번호와 인증코드를 생성한다. 일련번호와 인증코드를 생성하는 상세한 방법에 대해서는 뒤에 자세히 설명한다.Authentication code generation unit 111 generates the serial number and authentication code of the electronic prescription. The details of how to generate a serial number and a verification code are described in detail later.

암호키 생성부(112)는 일회용 베이스 키(OTBK; One-Time Base Key) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 생성하고, 상기 일회용 베이스 키를 이용하여 상기 전자 처방전을 암호화하기 위한 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성한다. 암호키 생성부(112)가 키들을 생성하는 상세한 방법에 대해서도 뒤에 자세히 설명한다.The encryption key generator 112 generates a one-time base key (OTBK) and one-time public information (OTPI), and encrypts the electronic prescription using the one-time base key. An encryption key (EK) and a message authentication code key (MACK) are generated. A detailed method of generating the keys by the encryption key generator 112 will be described in detail later.

이 때, 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 2048비트 이상의 소수, g는 Zp의 원소로서, 위수로 를 갖는 생성자, R은

Figure 112012075406065-pat00005
인 난수)를 계산하여 생성되고, 상기 일회용 베이스 키는 상기 일회용 공개 정보에 대하여 OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 인증코드를 입력으로 해쉬 출력한 값에
Figure 112012075406065-pat00006
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 생성될 수 있다. 이 때, p의 크기는 2048비트 이상의 소수로서 예시를 하였으나, 다양한 적용 환경에 따라 p의 크기는 가변적으로 적용될 수 있다.At this time, the disposable public information is g R mod p (p is a decimal number of 2048 bits or more that determines the finite space Z p , g is an element of Z p , Constructor with R
Figure 112012075406065-pat00005
Is generated by calculating a random number), and the one-time base key is OTPI X mod p (OTPI is the one-time disclosure information and X is the hash number outputted as the input of the serial number and the authentication code) with respect to the one-time disclosure information.
Figure 112012075406065-pat00006
It can be generated by taking the upper 16 bytes by calculating the resulting value). In this case, the size of p is illustrated as a decimal number of 2048 bits or more, but the size of p may be variably applied according to various application environments.

전자 처방전 암호부(113)는 암호키 생성부(112)에서 생성된 암호화 키를 이용하여 상기 전자 처방전을 암호화한다. 전자 처방전 암호부(113)에서 전자 처방전을 암호화하는 상세한 방식에 대해서도 후술한다.The electronic prescription encryption unit 113 encrypts the electronic prescription using the encryption key generated by the encryption key generation unit 112. The detailed method of encrypting the electronic prescription in the electronic prescription encryption unit 113 will also be described later.

이 때, 전자 처방전 암호부(113)는 상기 암호 키를 입력으로 해쉬(cryptographic hash algorithm) 출력된 값 중 상위 16바이트 값을 초기 벡터(IV; Initial Vector)로 하여 CBC(Cipher Block Chaining) 암호화 방식에 의해 상기 전자 처방전을 암호화할 수 있다.At this time, the electronic prescription encryption unit 113 is a CBC (Cipher Block Chaining) encryption method by using the upper 16 bytes of the cryptographic hash algorithm output value as the initial vector (IV) The electronic prescription can be encrypted by.

전자 처방전 전송부(114)는 상기 메시지 인증 코드 키를 이용하여 상기 전자 처방전에 대하여 생성된 메시지 인증 코드(MAC; Message Authentication Code), 상기 일련번호, 암호화된 상기 전자 처방전 및 상기 일회용 공개 정보를 전자 처방전 서버(120)로 전송한다.The electronic prescription transmitter 114 electronically stores the message authentication code (MAC), the serial number, the encrypted electronic prescription, and the disposable public information generated for the electronic prescription using the message authentication code key. Send to the prescription server 120.

이 때, 메시지 인증 코드는 약국 단말기(130)가 복원한 상기 메시지 인증 코드 키(MACK)를 이용하여 메시지 코드 검증을 수행하는데 사용될 수 있다.In this case, the message authentication code may be used to perform message code verification using the message authentication code key (MACK) restored by the pharmacy terminal 130.

인증코드 전송부(115)는 상기 일련번호 및 상기 인증코드를 환자의 이동 단말기(140)로 전송한다.The authentication code transmitter 115 transmits the serial number and the authentication code to the mobile terminal 140 of the patient.

이동 단말기(140)는 병원 단말기(110)로부터 전자 처방전을 발급받고자 하는 환자가 사용하는 단말기로, 병원 단말기(110)로부터 전자 처방전에 해당하는 인증코드를 제공 받고, 이를 일련번호와 함께 단말기 화면에 출력한다. 이동 단말기(140)는 스마트폰, 랩탑, 태블릿 등의 다양한 단말기들일 수 있다.The mobile terminal 140 is a terminal used by a patient who wants to receive an electronic prescription from the hospital terminal 110, and receives an authentication code corresponding to the electronic prescription from the hospital terminal 110, and displays it on the terminal screen together with the serial number. Output The mobile terminal 140 may be various terminals such as a smartphone, a laptop, a tablet, and the like.

이동 단말기(140)는 인증코드 수신부(141) 및 인증코드 출력부(142)를 포함한다. 인증코드 수신부(141)는 병원 단말기(110)로부터 전자 처방전의 일련번호 및 인증코드를 제공 받고, 인증코드 출력부(142)는 수신된 일련번호 및 인증코드를 화면에 출력한다.The mobile terminal 140 includes an authentication code receiver 141 and an authentication code output unit 142. The authentication code receiving unit 141 receives the serial number and authentication code of the electronic prescription from the hospital terminal 110, the authentication code output unit 142 outputs the received serial number and authentication code on the screen.

약국 단말기(130)는 이동 단말기(140)를 통해 표시된 전자 처방전의 일련번호와 인증코드를 입력 받아서 이동 단말기(140)를 사용하는 환자에게 필요한 약을 조제하기 위한 전자 처방전을 전자 처방전 서버(140)로 요청하고, 전자 처방전 서버(140)로부터 암호화된 전자 처방전을 제공 받아서 이를 복호화한다.The pharmacy terminal 130 receives the serial number and the authentication code of the electronic prescription displayed through the mobile terminal 140 and the electronic prescription server 140 to prepare an electronic prescription for the patient using the mobile terminal 140 Request, and receives the encrypted electronic prescription from the electronic prescription server 140 to decrypt it.

약국 단말기(130)는 인증코드 입력부(131), 전자 처방전 요청부(132), 전자 처방전 수신부(133), 암호키 생성부(134) 및 전자 처방전 복호부(135)를 포함한다.The pharmacy terminal 130 includes an authentication code input unit 131, an electronic prescription request unit 132, an electronic prescription receiver 133, an encryption key generator 134, and an electronic prescription decoder 135.

인증코드 입력부(131)는 이동 단말기(140)를 통해 표시된 전자 처방전의 일련번호와 인증코드를 입력 받는다.The authentication code input unit 131 receives the serial number and the authentication code of the electronic prescription displayed through the mobile terminal 140.

전자 처방전 요청부(132)는 상기 일련번호를 이용하여, 전자 처방전 서버(120)로 상기 전자 처방전을 요청한다.The electronic prescription requester 132 requests the electronic prescription to the electronic prescription server 120 using the serial number.

전자 처방전 수신부(133)는 전자 처방전 서버(120)로부터 암호화된 상기 전자 처방전, 메시지 인증 코드(MAC; Message Authentication Code) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 수신한다.The electronic prescription receiving unit 133 receives the encrypted electronic prescription, message authentication code (MAC) and one-time public information (OTPI) from the electronic prescription server 120.

이 때, 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 2048비트 이상의 소수, g는 Zp의 원소로서, 위수로

Figure 112012075406065-pat00007
를 갖는 생성자, R은
Figure 112012075406065-pat00008
인 난수)를 계산하여 생성된 것일 수 있다. 이 때, p의 크기는 2048비트 이상의 소수로서 예시를 하였으나, 다양한 적용 환경에 따라 p의 크기는 가변적으로 적용될 수 있다.At this time, the disposable public information is g R mod p (p is a decimal number of 2048 bits or more that determines the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00007
Constructor with R
Figure 112012075406065-pat00008
Phosphorus random number) may be generated by calculating. In this case, the size of p is illustrated as a decimal number of 2048 bits or more, but the size of p may be variably applied according to various application environments.

암호키 생성부(134)는 상기 인증코드를 이용하여 상기 일회용 공개 정보로부터 일회용 베이스 키(OTBK; One-Time Base Key)를 생성하고, 상기 일회용 베이스 키를 이용하여 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성한다.The encryption key generation unit 134 generates a one-time base key (OTBK) from the one-time public information using the authentication code, and uses the one-time base key to encrypt an encryption key (EK). And a message authentication code key (MACK).

이 때, 상기 일회용 베이스 키는 상기 일회용 공개 정보에 대하여 OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 인증코드를 입력으로 해쉬 출력한 값에

Figure 112012075406065-pat00009
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 생성될 수 있다.At this time, the one-time base key is OTPI X mod p (OTPI is the one-time disclosure information, X is the hash number outputted as the input of the serial number and the authentication code) with respect to the one-time disclosure information.
Figure 112012075406065-pat00009
It can be generated by taking the upper 16 bytes by calculating the resulting value).

전자 처방전 복호부(135)는 상기 메시지 인증 코드 키를 이용하여 암호화된 상기 전자 처방전에 대한 메시지 인증 코드 검증을 수행하고, 상기 검증 결과 무결성이 검증되면 상기 암호화 키를 이용하여 암호화된 상기 전자 처방전을 복호화한다.The electronic prescription decoding unit 135 performs a message authentication code verification for the electronic prescription encrypted using the message authentication code key, and if the integrity of the verification result is verified, the electronic prescription encrypted using the encryption key. Decrypt

전자 처방전 서버(120)는 병원 단말기(110)로부터 암호화된 전자 처방전 등의 정보를 제공 받아서 저장하고, 약국 단말기(130)에서 정당하게 전자 처방전을 요청하는 경우 해당 전자 처방전을 검색하여 일회용 공개 정보 등의 데이터와 함께 암호화된 전자 처방전을 약국 단말기(130)로 제공한다.The electronic prescription server 120 receives and stores information, such as an encrypted electronic prescription, from the hospital terminal 110, and if the pharmacy terminal 130 requests the electronic prescription in a legitimate manner, searching for the electronic prescription for disposable public information, etc. The electronic prescription encrypted with the data of the pharmacy terminal 130 is provided.

전자 처방전 서버(120)는 전자 처방전 송수신부(121), 전자 처방전 처리부(122) 및 전자 처방전 저장부(123)를 포함한다.The electronic prescription server 120 includes an electronic prescription transceiver 121, an electronic prescription processor 122, and an electronic prescription storage unit 123.

전자 처방전 송수신부(121)는 병원 단말기(110)로부터 전자 처방전의 일련번호, 암호화된 전자 처방전, 상기 전자 처방전에 상응하는 메시지 인증 코드(MAC; Message Authentication Code) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 수신하고, 약국 단말기(130)의 요청에 따라 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 송신한다.The electronic prescription transmitter / receiver 121 transmits a serial number of an electronic prescription, an encrypted electronic prescription, a message authentication code (MAC) corresponding to the electronic prescription, and disposable public information (OTPI; One-) from the hospital terminal 110. Time Public Information) and transmits the encrypted electronic prescription, the message authentication code, and the disposable public information according to a request of the pharmacy terminal 130.

이 때, 상기 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 2048비트 이상의 소수, g는 Zp의 원소로서, 위수로

Figure 112012075406065-pat00010
를 갖는 생성자, R은
Figure 112012075406065-pat00011
인 난수)를 계산하여 생성되고, OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 전자 처방전의 인증코드를 입력으로 해쉬 출력한 값에
Figure 112012075406065-pat00012
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 일회용 베이스 키를 생성하는데 사용될 수 있다. 이 때, p의 크기는 2048비트 이상의 소수로서 예시를 하였으나, 다양한 적용 환경에 따라 p의 크기는 가변적으로 적용될 수 있다.At this time, the disposable public information is g R mod p (p is a decimal number of 2048 bits or more to determine the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00010
Constructor with R
Figure 112012075406065-pat00011
Is generated by calculating a random number), and OTPI X mod p (OTPI is the disposable public information, X is a hash output value of the serial number and the authentication code of the electronic prescription).
Figure 112012075406065-pat00012
Can be used to generate a disposable base key by taking the top 16 bytes. In this case, the size of p is illustrated as a decimal number of 2048 bits or more, but the size of p may be variably applied according to various application environments.

전자 처방전 저장부(123)는 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 상기 일련번호에 따라 저장한다.The electronic prescription storage unit 123 stores the encrypted electronic prescription, the message authentication code and the disposable public information according to the serial number.

전자 처방전 처리부(122)는 전자 처방전 저장부(123)에서 약국 단말기(130)의 요청에 상응하는 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 검색하여 검색된 결과를 전자 처방전 송수신부(121)로 제공하고, 약국 단말기(130)로 전송된 정보를 삭제한다.
The electronic prescription processing unit 122 searches the encrypted electronic prescription, the message authentication code and the disposable public information corresponding to the request of the pharmacy terminal 130 in the electronic prescription storage unit 123, and retrieves the searched result from the electronic prescription transmitting and receiving unit. Provided to 121, and deletes the information transmitted to the pharmacy terminal 130.

도 2는 인증서 기반의 PKI 서비스가 가능한 환경에서의 본 발명의 일실시예에 따른 전자 처방전 처리 시스템을 나타낸 블록도이다.Figure 2 is a block diagram showing an electronic prescription processing system according to an embodiment of the present invention in an environment capable of certificate-based PKI services.

도 2을 참조하면, 본 발명의 일실시예에 따른 전자 처방전 처리 시스템은 병원 단말기(210), 전자 처방전 서버(220), 약국 단말기(230), 이동 단말기(240) 및 인증 서버(250)를 포함한다.2, the electronic prescription processing system according to an embodiment of the present invention includes a hospital terminal 210, an electronic prescription server 220, a pharmacy terminal 230, a mobile terminal 240, and an authentication server 250. Include.

특히, 인증 서버(250)는 통신 주체들 각각에 대한 인증서 기반 PKI(Public Key Infrastructure) 서비스를 제공하기 위해 병원 단말기(210), 약국 단말기(230) 및 이동 단말기(240)에 대한 사용자 인증을 수행하고, 전자 서명된 인증코드, 전자 처방전, 전자처방전 요청 메시지 등에 대한 서명을 검증한다.In particular, the authentication server 250 performs user authentication for the hospital terminal 210, the pharmacy terminal 230 and the mobile terminal 240 to provide certificate-based Public Key Infrastructure (PKI) services for each of the communication subjects. Then, the signature on the electronically signed authentication code, electronic prescription, electronic prescription request message is verified.

병원 단말기(210)는 환자가 진료를 받은 병원에서 전자 처방전을 발행하는 단말기로, 퍼스널 컴퓨터, 랩탑, 태블릿 등의 다양한 단말기일 수 있다.The hospital terminal 210 is a terminal for issuing an electronic prescription in a hospital where a patient is treated, and may be various terminals such as a personal computer, a laptop, and a tablet.

병원 단말기(210)는 인증코드 생성부(211), 암호키 생성부(212), 전자 처방전 암호부(213), 전자 처방전 전송부(214), 인증코드 전송부(215) 및 사용자 인증부(216)를 포함한다.The hospital terminal 210 includes an authentication code generator 211, an encryption key generator 212, an electronic prescription encryption unit 213, an electronic prescription transmission unit 214, an authentication code transmission unit 215, and a user authentication unit ( 216).

사용자 인증부(216)는 의사가 자신의 공인인증서에 대한 패스워드를 입력하여 사용자 인증과정을 수행하도록 한다.The user authentication unit 216 allows the doctor to enter a password for his / her authorized certificate to perform the user authentication process.

인증코드 생성부(211)는 도 1에 도시된 인증코드 생성부(111)와 동일한 기능을 수행하나 랜덤하게 생성된 인증코드를 환자 공인인증서의 공개키로 암호화하고, 의사 공인인증서의 비밀키로 전자서명한다.The authentication code generation unit 211 performs the same function as the authentication code generation unit 111 shown in FIG. 1, but encrypts the randomly generated authentication code with the public key of the patient's certificate, and uses the secret key of the doctor's certificate. do.

전자 처방전 암호부(213)는 도 1에 도시된 전자 처방전 암호부(113)와 동일한 기능을 수행하나 암호 키인 EK로 전자서명된 전자처방전을 암호화한다.The electronic prescription encryption unit 213 performs the same function as the electronic prescription encryption unit 113 shown in FIG. 1, but encrypts the electronic prescription signed with the encryption key EK.

암호키 생성부(212), 전자 처방전 전송부(214) 및 인증코드 전송부(215)에 대해서는 도 1을 통해 설명한 바와 같다.The encryption key generator 212, the electronic prescription transmitter 214, and the authentication code transmitter 215 are the same as described with reference to FIG. 1.

이동 단말기(240)는 병원 단말기(210)로부터 전자 처방전을 발급받고자 하는 환자가 사용하는 단말기로, 병원 단말기(210)로부터 전자 처방전에 해당하는 인증코드를 제공 받고, 이를 일련번호와 함께 단말기 화면에 출력한다. 이동 단말기(240)는 스마트폰, 랩탑, 태블릿 등의 다양한 단말기들일 수 있다.The mobile terminal 240 is a terminal used by a patient who wants to receive an electronic prescription from the hospital terminal 210. The mobile terminal 240 receives an authentication code corresponding to the electronic prescription from the hospital terminal 210, and displays it on the screen of the terminal together with the serial number. Output The mobile terminal 240 may be various terminals such as a smartphone, a laptop, a tablet, and the like.

이동 단말기(240)는 사용자 인증부(244), 인증코드 복호부(243), 인증코드 수신부(241) 및 인증코드 출력부(242)를 포함한다. 인증코드 수신부(241)는 병원 단말기(210)로부터 전자 처방전의 일련번호 및 암호화된 인증코드를 제공 받고, 인증코드 출력부(242)는 수신된 일련번호 및 인증코드를 화면에 출력한다.The mobile terminal 240 includes a user authentication unit 244, an authentication code decoding unit 243, an authentication code receiving unit 241, and an authentication code output unit 242. The authentication code receiving unit 241 receives the serial number and the encrypted authentication code of the electronic prescription from the hospital terminal 210, the authentication code output unit 242 outputs the received serial number and authentication code on the screen.

특히, 도 2에 도시된 예에서 사용자 인증부(244)는 환자가 자신의 공인인증서에 대한 패스워드를 입력하여 사용자 인증과정을 수행하도록 한다. 인증과정이 성공하면, 인증코드 복호부(243)는 인증코드 수신부(241)를 통해 수신한 암호화된 인증코드에 대하여 의사의 서명 검증을 수행한다. 의사의 서명 검증이 성공하면 인증코드 복호부(243)는 암호화된 인증코드를 환자 공인인증서의 비밀키로 복호화하여 인증코드 출력부(242)가 전자처방전의 일련번호 및 인증코드를 화면에 출력할 수 있도록 한다.In particular, in the example shown in FIG. 2, the user authentication unit 244 allows the patient to input a password for his / her authorized certificate to perform a user authentication process. If the authentication process is successful, the authentication code decryption unit 243 performs a doctor's signature verification on the encrypted authentication code received through the authentication code receiver 241. If the doctor's signature verification is successful, the authentication code decryption unit 243 decrypts the encrypted authentication code with the private key of the patient's certificate, and the authentication code output unit 242 may output the serial number and authentication code of the electronic prescription on the screen. Make sure

약국 단말기(230)는 이동 단말기(240)를 통해 표시된 전자 처방전의 일련번호와 인증코드를 입력 받아서 이동 단말기(240)를 사용하는 환자에게 필요한 약을 조제하기 위한 전자 처방전을 전자 처방전 서버(240)로 요청하고, 전자 처방전 서버(240)로부터 암호화된 전자 처방전을 제공 받아서 이를 복호화한다.The pharmacy terminal 230 receives the serial number and the authentication code of the electronic prescription displayed through the mobile terminal 240 and the electronic prescription server 240 to prepare the medicine for the patient using the mobile terminal 240 Request, and receives the encrypted electronic prescription from the electronic prescription server 240 to decrypt it.

약국 단말기(230)는 사용자 인증부(236), 인증코드 입력부(231), 전자 처방전 요청부(232), 전자 처방전 수신부(233), 암호키 생성부(234) 및 전자 처방전 복호부(235)를 포함한다.The pharmacy terminal 230 includes a user authentication unit 236, an authentication code input unit 231, an electronic prescription request unit 232, an electronic prescription receiver 233, an encryption key generator 234, and an electronic prescription decoder 235. It includes.

사용자 인증부(236)는 약사가 자신의 공인인증서에 대한 패스워드를 입력하여 사용자 인증과정을 수행한다. 인증과정이 성공하면 약국 단말기(230)의 인증 코드 입력부(231)를 통해 이동 단말기(240)에 출력된 전자 처방전의 일련번호 및 인증코드를 수신한다.The user authentication unit 236 performs a user authentication process by inputting a password for its own certificate. If the authentication process is successful, it receives the serial number and the authentication code of the electronic prescription output to the mobile terminal 240 through the authentication code input unit 231 of the pharmacy terminal 230.

이 때, 인증코드는 이동 단말기(240)로 전송되기 전에 환자의 공인인증서의 공개키로 암호화되고, 의사의 공인인증서의 비밀키로 전자서명되며, 이동 단말기(240)에 의해 수신된 후, 상기 의사에 대한 서명 검증을 수행하고 상기 서명 검증이 성공하는 경우 상기 환자의 공인인증서의 비밀키로 복호화된 것일 수 있다.At this time, the authentication code is encrypted with the public key of the patient's official certificate before being transmitted to the mobile terminal 240, digitally signed with the secret key of the doctor's official certificate, received by the mobile terminal 240, and then to the doctor If the signature verification is performed and the signature verification is successful, the signature verification may be decrypted with the private key of the patient's official certificate.

전자 처방전 요청부(232)는 상기 일련번호를 이용하여 전자 처방전 요청 메시지를 생성하고, 생성된 전자 처방전 요청 메시지에 대해 전자서명을 수행한다. 이후, 전자 처방전 요청부(232)는 전자 처방전 서버(220)로 전자서명된 상기 전자 처방전 요청 메시지를 전송한다.The electronic prescription request unit 232 generates an electronic prescription request message by using the serial number, and performs an electronic signature on the generated electronic prescription request message. Thereafter, the electronic prescription requester 232 transmits the electronic prescription request message electronically signed to the electronic prescription server 220.

전자 처방전 수신부(233)는 전자 처방전 서버(220)로부터 암호화된 상기 전자 처방전, 메시지 인증 코드(MAC; Message Authentication Code) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 수신한다.The electronic prescription receiver 233 receives the encrypted electronic prescription, a message authentication code (MAC) and one-time public information (OTPI) from the electronic prescription server 220.

이 때, 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 2048비트 이상의 소수, g는 Zp의 원소로서, 위수로

Figure 112012075406065-pat00013
를 갖는 생성자, R은
Figure 112012075406065-pat00014
인 난수)를 계산하여 생성된 것일 수 있다. 이 때, p의 크기는 2048비트 이상의 소수로서 예시를 하였으나, 다양한 적용 환경에 따라 p의 크기는 가변적으로 적용될 수 있다.At this time, the disposable public information is g R mod p (p is a decimal number of 2048 bits or more that determines the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00013
Constructor with R
Figure 112012075406065-pat00014
Phosphorus random number) may be generated by calculating. In this case, the size of p is illustrated as a decimal number of 2048 bits or more, but the size of p may be variably applied according to various application environments.

암호키 생성부(234)는 상기 인증코드를 이용하여 상기 일회용 공개 정보로부터 일회용 베이스 키(OTBK; One-Time Base Key)를 생성하고, 상기 일회용 베이스 키를 이용하여 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성한다.The encryption key generation unit 234 generates a one-time base key (OTBK) from the one-time public information using the authentication code, and uses the one-time base key to encrypt an encryption key (EK). And a message authentication code key (MACK).

이 때, 상기 일회용 베이스 키는 상기 일회용 공개 정보에 대하여 OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 인증코드를 입력으로 해쉬 출력한 값에

Figure 112012075406065-pat00015
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 생성될 수 있다.At this time, the one-time base key is OTPI X mod p (OTPI is the one-time disclosure information, X is the hash number outputted as the input of the serial number and the authentication code) with respect to the one-time disclosure information.
Figure 112012075406065-pat00015
It can be generated by taking the upper 16 bytes by calculating the resulting value).

전자 처방전 복호부(235)는 상기 메시지 인증 코드 키를 이용하여 암호화된 상기 전자 처방전에 대한 메시지 인증 코드 검증을 수행하고, 상기 검증 결과 무결성이 검증되면 상기 암호화 키를 이용하여 암호화된 상기 전자 처방전을 복호화한다.The electronic prescription decoding unit 235 performs a message authentication code verification on the electronic prescription encrypted using the message authentication code key. When the integrity of the verification result is verified, the electronic prescription decryption unit 235 encrypts the electronic prescription encrypted using the encryption key. Decrypt

전자 처방전 서버(220)는 병원 단말기(210)로부터 암호화된 전자 처방전 등의 정보를 제공 받아서 저장하고, 약국 단말기(230)에서 정당하게 전자 처방전을 요청하는 경우 해당 전자 처방전을 검색하여 일회용 공개 정보 등의 데이터와 함께 암호화된 전자 처방전을 약국 단말기(230)로 제공한다.The electronic prescription server 220 receives and stores information, such as an encrypted electronic prescription, from the hospital terminal 210, and if the pharmacy terminal 230 requests the electronic prescription legitimately, searches for the electronic prescription, and uses one-time public information. The electronic prescription encrypted with the data of the pharmacy terminal 230 is provided.

전자 처방전 서버(220)는 서명 검증부(224), 전자 처방전 송수신부(221), 전자 처방전 처리부(222) 및 전자 처방전 저장부(223)를 포함한다.The electronic prescription server 220 includes a signature verification unit 224, an electronic prescription transceiver 221, an electronic prescription processing unit 222, and an electronic prescription storage unit 223.

전자 처방전 송수신부(221)는 병원 단말기(210)로부터 전자 처방전의 일련번호, 암호화된 전자 처방전, 상기 전자 처방전에 상응하는 메시지 인증 코드(MAC; Message Authentication Code) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 수신하고, 약국 단말기(230)의 요청에 따라 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 송신한다.The electronic prescription transceiver 221 is a serial number of the electronic prescription from the hospital terminal 210, encrypted electronic prescription, Message Authentication Code (MAC) corresponding to the electronic prescription and one-time public information (OTPI; One- Time Public Information) and transmits the encrypted electronic prescription, the message authentication code, and the disposable public information according to a request of the pharmacy terminal 230.

서명 검증부(224)는 전자 처방전 송수신부(221)를 통해 수신한 전자처방전 요청 메시지에 대한 서명 검증을 수행한다. The signature verification unit 224 performs signature verification on the electronic prescription request message received through the electronic prescription transceiver 221.

이 때, 상기 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 2048비트 이상의 소수, g는 Zp의 원소로서, 위수로

Figure 112012075406065-pat00016
를 갖는 생성자, R은
Figure 112012075406065-pat00017
인 난수)를 계산하여 생성되고, OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 전자 처방전의 인증코드를 입력으로 해쉬 출력한 값에
Figure 112012075406065-pat00018
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 일회용 베이스 키를 생성하는데 사용될 수 있다. 이 때, p의 크기는 2048비트 이상의 소수로서 예시를 하였으나, 다양한 적용 환경에 따라 p의 크기는 가변적으로 적용될 수 있다.At this time, the disposable public information is g R mod p (p is a decimal number of 2048 bits or more to determine the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00016
Constructor with R
Figure 112012075406065-pat00017
Is generated by calculating a random number), and OTPI X mod p (OTPI is the disposable public information, X is a hash output value of the serial number and the authentication code of the electronic prescription).
Figure 112012075406065-pat00018
Can be used to generate a disposable base key by taking the top 16 bytes. In this case, the size of p is illustrated as a decimal number of 2048 bits or more, but the size of p may be variably applied according to various application environments.

전자 처방전 저장부(223)는 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 상기 일련번호에 따라 저장한다.The electronic prescription storage unit 223 stores the encrypted electronic prescription, the message authentication code and the disposable public information according to the serial number.

전자 처방전 처리부(222)는 서명 검증부(224)의 서명 검증이 성공한 경우에만 전자 처방전 저장부(223)에서 약국 단말기(230)의 요청에 상응하는 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 검색하여 검색된 결과를 전자 처방전 송수신부(221)로 제공하고, 약국 단말기(230)로 전송된 정보를 삭제한다.The electronic prescription processing unit 222 is the encrypted electronic prescription corresponding to the request of the pharmacy terminal 230 in the electronic prescription storage unit 223, the message authentication code and the only if the signature verification of the signature verification unit 224 is successful The disposable public information is searched for, and the search result is provided to the electronic prescription transceiver 221 and the information transmitted to the pharmacy terminal 230 is deleted.

이하, 본 발명의 전자 처방전 처리 기술에 대하여 보다 상세히 설명한다.
EMBODIMENT OF THE INVENTION Hereinafter, the electronic prescription processing technique of this invention is demonstrated in detail.

본 발명에서의 암호 키 생성시 디피-헬만 키 공유(Diffie-Hellman Key Sharing) 방식을 응용하기 위해 다음의 시스템 파라미터들을 가정한다.In order to apply the Diffie-Hellman Key Sharing scheme in the encryption key generation in the present invention, the following system parameters are assumed.

- p: 2048 비트 이상의 소수(prime)로서 유한 공간(finite field) Zp를 결정한다.p: determines the finite field Z p as a prime of 2048 bits or more.

- g: Zp의 원소로서 위수로

Figure 112012075406065-pat00019
를 갖는 생성자이다.g is the element of Z p ,
Figure 112012075406065-pat00019
Constructor with

위 두 시스템 파라미터들은 공개정보로서 사전에 병원 단말기와 약국 단말기가 공유하고 있을 수도 있고, 응용에 따라 무결성이 보장되는 환경에서 전자 처방전 서버에 저장되어 사용될 수도 있다. 이 때, p의 크기는 2048비트 이상의 소수로서 예시를 하였으나, 다양한 적용 환경에 따라 p의 크기는 가변적으로 적용될 수 있다.
The above two system parameters may be shared by the hospital terminal and the pharmacy terminal in advance as public information, or may be stored and used in an electronic prescription server in an environment where integrity is guaranteed depending on the application. In this case, the size of p is illustrated as a decimal number of 2048 bits or more, but the size of p may be variably applied according to various application environments.

인증서 기반 Certificate based PKIPKI 서비스가 불가능한 환경 Unserviceable Environment

병원 단말기의 인증코드 생성부는 먼저 의사에 의해 작성 및 입력된 전자 처방전을 식별하기 위한 일련번호를 생성하고, 난수발생기(RNG; Random Number Generator)에 의해 16자리 인증코드를 랜덤하게 생성한다.
The authentication code generator of the hospital terminal first generates a serial number for identifying the electronic prescription written and input by the doctor, and randomly generates a 16-digit authentication code by a random number generator (RNG).

이후, 병원 단말기의 암호 키 생성부가 실행된다. 암호 키 생성부는 난수발생기에 의해 R(

Figure 112012075406065-pat00020
)을 랜덤하게 생성하고, gR mod p 를 계산하여 일회용 공개 정보(OTPI; One-Time Public Information)로 하고 사용한다. 이후, 병원 단말기의 암호 키 생성부는 전자 처방전 일련번호와 인증코드를 입력으로 해쉬 출력하고, 그 해쉬 값에
Figure 112012075406065-pat00021
를 취한 결과 값을 X로 표기하고, OTPIX mod p 를 계산하여 상위 16바이트를 일회용 베이스 키(OTBK; One-Time Base Key)로 사용한다. 또한, 암호화 시 암호 운용모드인 CBC(Cipher Block Chaining)로 암호화하기 위한 초기 벡터(IV; Initial Vector)를 생성하기 위해 암호 키를 입력으로 해쉬(cryptographic hash algorithm) 출력하고 출력된 값 중 상위 16바이트 값을 초기 벡터로 사용한다.Thereafter, the encryption key generation unit of the hospital terminal is executed. The encryption key generator generates a R (
Figure 112012075406065-pat00020
) Is randomly generated, and g R mod p is calculated and used as one-time public information (OTPI). Thereafter, the cryptographic key generation unit of the hospital terminal outputs the hash with the input of the electronic prescription serial number and the authentication code, and the hash value
Figure 112012075406065-pat00021
The result is denoted by X, and OTPI X mod p is calculated and the upper 16 bytes are used as a one-time base key (OTBK). In addition, in order to generate an initial vector (IV) to encrypt with Cipher Block Chaining (CBC), which is an encryption operation mode during encryption, a cryptographic hash algorithm is output as an input and the top 16 bytes of the output values are output. Use the value as the initial vector.

실시예에 따라, 난수발생기에 의해 암호 키의 전체 크기인 16바이트 키를 랜덤하게 생성하여 일회용 베이스 키로 사용할 수도 있다. 이 때, 일련번호와 인증코드를 입력으로 PKCS(Public-Key Cryptography System) #5에서 정의된 KDF(Key Derivation Function)을 사용하여 중간 키(ISK; Intermediate Secret Key)와 CBC 암호화 시 사용되는 초기 벡터값(IV; Initial Vector)을 유도할 수 있다. 이후, 중간 키와 일회용 베이스 키인 OTBK와 비트 단위 배타적 논리합(exclusive OR) 연산을 취한 16바이트 결과 값을 일회용 공개 정보(OTPI; One-Time Public Information)로 하고 사용할 수 있다. 여기서, 일련번호와 인증 코드로부터 중간 키 및 IV의 유도는 PKCS #5를 사용하는 경우를 예로 들었으나, 유도 방법은 이에 국한하지 않고 응용에 따라 다양한 방법이 적용될 수 있다.
According to an embodiment, the random number generator may randomly generate a 16-byte key that is the total size of the encryption key and use it as a disposable base key. In this case, an initial vector used for encrypting an intermediate secret key (ISK) and a CBC by using a Key Derivation Function (KDF) defined in Public-Key Cryptography System (PKCS) # 5 as a serial number and an authentication code. A value IV can be derived. Thereafter, the 16-byte result value obtained by performing an exclusive OR operation on an intermediate key and an OTBK, which is a one-time base key, may be used as one-time public information (OTPI). Here, the derivation of the intermediate key and the IV from the serial number and the authentication code is an example of using PKCS # 5, but the derivation method is not limited thereto, and various methods may be applied according to the application.

또한, 일회용 베이스 키(OTBK)로부터 암호화 키(EK; Encryption Key)와 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 유도한다. OTBK로부터 EK와 MACK의 유도 방법은 ANSI X9.24 Part 1의 방식을 따를 수 있다. 다만, OTBK로부터 EK 및 MACK의 유도에는 다양한 방식이 적용될 수 있다.
In addition, an encryption key (EK) and a message authentication code key (MACK) are derived from the disposable base key (OTBK). Derivation of EK and MACK from OTBK can follow the method of ANSI X9.24 Part 1. However, various methods may be applied to derivation of EK and MACK from OTBK.

이후, 병원 단말기의 전자 처방전 암호부는 암호 키인 EK로 전자 처방전을 국내 블록 암호화 표준 알고리즘인 SEED의 CBC 암호화 방식을 사용하여 암호화한다. 이 때, IV가 사용될 수 있다. 또한, 암호화된 전자 처방전에 대한 MAC(Message Authentication Code) 값을 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 적용하여 생성한다. MAC의 생성 방식은 ANSI X9.19 표준 방식을 준용할 수 있다. 인증서의 암호화에는 SEED 이외의 다른 국제적 표준 블록 암호화 알고리즘이 적용될 수도 있다.
Thereafter, the electronic prescription encryption unit of the hospital terminal encrypts the electronic prescription with the encryption key EK using the domestic block encryption standard algorithm SBC CBC encryption method. At this time, IV may be used. In addition, MAC (Message Authentication Code) value for the encrypted electronic prescription is generated by applying a Message Authentication Code Key (MACK). MAC generation method can conform to ANSI X9.19 standard method. The encryption of the certificate may be applied to international standard block encryption algorithms other than SEED.

이후, 병원 단말기의 전자 처방전 전송부는 전자 처방전의 일련번호, 암호화된 전자 처방전, MAC, 그리고 공개정보인 OTPI를 전자 처방전 서버로 전송한다.
Thereafter, the electronic prescription transmitter of the hospital terminal transmits the serial number of the electronic prescription, the encrypted electronic prescription, the MAC, and OTPI, which is public information, to the electronic prescription server.

이후, 병원 단말기의 인증코드 전송부는 전자 처방전의 일련번호와 인증코드를 환자의 이동 단말기로 전송한다. 전송 방법은 SMS를 통해 전송할 수도 있고, 1 또는 2차원 바코드를 활용하여 이미지 형태로 MMS 메시지를 통해 전송할 수도 있다.
Thereafter, the authentication code transmission unit of the hospital terminal transmits the serial number and the authentication code of the electronic prescription to the patient's mobile terminal. The transmission method may be transmitted through SMS, or may be transmitted through an MMS message in the form of an image by using a 1 or 2D barcode.

전자 처방전 서버의 전자 처방전 송수신부는 병원 단말기로부터 전송된 자료를 수신하고 전자 처방전 저장부를 통해 저장한다. 이 때, 전자 처방전 저장부는 저장되는 정보에 대해 유효기간 설정을 할 수 있고, 유효기간이 경과하면 저장된 정보가 자동 삭제될 수 있다.
The electronic prescription transceiver of the electronic prescription server receives the data transmitted from the hospital terminal and stores through the electronic prescription storage. In this case, the electronic prescription storage unit may set an expiration date for the stored information, and the stored information may be automatically deleted when the expiration date has elapsed.

환자는 개인의 자율적 선택에 의해 약국을 선택하여 방문하고, 이동 단말기의 출력부를 실행하여 전자 처방전의 일련번호 및 인증코드를 화면에 출력한다.
The patient selects and visits the pharmacy by autonomous selection of the individual, and executes an output unit of the mobile terminal to output the serial number and authentication code of the electronic prescription on the screen.

이후, 약국 단말기의 인증코드 입력부를 통해 이동 단말기에 출력된 전자 처방전의 일련번호 및 인증코드를 수신한다. 이 때, 인증코드 입력부는 사용자가 직접 단말기에 일련번호 및 인증코드를 입력 받는 방식으로 동작할 수도 있고, 카메라를 구비하여 바코드 형태의 일련번호 및 인증코드를 촬영하는 방식으로 동작할 수도 있다.
Thereafter, the serial number and authentication code of the electronic prescription outputted to the mobile terminal are received through the authentication code input unit of the pharmacy terminal. In this case, the authentication code input unit may operate in a manner that the user directly inputs the serial number and the authentication code to the terminal, or may be provided by a camera to shoot the serial number and the authentication code in the form of a barcode.

이후, 약국 단말기의 전자 처방전 요청부는 일련번호와 함께 전자 처방전 요청 메시지를 전자 처방전 전송 서버로 전송한다.
Thereafter, the electronic prescription request unit of the pharmacy terminal transmits the electronic prescription request message together with the serial number to the electronic prescription transmission server.

전자 처방전 송수신부를 통해 수신한 전자 처방전 요청 메시지에 대하여, 전자 처방전 서버의 전자 처방전 처리부는 전자 처방전 저장부 내 일련번호와 일치하는 해당 암호화된 전자 처방전이 존재하는지 검색한다. 일치하는 전자 처방전 데이터가 존재할 경우 암호화된 전자 처방전, 메시지 인증 코드, 그리고 일회용 공개 정보 자료를 약국 단말기로 전송한다. 이후, 해당 전자 처방전 서버의 전자 처방전 처리부는 전자 처방전 저장부 내 해당 일련번호에 해당되는 모든 자료를 삭제하고, 해당 일련번호의 전자 처방전이 처리되었음을 나타내는 로그를 생성하여 전자 처방전 저장부에 저장한다. 여기서, 로그에는 전송 시간 정보, 수신처 정보를 포함하는 전자 처방전 요청 메시지 등이 포함될 수 있으며, 응용에 따라 다양한 정보가 포함될 수 있다.
With respect to the electronic prescription request message received through the electronic prescription transceiver, the electronic prescription processing unit of the electronic prescription server searches for the existence of the corresponding encrypted electronic prescription that matches the serial number in the electronic prescription storage unit. If there is matching electronic prescription data, the encrypted electronic prescription, the message authentication code, and the disposable public information data are sent to the pharmacy terminal. Thereafter, the electronic prescription processing unit of the electronic prescription server deletes all data corresponding to the serial number in the electronic prescription storage unit, and generates a log indicating that the electronic prescription of the serial number has been processed and stored in the electronic prescription storage unit. Here, the log may include an electronic prescription request message including transmission time information and destination information, and may include various information according to an application.

약국 단말기의 전자 처방전 수신부는 전자 처방전 서버가 전송한 자료를 수신한다. 이후, 약국 단말기의 암호 키 생성부는 일련번호와 인증코드를 입력으로 해쉬 출력하고 그 해쉬 값에

Figure 112012075406065-pat00022
를 취한 결과 값 X를 계산하고, OTPIX mod p 를 계산하여 상위 16바이트를 일회용 베이스 키인 OTBK로 하고 사용한다. The electronic prescription receiver of the pharmacy terminal receives the data transmitted by the electronic prescription server. After that, the encryption key generation unit of the pharmacy terminal hash output by inputting the serial number and the authentication code to the hash value
Figure 112012075406065-pat00022
Calculate the value X, compute OTPI X mod p, and use the upper 16 bytes as the disposable base key OTBK.

병원 단말기의 암호키 생성부에서 난수발생기에 의해 16바이트 일회용 베이스 키를 생성하고, 이를 이용한 배타적 논리합 연산에 의해 일회용 공개 정보를 생성한 경우, 약국 단말기의 암호 키 생성부는 일련번호와 인증코드를 입력으로 PKCS #5에 정의된 KDF(Key Derivation Function)을 사용하여 중간 키(ISK)와 IV(Initial Vector)를 유도하고, 중간 키와 일회용 공개 정보인 OTPI와 비트 단위 배타적 논리합(exclusive OR) 연산을 취한 16바이트 결과 값을 일회용 베이스 키(OTBK)로 하고 사용할 수도 있다.
When the encryption key generation unit of the hospital terminal generates a 16-byte disposable base key by a random number generator and generates disposable public information by an exclusive OR operation using the same, the encryption key generation unit of the pharmacy terminal inputs a serial number and an authentication code. By using the Key Derivation Function (KDF) defined in PKCS # 5, we derive intermediate keys (ISKs) and IVs (Initial Vectors), and perform OTPI and bitwise exclusive OR operations on intermediate keys and one-off public information. The 16-byte result value taken may be used as a disposable base key (OTBK).

또한, OTBK로부터 암호화 키 EK와 MACK를 유도한다. OTBK로부터 EK와 MACK의 유도 방법은 병원 단말기의 경우와 같다.
It also derives encryption keys EK and MACK from OTBK. The method of deriving EK and MACK from OTBK is the same as that of the hospital terminal.

이후, 약국 단말기의 전자 처방전 복호부는 먼저 MACK로 암호화된 전자 처방전의 MAC 검증을 수행함으로써 전송된 자료의 무결성(integrity)을 검증한다. 검증이 성공하면, 최종적으로 EK로 암호화된 전자처방전을 복호화함으로써 환자에게 약을 처방할 수 있다.
Thereafter, the electronic prescription decoder of the pharmacy terminal first verifies the integrity of the transmitted data by performing MAC verification of the electronic prescription encrypted with MACK. If the validation is successful, the patient can be prescribed medication by decrypting the final EK-encoded electronic prescription.

약국에서의 약 처방 이후, 처리된 전자 처방전은 약국 내 별도의 스토리지에 저장될 수 있으며, 파일 암호화 또는 데이터베이스 암호화 등의 여러 스토리지 보안 기술을 적용하여 일정 기한 내 저장 보관할 수 있다. 이러한 스토리지 및 데이터 보호에 관하여 본 발명에서는 특정 기술에 국한하여 기술하지 않으며, 다양한 보호 기술이 응용될 수 있다.
After prescribing the drug at the pharmacy, the processed electronic prescription may be stored in a separate storage in the pharmacy, and may be stored and stored within a certain period by applying various storage security technologies such as file encryption or database encryption. With respect to such storage and data protection, the present invention is not limited to a specific technology, and various protection technologies may be applied.

인증서 기반 Certificate based PKIPKI 서비스가 가능한Serviceable 환경 Environment

먼저, 병원 단말기의 사용자 인증부를 통해 해당 의사는 자신의 공인인증서에 대한 패스워드를 입력하여 사용자 인증과정을 수행한다. 인증과정이 성공하면, 해당 의사에 의해 작성 및 입력된 전자 처방전에 대해 전자서명을 수행한다. 공인인증서 기반 전자서명 방식은 국내 표준 서명 알고리즘인 KCDSA(Korea Certification-based Digital Signature Algorithm)를 사용할 수 있다. 하지만, 본 발명의 기술사상이 KCDSA에 국한되는 것은 아니며, 안전하다고 알려진 다양한 서명 알고리즘이 사용될 수 있다.
First, the doctor through the user authentication unit of the hospital terminal performs a user authentication process by entering a password for its own certificate. If the authentication process is successful, an electronic signature is performed for the electronic prescription written and entered by the doctor. The digital certificate method based on the accredited certificate may use the Korea Certification-based Digital Signature Algorithm (KCDSA), a national standard signature algorithm. However, the technical idea of the present invention is not limited to KCDSA, and various signature algorithms known to be safe may be used.

병원 단말기의 인증코드 생성부는 전자 처방전을 식별하기 위한 일련번호를 생성한다. 또한, 난수발생기에 의해 16자리 인증코드를 랜덤하게 생성한다. 이후, 인증코드 생성부는 랜덤하게 생성된 인증코드를 환자 공인인증서의 공개키로 암호화하고, 의사 공인인증서의 비밀키로 전자서명한다.
Authentication code generation unit of the hospital terminal generates a serial number for identifying the electronic prescription. In addition, the random number generator randomly generates a 16-digit authentication code. Thereafter, the authentication code generation unit encrypts the randomly generated authentication code with the public key of the patient certificate, and digitally signs it with the secret key of the doctor certificate.

이후, 병원 단말기의 암호 키 생성부가 실행된다. 암호 키 생성부의 실행은 PKI 서비스가 불가능한 일반적인 환경과 동일하게 수행된다.
Thereafter, the encryption key generation unit of the hospital terminal is executed. Execution of the encryption key generation unit is performed in the same manner as in a general environment in which PKI service is not available.

또한, OTBK로부터 암호화 키(EK)와 메시지 인증 코드 키(MACK)를 유도한다. 유도방법은 PKI 서비스가 불가능한 일반적인 환경과 동일하게 수행된다.
In addition, an encryption key (EK) and a message authentication code key (MACK) are derived from the OTBK. The derivation method is performed in the same way as the general environment where PKI service is not available.

이후, 병원 단말기의 전자 처방전 암호부는 암호 키인 EK로 전자 서명된 전자 처방전을 암호화하고, 암호화된 전자 처방전에 대한 MAC 값을 MACK를 적용하여 생성한다. 암호화 및 MAC 값 생성은 PKI 서비스가 불가능한 일반적인 환경과 동일하게 수행된다.
Thereafter, the electronic prescription encryption unit of the hospital terminal encrypts the electronic prescription electronically signed with the encryption key EK, and generates a MAC value for the encrypted electronic prescription by applying MACK. Encryption and MAC value generation are performed in the same way as in general environment where PKI service is not available.

이후, 병원 단말기의 전자 처방전 전송부는 전자 처방전의 일련번호, 암호화된 전자 처방전, MAC 그리고 공개정보인 OTPI를 전자 처방전 서버로 전송한다.
Thereafter, the electronic prescription transmitter of the hospital terminal transmits the serial number of the electronic prescription, the encrypted electronic prescription, the MAC, and OTPI, which is public information, to the electronic prescription server.

이후, 병원 단말기의 인증코드 전송부는 전자 처방전의 일련번호와 인증코드를 환자의 이동 단말기로 전송한다. 전송 방법은 SMS를 통하여 전송될 수도 있고, 1 또는 2차원 바코드를 활용한 이미지 형태의 MMS를 통하여 전송될 수도 있다.
Thereafter, the authentication code transmission unit of the hospital terminal transmits the serial number and the authentication code of the electronic prescription to the patient's mobile terminal. The transmission method may be transmitted through SMS, or may be transmitted through an MMS in the form of an image using one or two-dimensional barcodes.

전자 처방전 서버의 전자 처방전 송수신부는 병원 단말기로부터 전송된 자료를 수신하고 전자 처방전 저장부를 통해 저장한다. 이 때, 전송된 자료는 설정된 유효기간 동안만 저장되고, 유효기간이 지나면 자동으로 삭제될 수 있다.
The electronic prescription transceiver of the electronic prescription server receives the data transmitted from the hospital terminal and stores through the electronic prescription storage. At this time, the transmitted data is stored only during the set validity period, and can be automatically deleted after the validity period has passed.

환자는 개인의 자율적 선택에 의해 임의의 약국에 방문하고, 이동 단말기의 사용자 인증부를 통해 자신의 공인인증서에 대한 패스워드를 입력하여 사용자 인증과정을 수행한다. 인증과정이 성공하면, 이동 단말기의 인증코드 수신부를 통해 수신한 암호화된 인증코드에 대하여, 인증코드 복호부의 실행과정에서 서명 검증이 수행된다. 또한, 서명 검증이 성공하면 인증코드 복호부는 암호화된 인증코드를 환자 공인인증서의 비밀키로 복호화하고, 이동 단말기의 인증코드 출력부는 전자 처방전의 일련번호 및 인증코드를 화면에 출력한다.
The patient visits any pharmacy by autonomous selection of the individual, and enters a password for his / her authorized certificate through the user authentication unit of the mobile terminal to perform a user authentication process. If the authentication process succeeds, signature verification is performed in the process of executing the authentication code decryption unit for the encrypted authentication code received through the authentication code receiver of the mobile terminal. In addition, if the signature verification is successful, the authentication code decryption unit decrypts the encrypted authentication code with the private key of the patient authentication certificate, and the authentication code output unit of the mobile terminal outputs the serial number and authentication code of the electronic prescription on the screen.

이후, 약국 단말기의 사용자 인증부를 통해 해당 약사는 자신의 공인인증서에 대한 패스워드를 입력하여 사용자 인증과정을 수행한다. 인증과정이 성공하면 약국 단말기의 인증코드 입력부를 통해 이동 단말기에 출력된 전자 처방전의 일련번호 및 인증코드를 수신한다.
Thereafter, the pharmacist performs a user authentication process by inputting a password for his / her official certificate through the user authentication unit of the pharmacy terminal. If the authentication process is successful, the serial number and authentication code of the electronic prescription outputted to the mobile terminal are received through the authentication code input unit of the pharmacy terminal.

이후, 약국 단말기의 전자 처방전 요청부는 일련번호와 함께 전자처방전 요청 메시지를 생성하고, 생성된 전자 처방전 요청 메시지에 대해 전자서명을 수행한다. 이후, 전자 처방전 요청부는 전자서명된 전자처방전 요청 메시지를 전자 처방전 전송 서버로 전송한다.
Thereafter, the electronic prescription request unit of the pharmacy terminal generates the electronic prescription request message with the serial number, and performs the electronic signature on the generated electronic prescription request message. Thereafter, the electronic prescription requesting unit transmits the electronically signed electronic prescription request message to the electronic prescription transmission server.

전자 처방전 서버는 전자 처방전 송수신부를 통해 수신한 전자 처방전 요청 메시지에 대해, 서명 검증부가 실행되어 서명 검증을 수행한다. 서명 검증이 성공하면, 전자 처방전 서버의 전자 처방전 처리부는 전자 처방전 저장부 내 일련번호와 일치하는 암호화된 전자 처방전이 존재하는지 검색한다. 일치하는 전자 처방전 데이터가 존재할 경우, 전자 처방전 서버는 암호화된 전자 처방전, MAC, 그리고 OTPI 자료를 약국 단말기로 전송한다. 이후, 전자 처방전 서버의 전자 처방전 처리부는 전자 처방전 저장부 내의 전송된 전자 처방전에 해당하는 일련번호와 관련된 모든 자료를 삭제하고, 해당 일련번호의 전자 처방전이 처리되었음을 나타내는 로그를 생성하여 전자 처방전 저장부에 저장한다. 여기서, 로그는 전송 시간 정보, 수신처 정보를 포함하는 전자 처방전 요청 메시지 등을 포함할 수 있으며, 응용에 따라 다양한 정보를 포함할 수 있다.
The electronic prescription server performs signature verification on the electronic prescription request message received through the electronic prescription transmission and reception unit. If the signature verification succeeds, the electronic prescription processing unit of the electronic prescription server searches for the existence of an encrypted electronic prescription that matches the serial number in the electronic prescription storage. If there is a matching electronic prescription data, the electronic prescription server sends the encrypted electronic prescription, MAC and OTPI data to the pharmacy terminal. Thereafter, the electronic prescription processing unit of the electronic prescription server deletes all data related to the serial number corresponding to the transmitted electronic prescription in the electronic prescription storage unit, generates a log indicating that the electronic prescription of the serial number has been processed, and the electronic prescription storage unit Store in Here, the log may include transmission time information, an electronic prescription request message including destination information, and the like, and may include various information according to an application.

약국 단말기의 전자 처방전 수신부는 전자 처방전 서버가 전송한 자료를 수신한다. 이후, 약국 단말기의 암호 키 생성부는 일회용 베이스 키인 OTBK, 암호화 키 EK 및 MACK를 계산한다. 각 키들 계산 방식은 PKI 서비스가 불가능한 일반적인 환경에서의 방식과 동일하다.
The electronic prescription receiver of the pharmacy terminal receives the data transmitted by the electronic prescription server. After that, the encryption key generation unit of the pharmacy terminal calculates the disposable base key OTBK, encryption key EK and MACK. Each key calculation method is the same as the general environment where PKI service is not available.

이후, 약국 단말기의 전자 처방전 복호부는 먼저 MACK로 암호화된 전자처방전의 MAC 검증을 수행함으로써 전송된 자료의 무결성(integrity)을 검증한다. 검증이 성공하면, EK로 암호화된 전자 처방전을 복호화한다. 또한, 복호화된 전자 처방전에 대한 의사의 전자 서명을 검증하고, 서명 검증이 성공하면 최종적으로 환자에게 약을 처방할 수 있다.
Thereafter, the electronic prescription decoder of the pharmacy terminal first verifies the integrity of the transmitted data by performing MAC verification of the MACK-encrypted electronic prescription. If the verification is successful, the electronic prescription encrypted with EK is decrypted. In addition, the electronic signature of the doctor for the decrypted electronic prescription can be verified, and if the signature verification is successful, the patient can be finally prescribed the medicine.

약국에서의 약 처방 이후 처리된 전자 처방전은 약국 내 별도의 스토리지에 저장될 수 있으며, 파일 암호화 또는 데이터베이스 암호화 등의 여러 가지 스토리지 보안 기술을 적용하여 일정 기한 동안 저장될 수 있다.
Electronic prescriptions processed after drug prescription in a pharmacy may be stored in a separate storage in the pharmacy, and may be stored for a certain period of time by applying various storage security techniques such as file encryption or database encryption.

도 3은 본 발명의 일실시예에 따른 전자 처방전 처리 방법을 나타낸 동작 흐름도이다.3 is a flowchart illustrating an electronic prescription processing method according to an embodiment of the present invention.

도 3을 참조하면, 본 발명의 일실시예에 따른 전자 처방전 처리 방법은 먼저 병원 단말기가 전자 처방전에 상응하는 일련번호와 인증코드를 생성한다(S311).Referring to Figure 3, the electronic prescription processing method according to an embodiment of the present invention first generates a serial number and the authentication code corresponding to the electronic prescription in the hospital terminal (S311).

또한, 병원 단말기는 생성된 일련번호와 인증코드를 이용하여 암호화 키 등 필요한 키들을 생성한다(S312).In addition, the hospital terminal generates necessary keys such as an encryption key using the generated serial number and the authentication code (S312).

이후, 병원 단말기는 단계(S312)에서 생성된 암호화 키를 이용하여 전자 처방전을 암호화하고 메시지 인증 코드 키를 이용하여 메시지 인증 코드를 생성한다(S313).Thereafter, the hospital terminal encrypts the electronic prescription using the encryption key generated in step S312 and generates a message authentication code using the message authentication code key (S313).

이 때, 단계(S313)는 상기 암호 키를 입력으로 해쉬(cryptographic hash algorithm) 출력된 값 중 상위 16바이트 값을 초기 벡터(IV; Initial Vector)로 하여 CBC(Cipher Block Chaining) 암호화 방식에 의해 상기 전자 처방전을 암호화할 수 있다.In this case, the step S313 may be performed by the Cipher Block Chaining (CBC) encryption method using an upper vector of the output value of the cryptographic hash algorithm as an initial vector (IV). Can encrypt electronic prescriptions.

이후, 병원 단말기는 상기 일련번호 및 상기 인증코드를 환자의 이동 단말기로 전송하여 상기 일련번호 및 상기 인증코드가 상기 환자가 약국에서 상기 전자 처방전을 요청하는데 사용되도록 한다(S314).Thereafter, the hospital terminal transmits the serial number and the authentication code to the mobile terminal of the patient so that the serial number and the authentication code are used for the patient to request the electronic prescription at the pharmacy (S314).

이 때, 인증코드는 이동 단말기로 전송되기 전에 환자의 공인인증서의 공개키로 암호화되고, 의사의 공인인증서의 비밀키로 전자서명될 수 있다.At this time, the authentication code is encrypted with the public key of the patient's official certificate before being transmitted to the mobile terminal, it can be digitally signed with the secret key of the doctor's official certificate.

또한, 병원 단말기는 전자 처방전 서버로 일련번호, 암호화된 전자 처방전, 메시지 인증 코드(MAC) 및 일회용 공개 정보(OTPI)를 전송한다(S315).In addition, the hospital terminal transmits the serial number, encrypted electronic prescription, message authentication code (MAC) and one-time public information (OTPI) to the electronic prescription server (S315).

전자 처방전 서버는 수신된 일련번호, 암호화된 전자 처방전, 메시지 인증 코드(MAC) 및 일회용 공개 정보(OTPI)를 저장한다(S321).The electronic prescription server stores the received serial number, encrypted electronic prescription, message authentication code (MAC) and one-time public information (OTPI) (S321).

이동 단말기가 일련번호 및 인증코드를 수신하여 화면에 표시하고(S316), 약국 단말기가 이동 단말기의 화면에 표시된 일련번호 및 인증코드를 입력 받아서(S331) 전자 처방전 요청 메시지를 생성하여 전자 처방전 서버로 송신한다(S332).The mobile terminal receives the serial number and the authentication code displayed on the screen (S316), the pharmacy terminal receives the serial number and the authentication code displayed on the screen of the mobile terminal (S331) generates an electronic prescription request message to the electronic prescription server It transmits (S332).

이동 단말기는 암호화된 인증코드를 수신하여 의사에 대한 서명 검증을 수행한 후 서명 검증이 성공하면 환자의 공인인증서의 비밀키로 암호화된 인증코드를 복호화할 수도 있다.The mobile terminal receives the encrypted authentication code, performs signature verification on the doctor, and if the signature verification succeeds, the mobile terminal may decrypt the authentication code encrypted with the private key of the patient's public certificate.

전자 처방전 서버는 전자 처방전 요청에 상응하는 일련번호로 암호화된 전자 처방전을 검색한다(S333).The electronic prescription server searches for an electronic prescription encrypted with a serial number corresponding to the electronic prescription request (S333).

전자 처방전 서버는 일련번호와 일치하는 암호화된 전자 처방전 및 관련 정보를 약국 단말기로 전송한 후 해당 자료를 DB에서 삭제하고 로그를 저장한다(S334).The electronic prescription server transmits the encrypted electronic prescription and related information matching the serial number to the pharmacy terminal, deletes the corresponding data from the DB and stores the log (S334).

약국 단말기는 전자 처방전 서버로부터 수신한 일회용 공개 정보 등을 이용하여 암호화 키 및 메시지 인증 코드 키를 생성한다(S335).The pharmacy terminal generates an encryption key and a message authentication code key using disposable public information received from the electronic prescription server (S335).

또한, 약국 단말기는 메시지 인증 코드 키를 이용하여 MAC 검증을 수행하고 암호화 키를 이용하여 전자 처방전을 복호화한다(S336).In addition, the pharmacy terminal performs MAC verification using the message authentication code key and decrypts the electronic prescription using the encryption key (S336).

이 때, 단계(S336)는 전자 처방전을 복호화하기 전에 상기 약국 단말기가 상기 일회용 공개 정보를 이용하여 상기 일회용 베이스 키를 복원하는 단계; 복원된 상기 일회용 베이스 키를 이용하여 상기 메시지 인증 코드 키를 복원하는 단계; 및 상기 메시지 인증 코드 키를 이용하여 암호화된 상기 전자 처방전의 메시지 인증 코드 검증을 수행하는 단계를 포함할 수 있다.In this case, step S336 may include: restoring the disposable base key by the pharmacy terminal using the disposable public information before decrypting the electronic prescription; Restoring the message authentication code key using the restored one-time base key; And performing a message authentication code verification of the electronic prescription encrypted using the message authentication code key.

이 때, 단계(S336)는 상기 메시지 인증 코드 검증이 성공하여 무결성(integrity)이 검증된 경우에만 상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원할 수 있다.In this case, step S336 may restore the electronic prescription by decrypting the electronic prescription only when the message authentication code verification is successful and the integrity is verified.

전자 처방전을 이용하여 약국에서는 환자에게 필요한 약을 처방한다(S337).Using the electronic prescription, the pharmacy prescribes the medicine required by the patient (S337).

도 4는 도 3에 도시된 암호화 키 생성 단계의 일 예를 나타낸 동작 흐름도이다.4 is a flowchart illustrating an example of an encryption key generation step illustrated in FIG. 3.

도 4을 참조하면, 먼저 병원 단말기가 일회용 공개 정보(OTPI; One-Time Public Information)을 생성한다(S410).Referring to FIG. 4, first, a hospital terminal generates one-time public information (OTPI) (S410).

이 때, 상기 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 2048비트 이상의 소수, g는 Zp의 원소로서, 위수로

Figure 112012075406065-pat00023
를 갖는 생성자, R은
Figure 112012075406065-pat00024
인 난수)를 계산하여 생성될 수 있다. 이 때, p의 크기는 2048비트 이상의 소수로서 예시를 하였으나, 다양한 적용 환경에 따라 p의 크기는 가변적으로 적용될 수 있다.At this time, the disposable public information is g R mod p (p is a decimal number of 2048 bits or more to determine the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00023
Constructor with R
Figure 112012075406065-pat00024
Phosphorus random number). In this case, the size of p is illustrated as a decimal number of 2048 bits or more, but the size of p may be variably applied according to various application environments.

또한, 병원 단말기는 상기 일회용 공개 정보를 이용하여 일회용 베이스 키(OTBK; One-Time Base Key)를 생성한다(S420).In addition, the hospital terminal generates a one-time base key (OTBK) using the disposable public information (S420).

이 때, 상기 일회용 베이스 키는 상기 일회용 공개 정보에 대하여 OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 인증코드를 입력으로 해쉬 출력한 값에

Figure 112012075406065-pat00025
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 생성될 수 있다.At this time, the one-time base key is OTPI X mod p (OTPI is the one-time disclosure information, X is the hash number outputted as the input of the serial number and the authentication code) with respect to the one-time disclosure information.
Figure 112012075406065-pat00025
It can be generated by taking the upper 16 bytes by calculating the resulting value).

또한, 병원 단말기는 상기 일회용 베이스 키를 이용하여 상기 전자 처방전을 암호화하기 위한 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성한다(S430).In addition, the hospital terminal generates an encryption key (EK) and a message authentication code key (MACK) for encrypting the electronic prescription using the disposable base key (S430).

이 때, OTBK로부터 EK와 MACK의 유도 방법은 ANSI X9.24 Part 1의 방식을 따를 수 있다. 다만, OTBK로부터 EK 및 MACK의 유도에는 다양한 방식이 적용될 수 있다.At this time, the method of deriving EK and MACK from OTBK may follow the method of ANSI X9.24 Part 1. However, various methods may be applied to derivation of EK and MACK from OTBK.

본 발명은 전자 처방전 암호화 시 E2E 암호화(End-To-End Encryption) 방식을 사용함으로써 통신주체들 간의 전자 처방전 송/수신시 전자 처방전의 기밀성을 제공할 뿐만 아니라 전자 처방전 서버에 암호화된 전자 처방전만이 존재하도록 함으로써 전자 처방전 서버에서의 정보 유출을 방지하고, 암호화된 전자 처방전에 대한 MAC을 부가함으로써 무결성을 제공한다. 또한, Diffie-Hellman 방식의 Key Sharing 기법을 효율적으로 응용함으로써 병원에서의 전자 처방전 발급 이후 환자가 자율적으로 임의의 약국을 선택하여 안전하게 약을 처방 받을 수 있도록 한다.
The present invention not only provides the confidentiality of the electronic prescription when the electronic prescription is transmitted / received between communication subjects by using E2E encryption (End-To-End Encryption) method when encrypting the electronic prescription, but only the electronic prescription encrypted in the electronic prescription server. Existing prevents information leakage from the electronic prescription server and provides integrity by adding MAC for the encrypted electronic prescription. In addition, by efficiently applying the Diffie-Hellman type Key Sharing technique, after issuing an electronic prescription in the hospital, the patient can autonomously select any pharmacy and receive the medicine safely.

이상에서와 같이 본 발명에 따른 전자 처방전 처리 방법 및 이를 이용한 장치는 상기한 바와 같이 설명된 실시예들의 구성과 방법이 한정되게 적용될 수 있는 것이 아니라, 상기 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다.As described above, the electronic prescription processing method and the apparatus using the same according to the present invention are not limited to the configuration and method of the embodiments described as described above, the embodiments are implemented so that various modifications can be made. All or part of the examples may be optionally combined.

110: 병원 단말기
111: 인증코드 생성부
113: 전자 처방전 암호부
114: 전자 처방전 전송부
115: 인증코드 전송부
120: 전자 처방전 서버
121: 전자 처방전 송수신부
122: 전자 처방전 처리부
123: 전자 처방전 저장부
130: 약국 단말기
131: 인증코드 입력부
132: 전자 처방전 요청부
133: 전자 처방전 수신부
134: 암호키 생성부
135: 전자 처방전 복호부
140: 이동 단말기
141: 인증코드 수신부
142: 인증코드 출력부
110: hospital terminal
111: authentication code generation unit
113: electronic prescription password book
114: electronic prescription transmitter
115: authentication code transmission unit
120: electronic prescription server
121: electronic prescription transceiver
122: electronic prescription processing unit
123: electronic prescription storage
130: pharmacy terminal
131: authentication code input unit
132: electronic prescription request unit
133: electronic prescription receiver
134: encryption key generation unit
135: electronic prescription decoder
140: mobile terminal
141: authentication code receiving unit
142: authentication code output unit

Claims (19)

병원 단말기가, 발급하고자 하는 전자 처방전의 일련번호와 인증코드를 생성하는 단계;
상기 병원 단말기가, 일회용 베이스 키(OTBK; One-Time Base Key) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 생성하는 단계;
상기 병원 단말기가, 상기 일회용 베이스 키를 이용하여 상기 전자 처방전을 암호화하기 위한 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성하는 단계;
상기 병원 단말기가, 상기 암호화 키를 이용하여 상기 전자 처방전을 암호화하는 단계;
상기 병원 단말기가, 상기 메시지 인증 코드 키를 이용하여 상기 전자 처방전에 대한 메시지 인증 코드(MAC; Message Authentication Code)를 생성하는 단계;
상기 병원 단말기가, 상기 일련번호 및 상기 인증코드를 환자의 이동 단말기로 전송하여 상기 일련번호 및 상기 인증코드가 상기 환자가 약국에서 상기 전자 처방전을 요청하는데 사용되도록 하는 단계; 및
상기 병원 단말기가, 상기 일련번호, 암호화된 상기 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 전자 처방전 서버로 전송하는 단계
를 포함하는 것을 특징으로 하는 전자 처방전 처리 방법.
Generating, by the hospital terminal, a serial number and an authentication code of an electronic prescription to be issued;
Generating, by the hospital terminal, a one-time base key (OTBK) and one-time public information (OTPI);
Generating, by the hospital terminal, an encryption key (EK) and a message authentication code key (MACK) for encrypting the electronic prescription using the disposable base key;
Encrypting, by the hospital terminal, the electronic prescription using the encryption key;
Generating, by the hospital terminal, a message authentication code (MAC) for the electronic prescription using the message authentication code key;
Sending, by the hospital terminal, the serial number and the authentication code to the patient's mobile terminal such that the serial number and the authentication code are used by the patient to request the electronic prescription at the pharmacy; And
Sending, by the hospital terminal, the serial number, the encrypted electronic prescription, the message authentication code, and the disposable public information to an electronic prescription server
Electronic prescription processing method comprising a.
청구항 1에 있어서,
상기 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 소수, g는 Zp의 원소로서, 위수로
Figure 112012075406065-pat00026
를 갖는 생성자, R은
Figure 112012075406065-pat00027
인 난수)를 계산하여 생성되고, 상기 일회용 베이스 키는 상기 일회용 공개 정보에 대하여 OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 인증코드를 입력으로 해쉬 출력한 값에
Figure 112012075406065-pat00028
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 생성되는 것을 특징으로 하는 전자 처방전 처리 방법.
The method according to claim 1,
The disposable public information is g R mod p (p is a prime to determine the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00026
Constructor with R
Figure 112012075406065-pat00027
Is generated by calculating a random number), and the one-time base key is OTPI X mod p (OTPI is the one-time disclosure information and X is the hash number outputted as the input of the serial number and the authentication code) with respect to the one-time disclosure information.
Figure 112012075406065-pat00028
Electronic prescription processing method characterized in that it is generated by taking the upper 16 bytes by calculating a).
청구항 2에 있어서,
상기 전자 처방전을 암호화하는 단계는
상기 암호 키를 입력으로 해쉬(cryptographic hash algorithm) 출력된 값 중 상위 16바이트 값을 초기 벡터(IV; Initial Vector)로 하여 CBC(Cipher Block Chaining) 암호화 방식에 의해 상기 전자 처방전을 암호화하는 것을 특징으로 하는 전자 처방전 처리 방법.
The method according to claim 2,
Encrypting the electronic prescription
Encrypting the electronic prescription by CBC (Cipher Block Chaining) encryption method using the upper 16 byte value among the values outputted from the cryptographic hash algorithm as an initial vector (IV) Electronic prescription processing method.
청구항 3에 있어서,
상기 인증코드는
상기 이동 단말기로 전송되기 전에 상기 환자의 공인인증서의 공개키로 암호화되고, 의사의 공인인증서의 비밀키로 전자서명되는 것을 특징으로 하는 전자 처방전 처리 방법.
The method according to claim 3,
The authentication code is
The electronic prescription processing method, characterized in that the encrypted before the transmission to the mobile terminal with the public key of the patient's public certificate, and digitally signed with the private key of the doctor's public certificate.
청구항 4에 있어서,
상기 인증코드는
상기 이동 단말기에 의해 수신된 후, 상기 의사에 대한 서명 검증을 수행하고 상기 서명 검증이 성공하면 상기 환자의 공인인증서의 비밀키로 복호화되는 것을 특징으로 하는 전자 처방전 처리 방법.
The method of claim 4,
The authentication code is
And after receiving by the mobile terminal, performing signature verification on the doctor and, if the signature verification succeeds, decrypted with the secret key of the patient's authorized certificate.
청구항 5에 있어서,
상기 전자 처방전 처리 방법은
상기 이동 단말기가 상기 일련번호 및 상기 인증코드를 화면에 출력하는 단계;
상기 약국에 구비된 약국 단말기가 상기 일련번호 및 상기 인증코드를 입력 받는 단계;
상기 약국 단말기가 상기 전자 처방전 서버로 상기 일련번호에 상응하는 상기 전자 처방전을 요청하는 단계;
상기 전자 처방전 서버가 상기 일련번호를 이용하여, 암호화된 상기 전자 처방전을 검색하는 단계;
상기 전자 처방전 서버가 상기 일련번호에 상응하는 암호화된 상기 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 상기 약국 단말기로 전송하는 단계;
상기 약국 단말기가 상기 일회용 공개 정보를 이용하여 상기 암호화 키를 생성하는 단계; 및
상기 약국 단말기가 상기 암호화 키를 이용하여 암호화된 상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원하는 단계
를 더 포함하는 것을 특징으로 하는 전자 처방전 처리 방법.
The method according to claim 5,
The electronic prescription processing method
Outputting, by the mobile terminal, the serial number and the authentication code to a screen;
Receiving, by the pharmacy terminal provided in the pharmacy, the serial number and the authentication code;
Requesting, by the pharmacy terminal, the electronic prescription corresponding to the serial number to the electronic prescription server;
Searching, by the electronic prescription server, the encrypted electronic prescription using the serial number;
Transmitting, by the electronic prescription server, the encrypted electronic prescription corresponding to the serial number, the message authentication code, and the disposable public information to the pharmacy terminal;
Generating, by the pharmacy terminal, the encryption key using the disposable public information; And
Restoring the electronic prescription by decrypting the electronic prescription encrypted using the encryption key by the pharmacy terminal;
Electronic prescription processing method comprising a further.
청구항 6에 있어서,
상기 전자 처방전 처리 방법은
상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원하는 단계 이전에, 상기 약국 단말기가 상기 일회용 공개 정보를 이용하여 상기 일회용 베이스 키를 복원하는 단계;
복원된 상기 일회용 베이스 키를 이용하여 상기 메시지 인증 코드 키를 복원하는 단계; 및
상기 메시지 인증 코드 키를 이용하여 암호화된 상기 전자 처방전의 메시지 인증 코드 검증을 수행하는 단계를 더 포함하고,
상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원하는 단계는
상기 메시지 인증 코드 검증이 성공하여 무결성(integrity)이 검증된 경우에만 상기 전자 처방전을 복호화하여 상기 전자 처방전을 복원하는 것을 특징으로 하는 전자 처방전 처리 방법.
The method of claim 6,
The electronic prescription processing method
Before the step of restoring the electronic prescription by decrypting the electronic prescription, the pharmacy terminal restoring the disposable base key using the disposable public information;
Restoring the message authentication code key using the restored one-time base key; And
Performing message verification code verification of the electronic prescription encrypted using the message verification code key,
Restoring the electronic prescription by decrypting the electronic prescription
And when the message authentication code verification succeeds and integrity is verified, the electronic prescription is decoded to restore the electronic prescription.
청구항 7에 있어서,
상기 병원 단말기는 상기 일회용 베이스 키 및 상기 일회용 공개 정보를 생성하기 이전에 상기 의사의 공인인증서에 대한 패스워드 입력을 통해 상기 의사에 대한 사용자 인증을 수행하여 상기 의사에 대한 사용자 인증이 성공하면 상기 전자처방전에 대해 전자서명을 수행하고,
상기 이동 단말기는 상기 환자의 공인인증서에 대한 패스워드 입력을 통해 상기 환자에 대한 사용자 인증을 수행하여 상기 환자에 대한 사용자 인증이 성공하면 상기 일련번호 및 복호화된 상기 인증코드를 상기 화면에 출력하고,
상기 약국 단말기는 약사의 공인인증서에 대한 패스워드 입력을 통해 상기 약사에 대한 사용자 인증을 수행하여 상기 약사에 대한 사용자 인증이 성공하면 상기 일련번호를 포함하는 전자 처방전 요청 메시지를 생성하고, 생성된 전자 처방전 요청 메시지에 전자서명을 수행하여 전자 처방전 서버로 전송하는 것을 특징으로 하는 전자 처방전 처리 방법.
The method of claim 7,
The hospital terminal performs the user authentication for the doctor by inputting a password for the doctor's official certificate before generating the disposable base key and the disposable public information, and if the user authentication for the doctor is successful, the electronic prescription Perform an electronic signature on,
The mobile terminal performs a user authentication for the patient through a password input for the patient's official certificate, and if the user authentication for the patient is successful, and outputs the serial number and the decrypted authentication code on the screen,
The pharmacy terminal performs a user authentication for the pharmacist by inputting a password for the certified certificate of the pharmacist, if the user authentication is successful for the pharmacist generates an electronic prescription request message including the serial number, the generated electronic prescription An electronic prescription processing method characterized in that the electronic signature to the request message sent to the electronic prescription server.
전자 처방전의 일련번호와 인증코드를 생성하는 인증코드 생성부;
일회용 베이스 키(OTBK; One-Time Base Key) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 생성하고, 상기 일회용 베이스 키를 이용하여 상기 전자 처방전을 암호화하기 위한 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성하는 암호키 생성부;
상기 암호화 키를 이용하여 상기 전자 처방전을 암호화하는 전자 처방전 암호부;
상기 메시지 인증 코드 키를 이용하여 상기 전자 처방전에 대하여 생성된 메시지 인증 코드(MAC; Message Authentication Code), 상기 일련번호, 암호화된 상기 전자 처방전 및 상기 일회용 공개 정보를 전자 처방전 서버로 전송하는 전자 처방전 전송부; 및
상기 일련번호 및 상기 인증코드를 환자의 이동 단말기로 전송하는 인증코드 전송부
를 포함하는 것을 특징으로 하는 병원 단말기.
Authentication code generation unit for generating a serial number and the authentication code of the electronic prescription;
An encryption key (EK) for generating a one-time base key (OTBK) and one-time public information (OTPI) and encrypting the electronic prescription using the one-time base key. And an encryption key generator for generating a message authentication code key (MACK);
An electronic prescription encryption unit for encrypting the electronic prescription using the encryption key;
Electronic prescription transmission for transmitting a message authentication code (MAC), the serial number, the encrypted electronic prescription, and the disposable public information generated for the electronic prescription using the message authentication code key to an electronic prescription server. part; And
Authentication code transmission unit for transmitting the serial number and the authentication code to the mobile terminal of the patient
Hospital terminal comprising a.
청구항 9에 있어서,
상기 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 소수, g는 Zp의 원소로서, 위수로
Figure 112012075406065-pat00029
를 갖는 생성자, R은
Figure 112012075406065-pat00030
인 난수)를 계산하여 생성되고, 상기 일회용 베이스 키는 상기 일회용 공개 정보에 대하여 OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 인증코드를 입력으로 해쉬 출력한 값에
Figure 112012075406065-pat00031
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 생성되는 것을 특징으로 하는 병원 단말기.
The method of claim 9,
The disposable public information is g R mod p (p is a prime to determine the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00029
Constructor with R
Figure 112012075406065-pat00030
Is generated by calculating a random number), and the one-time base key is OTPI X mod p (OTPI is the one-time disclosure information and X is the hash number outputted as the input of the serial number and the authentication code) with respect to the one-time disclosure information.
Figure 112012075406065-pat00031
Hospital terminal, characterized in that it is generated by taking the upper 16 bytes by calculating a).
청구항 10에 있어서,
상기 전자 처방전 암호부는
상기 암호 키를 입력으로 해쉬(cryptographic hash algorithm) 출력된 값 중 상위 16바이트 값을 초기 벡터(IV; Initial Vector)로 하여 CBC(Cipher Block Chaining) 암호화 방식에 의해 상기 전자 처방전을 암호화하는 것을 특징으로 하는 병원 단말기.
The method of claim 10,
The electronic prescription password section
Encrypting the electronic prescription by CBC (Cipher Block Chaining) encryption method using the upper 16 byte value among the values outputted from the cryptographic hash algorithm as an initial vector (IV) Hospital terminal.
청구항 11에 있어서,
상기 인증코드는
상기 이동 단말기로 전송되기 전에 상기 환자의 공인인증서의 공개키로 암호화되고, 의사의 공인인증서의 비밀키로 전자서명되며, 상기 이동 단말기에 의해 수신된 후, 상기 의사에 대한 서명 검증을 수행하고 상기 서명 검증이 성공하면 상기 환자의 공인인증서의 비밀키로 복호화되는 것을 특징으로 하는 병원 단말기.
The method of claim 11,
The authentication code is
Before being transmitted to the mobile terminal, encrypted with the public key of the patient's public certificate, digitally signed with the private key of the doctor's public certificate, and after received by the mobile terminal, perform signature verification for the doctor and verify the signature. If successful, the hospital terminal, characterized in that the decrypted with the secret key of the patient's official certificate.
청구항 12에 있어서,
상기 메시지 인증 코드는
약국 단말기가 복원한 상기 메시지 인증 코드 키를 이용하여 메시지 인증 코드 검증을 수행하는데 사용되는 것을 특징으로 하는 병원 단말기.
The method of claim 12,
The message verification code is
And the pharmacy terminal is used to perform message verification code verification using the message verification code key restored.
이동 단말기를 통해 표시된 전자 처방전의 일련번호와 인증코드를 입력 받는 인증코드 입력부;
상기 일련번호를 이용하여, 전자 처방전 서버로 상기 전자 처방전을 요청하는 전자 처방전 요청부;
상기 전자 처방전 서버로부터 암호화된 상기 전자 처방전, 메시지 인증 코드(MAC; Message Authentication Code) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 수신하는 전자 처방전 수신부;
상기 인증코드를 이용하여 상기 일회용 공개 정보로부터 일회용 베이스 키(OTBK; One-Time Base Key)를 생성하고, 상기 일회용 베이스 키를 이용하여 암호화 키(EK; Encryption Key) 및 메시지 인증 코드 키(MACK; Message Authentication Code Key)를 생성하는 암호키 생성부; 및
상기 메시지 인증 코드 키를 이용하여 암호화된 상기 전자 처방전에 대한 메시지 인증 코드 검증을 수행하고, 상기 검증 결과 무결성이 검증되면 상기 암호화 키를 이용하여 암호화된 상기 전자 처방전을 복호화하는 전자 처방전 복호부
를 포함하는 것을 특징으로 하는 약국 단말기.
Authentication code input unit for receiving the serial number and the authentication code of the electronic prescription displayed through the mobile terminal;
An electronic prescription request unit which requests the electronic prescription to an electronic prescription server using the serial number;
An electronic prescription receiver configured to receive the encrypted electronic prescription, a message authentication code (MAC) and one-time public information (OTPI) from the electronic prescription server;
The one-time base key (OTBK) is generated from the one-time public information using the authentication code, and an encryption key (EK) and a message authentication code key (MACK) are used using the one-time base key. Encryption key generation unit for generating a Message Authentication Code Key); And
An electronic prescription decoder which performs message authentication code verification on the electronic prescription encrypted using the message authentication code key, and decrypts the electronic prescription encrypted using the encryption key when the verification result integrity is verified
Pharmacy terminal comprising a.
청구항 14에 있어서,
상기 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 소수, g는 Zp의 원소로서, 위수로
Figure 112012075406065-pat00032
를 갖는 생성자, R은
Figure 112012075406065-pat00033
인 난수)를 계산하여 생성된 것이고, 상기 일회용 베이스 키는 상기 일회용 공개 정보에 대하여 OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 인증코드를 입력으로 해쉬 출력한 값에
Figure 112012075406065-pat00034
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 생성되는 것을 특징으로 하는 약국 단말기.
The method according to claim 14,
The disposable public information is g R mod p (p is a prime to determine the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00032
Constructor with R
Figure 112012075406065-pat00033
Is generated by calculating a random number), and the one-time base key is OTPI X mod p (OTPI is the one-time disclosure information and X is the hash number outputted as the input of the serial number and the authentication code) with respect to the one-time disclosure information.
Figure 112012075406065-pat00034
Pharmacy terminal, characterized in that generated by taking the upper 16 bytes by calculating the result value.
청구항 15에 있어서,
상기 인증코드는
상기 이동 단말기로 전송되기 전에 환자의 공인인증서의 공개키로 암호화되고, 의사의 공인인증서의 비밀키로 전자서명되며, 상기 이동 단말기에 의해 수신된 후, 상기 의사에 대한 서명 검증을 수행하고 상기 서명 검증이 성공하면 상기 환자의 공인인증서의 비밀키로 복호화되는 것을 특징으로 하는 약국 단말기.
16. The method of claim 15,
The authentication code is
Before being transmitted to the mobile terminal, encrypted with the public key of the patient's public certificate, digitally signed with the private key of the doctor's public certificate, and received by the mobile terminal, the signature verification for the doctor is performed and the signature verification is performed. If successful, the pharmacy terminal, characterized in that decrypted with the secret key of the patient's official certificate.
병원 단말기로부터 전자 처방전의 일련번호, 암호화된 전자 처방전, 상기 전자 처방전에 상응하는 메시지 인증 코드(MAC; Message Authentication Code) 및 일회용 공개 정보(OTPI; One-Time Public Information)를 수신하고, 약국 단말기의 요청에 따라 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 송신하는 전자 처방전 송수신부;
상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 상기 일련번호에 따라 저장하는 전자 처방전 저장부; 및
상기 전자 처방전 저장부에서 상기 약국 단말기의 요청에 상응하는 상기 암호화된 전자 처방전, 상기 메시지 인증 코드 및 상기 일회용 공개 정보를 검색하여 검색된 결과를 상기 전자 처방전 송수신부로 제공하고, 상기 약국 단말기로 전송된 정보를 삭제하는 전자 처방전 처리부
를 포함하는 것을 특징으로 하는 전자 처방전 서버.
Receiving a serial number of an electronic prescription, an encrypted electronic prescription, a message authentication code (MAC) corresponding to the electronic prescription and a one-time public information (OTPI) from the hospital terminal, An electronic prescription transmission / reception unit configured to transmit the encrypted electronic prescription, the message authentication code, and the disposable public information upon request;
An electronic prescription storage unit for storing the encrypted electronic prescription, the message authentication code, and the disposable public information according to the serial number; And
The electronic prescription storage unit searches for the encrypted electronic prescription, the message authentication code, and the disposable public information corresponding to the request of the pharmacy terminal, and provides the searched result to the electronic prescription transceiver and the information transmitted to the pharmacy terminal. Electronic prescription processor to delete
Electronic prescription server comprising a.
청구항 17에 있어서,
상기 일회용 공개 정보는 gR mod p (p는 유한공간 Zp를 결정하는 소수, g는 Zp의 원소로서, 위수로
Figure 112012075406065-pat00035
를 갖는 생성자, R은
Figure 112012075406065-pat00036
인 난수)를 계산하여 생성되고, OTPIX mod p(OTPI는 상기 일회용 공개 정보, X는 상기 일련번호와 상기 전자 처방전의 인증코드를 입력으로 해쉬 출력한 값에
Figure 112012075406065-pat00037
를 취한 결과 값)를 계산하여 상위 16바이트를 취하여 일회용 베이스 키를 생성하는데 사용되는 것을 특징으로 하는 전자 처방전 서버.
18. The method of claim 17,
The disposable public information is g R mod p (p is a prime to determine the finite space Z p , g is an element of Z p ,
Figure 112012075406065-pat00035
Constructor with R
Figure 112012075406065-pat00036
Is generated by calculating a random number), and OTPI X mod p (OTPI is the disposable public information, X is a hash output value of the serial number and the authentication code of the electronic prescription).
Figure 112012075406065-pat00037
Calculating a result value), and taking the upper 16 bytes to generate a disposable base key.
청구항 18에 있어서,
상기 인증코드는
이동 단말기로 전송되기 전에 환자의 공인인증서의 공개키로 암호화되고, 의사의 공인인증서의 비밀키로 전자서명되며, 상기 이동 단말기에 의해 수신된 후, 상기 의사에 대한 서명 검증을 수행하고 상기 서명 검증이 성공하면 상기 환자의 공인인증서의 비밀키로 복호화되는 것을 특징으로 하는 전자 처방전 서버.
19. The method of claim 18,
The authentication code is
Before being sent to the mobile terminal, encrypted with the public key of the patient's certificate, digitally signed with the private key of the doctor's certificate, and after being received by the mobile terminal, signature verification is performed on the doctor and the signature verification is successful. When the electronic prescription server, characterized in that the decrypted with the secret key of the patient's official certificate.
KR1020120103205A 2012-09-18 2012-09-18 Method of managing electronic prescription based on one-time public information and apparatus using the same KR101347124B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020120103205A KR101347124B1 (en) 2012-09-18 2012-09-18 Method of managing electronic prescription based on one-time public information and apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120103205A KR101347124B1 (en) 2012-09-18 2012-09-18 Method of managing electronic prescription based on one-time public information and apparatus using the same

Publications (1)

Publication Number Publication Date
KR101347124B1 true KR101347124B1 (en) 2014-01-03

Family

ID=50144388

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120103205A KR101347124B1 (en) 2012-09-18 2012-09-18 Method of managing electronic prescription based on one-time public information and apparatus using the same

Country Status (1)

Country Link
KR (1) KR101347124B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018124501A1 (en) * 2016-12-28 2018-07-05 주식회사 라이프시맨틱스 Method for providing emergency medical information to third party in emergency situation
CN112003697A (en) * 2020-08-25 2020-11-27 成都卫士通信息产业股份有限公司 Encryption and decryption method and device for cryptographic module, electronic equipment and computer storage medium
KR20210088794A (en) * 2020-01-06 2021-07-15 한국전자통신연구원 System and method for verifying vulnerability test results in consideration of industrial control system operating environment
KR20220125567A (en) * 2021-03-05 2022-09-14 순천향대학교 산학협력단 System and method for sharing patient's medical data in medical cloud environment
KR102573773B1 (en) * 2022-09-19 2023-09-04 주식회사 파이디지털헬스케어 DIGITAL THERAPEUTICS PRESCRIPTION DATA EXCHANGE SYSTEM AND METHOD APPLYING DE-IDENTIFICATION of PERSONAL INFORMATION

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020041225A (en) * 2000-11-27 2002-06-01 이계철 System for secure transmission of electronic prescriptions and its Method
KR20120029759A (en) * 2010-09-17 2012-03-27 에스케이 텔레콤주식회사 System and server for operating electronic prescription, pharmacy communication apparatus, patient communication apparatus, and control method therefor
KR20120046908A (en) * 2010-11-01 2012-05-11 에스케이 텔레콤주식회사 Electronic prescription system, apparatus, mobile communication terminal and method thereof
KR20120076635A (en) * 2010-12-08 2012-07-09 에스케이 텔레콤주식회사 Method and system for providing electric prescription service, client device and apparatus for electric prescription service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020041225A (en) * 2000-11-27 2002-06-01 이계철 System for secure transmission of electronic prescriptions and its Method
KR20120029759A (en) * 2010-09-17 2012-03-27 에스케이 텔레콤주식회사 System and server for operating electronic prescription, pharmacy communication apparatus, patient communication apparatus, and control method therefor
KR20120046908A (en) * 2010-11-01 2012-05-11 에스케이 텔레콤주식회사 Electronic prescription system, apparatus, mobile communication terminal and method thereof
KR20120076635A (en) * 2010-12-08 2012-07-09 에스케이 텔레콤주식회사 Method and system for providing electric prescription service, client device and apparatus for electric prescription service

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018124501A1 (en) * 2016-12-28 2018-07-05 주식회사 라이프시맨틱스 Method for providing emergency medical information to third party in emergency situation
KR20180076910A (en) * 2016-12-28 2018-07-06 (주)메디컬로직 A method of transferring medical records to the third part in an emergency
KR20210088794A (en) * 2020-01-06 2021-07-15 한국전자통신연구원 System and method for verifying vulnerability test results in consideration of industrial control system operating environment
KR102378989B1 (en) * 2020-01-06 2022-03-30 한국전자통신연구원 System and method for verifying vulnerability test results in consideration of industrial control system operating environment
CN112003697A (en) * 2020-08-25 2020-11-27 成都卫士通信息产业股份有限公司 Encryption and decryption method and device for cryptographic module, electronic equipment and computer storage medium
CN112003697B (en) * 2020-08-25 2023-09-29 成都卫士通信息产业股份有限公司 Encryption and decryption method and device for cryptographic module, electronic equipment and computer storage medium
KR20220125567A (en) * 2021-03-05 2022-09-14 순천향대학교 산학협력단 System and method for sharing patient's medical data in medical cloud environment
KR102605087B1 (en) 2021-03-05 2023-11-23 순천향대학교 산학협력단 System and method for sharing patient's medical data in medical cloud environment
KR102573773B1 (en) * 2022-09-19 2023-09-04 주식회사 파이디지털헬스케어 DIGITAL THERAPEUTICS PRESCRIPTION DATA EXCHANGE SYSTEM AND METHOD APPLYING DE-IDENTIFICATION of PERSONAL INFORMATION

Similar Documents

Publication Publication Date Title
US10439811B2 (en) Method for securing a private key on a mobile device
US10785019B2 (en) Data transmission method and apparatus
US20210246824A1 (en) Method and apparatus for securing communications using multiple encryption keys
JP4866863B2 (en) Security code generation method and user device
KR101800737B1 (en) Control method of smart device for self-identification, recording medium for performing the method
CN110213044B (en) Quantum-computation-resistant HTTPS signcryption communication method and system based on multiple asymmetric key pools
EP2845141B1 (en) Method and system for activation
US20090323935A1 (en) Pseudo public key encryption
KR101347124B1 (en) Method of managing electronic prescription based on one-time public information and apparatus using the same
CN107078906A (en) Public key encryp
WO2017050152A1 (en) Password security system adopted by mobile apparatus and secure password entering method thereof
CN105656881B (en) A kind of electronic health record can verify that outsourcing storage and retrieval system and method
CN109299618B (en) Quantum-resistant computing cloud storage method and system based on quantum key card
JP4028849B2 (en) Communication system, portable terminal, and program
CN114785527B (en) Data transmission method, device, equipment and storage medium
EP4283549A1 (en) Payment service implementation method and device
KR101388452B1 (en) Method of migrating certificate to mobile terminal using certificate transmission server based on one-time public information and apparatus using the same
KR101912443B1 (en) Public key based encryption method and key generation server
US11924337B2 (en) Sensitive data management system
JP6701011B2 (en) Terminal registration method and terminal registration system
KR101595056B1 (en) System and method for data sharing of intercloud enviroment
KR101793528B1 (en) Certificateless public key encryption system and receiving terminal
Xu et al. A decentralized pseudonym scheme for cloud-based eHealth systems
CN113114458A (en) Encryption certificate generation method, decryption method, encryption certificate generation device, decryption device and encryption certificate system
KR20170120898A (en) Apparatus for confirming data and method for confirming data using the same

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: 20161221

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20180117

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20181226

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20191226

Year of fee payment: 7