KR20090035381A - Secure user session managing method under web environment and recording medium recorded program executing it - Google Patents

Secure user session managing method under web environment and recording medium recorded program executing it Download PDF

Info

Publication number
KR20090035381A
KR20090035381A KR1020070100637A KR20070100637A KR20090035381A KR 20090035381 A KR20090035381 A KR 20090035381A KR 1020070100637 A KR1020070100637 A KR 1020070100637A KR 20070100637 A KR20070100637 A KR 20070100637A KR 20090035381 A KR20090035381 A KR 20090035381A
Authority
KR
South Korea
Prior art keywords
client
server
authentication value
random number
key
Prior art date
Application number
KR1020070100637A
Other languages
Korean (ko)
Other versions
KR100969196B1 (en
Inventor
양대헌
맹영재
강전일
Original Assignee
인하대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 인하대학교 산학협력단 filed Critical 인하대학교 산학협력단
Priority to KR1020070100637A priority Critical patent/KR100969196B1/en
Priority to US11/965,941 priority patent/US20090094372A1/en
Publication of KR20090035381A publication Critical patent/KR20090035381A/en
Application granted granted Critical
Publication of KR100969196B1 publication Critical patent/KR100969196B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

A user session managing method and a recording medium recording a program by using an authentication algorithm of trial-response method on web are provided to protect the session of the user by applying authentication algorithm to HTTP(HyperText Transfer Protocol). A server calculates a first server authentication value by using a sharing key stored in a server and random number(S11). The server newly produces the random number. The server uses the shared key stored in the random number and server and the second server authenticator is calculated(S15). The server including random number transmits the HTTP response to the client. The HTTP request including server is the cookie from the client is received. The cookie comprises the client authentication value. By using the random number included in the shared key stored in client and the HTTP response which client is transmitted, the client authentication value is calculated.

Description

웹 환경에서의 안전한 사용자 세션 관리 방법 및 이를 수행하는 프로그램이 기록된 기록매체{Secure user session managing method under web environment and recording medium recorded program executing it}Secure user session managing method under web environment and recording medium recorded program executing it}

본 발명은 웹 환경에서의 안전한 사용자 세션 관리 방법에 관한 것이다. The present invention relates to a method for secure user session management in a web environment.

일반적으로 웹 환경은 개방형 환경으로 불특정 다수의 사용자가 접속하여 웹 서비스를 받는다. 웹 서비스에서 세션이란 상태 정보를 유지하지 않는 HTTP(hypertext transfer protocol: 인터넷에서, 웹 서버와 사용자의 인터넷 브라우저 사이에 문서를 전송하기 위해 사용되는 통신 규약) 프로토콜에서 한 사용자가 연속적으로 요청하는 일련의 서비스 요구를 처리하기 위하여 서버(server)와 클라이언트(client)에서 저장하고 주고 받는 정보를 의미한다. In general, the web environment is an open environment in which a large number of unspecified users access and receive web services. In web services, a session is a series of consecutive requests from a user in the hypertext transfer protocol (HTTP) protocol, which is used to transfer documents between a web server and a user's Internet browser. Refers to information stored and exchanged between a server and a client in order to process a service request.

웹 환경에서 사용자의 세션을 관리하기 위하여 기존에는 클라이언트가 가진 쿠키(cookie)를 이용하여 사용자를 구분하거나 인증하였다. 일례로, 쿠키에 사용자의 IP, 해쉬된 사용자의 패스워드, 전자 서명을 유지하는 방법이 있다. In order to manage a user's session in a web environment, the user has been previously identified or authenticated using a cookie of the client. For example, a cookie may contain a user's IP, a hashed user's password, and a digital signature.

하지만, 클라이언트가 가진 쿠키는 HTTP 요청(HTTP request) 때마다 서버에 평문 형태로 자동 전송되기 때문에 쿠키에 포함된 정보가 공격자(attacker)에게 노출되는 문제점이 있다. 그리고 IP 스푸핑(spoofing)이나 오프라인 사전단어 공격(offline dictionary attack)에 취약하여 쿠키를 이용하여 사용자의 세션을 보호하는데 근본적인 해결책이 될 수 없는 문제점이 있다. However, since the cookie of the client is automatically sent to the server in plain text every HTTP request, the information contained in the cookie is exposed to an attacker. In addition, there is a problem that cannot be a fundamental solution in protecting a user's session by using a cookie because it is vulnerable to IP spoofing or offline dictionary attack.

즉, 사용자의 세션 유지에 사용되는 쿠키는 도청(sniffing) 등을 통해 쉽게 노출될 수 있다. 이를 방지하기 위한 액티브X(ActiveX)는 사용자에게 부담이 되거나 편리성을 제공하지 못하는 문제점이 있다. 또한, 액티브X 자체의 설치에 문제가 발생하는 경우에는 웹 서비스에 접근조차 불가능한 경우도 발생한다. That is, the cookie used to maintain the session of the user can be easily exposed through sniffing or the like. ActiveX to prevent this has a problem that does not burden the user or provide convenience. Also, if you have a problem installing ActiveX itself, you may not even be able to access Web services.

본 발명은 시도-응답(challenge-response) 방식의 인증 알고리즘을 HTTP 프로토콜에 적용하여 사용자의 세션 보호가 가능한 사용자 세션 관리 방법 및 이를 수행하는 프로그램이 기록된 기록매체를 제공한다. The present invention provides a user session management method capable of protecting a user's session by applying a challenge-response authentication algorithm to the HTTP protocol, and a recording medium on which a program for performing the same is recorded.

또한, 본 발명은 웹 브라우저에서 비밀키를 저장하기 위하여 쿠키가 아닌 다른 저장 공간을 이용함으로써 평문 형태로 자동 전송되는 종래 쿠키의 단점을 극복한 사용자 세션 관리 방법 및 이를 수행하는 프로그램이 기록된 기록매체를 제공한다. The present invention also provides a method for managing user sessions overcoming the shortcomings of conventional cookies, which are automatically transmitted in plain text by using a storage space other than a cookie to store a secret key in a web browser, and a recording medium on which a program for performing the same is recorded. To provide.

또한, 본 발명은 HTTP 프로토콜에 시도-응답 방식을 적용할 경우 사용자의 행동패턴 또는 네트워크의 상황에 따라 공유하는 난수가 동기화되지 않는 경우 공 유키의 재검증 루틴을 추가한 오류를 줄일 수 있는 사용자 세션 관리 방법을 제공한다. In addition, when the challenge-response method is applied to the HTTP protocol, the present invention can reduce an error in which a shared key revalidation routine is added when the random number shared by the user's behavior pattern or the network situation is not synchronized. Provide management methods.

또한, 본 발명은 문턱 시간을 설정하여 동시다발적인 HTTP 요청에 대해서도 유연하게 응답 가능한 사용자 세션 관리 방법을 제공한다. In addition, the present invention provides a user session management method that can flexibly respond to simultaneous HTTP requests by setting a threshold time.

본 발명의 일 측면에 따르면, 웹 환경에서 네트워크를 통해 클라이언트와 연결된 서버에서 상기 클라이언트와의 사용자 세션을 관리하는 방법이 제공된다. According to an aspect of the present invention, a method for managing a user session with a client in a server connected to the client via a network in a web environment is provided.

사용자 세션 관리 방법은, 상기 서버가 이전에 생성한 난수와 상기 서버에 저장된 공유키를 이용하여 제1 서버 인증값을 계산하는 단계; 난수를 새로 생성하는 단계; 상기 난수와 상기 서버에 저장된 공유키를 이용하여 제2 서버 인증값을 계산하는 단계; 상기 난수를 포함하는 HTTP 응답(HTTP response)을 상기 클라이언트에 전송하는 단계; 상기 클라이언트로부터 쿠키(cookie)를 포함하는 HTTP 요청(HTTP request)을 전송받는 단계-여기서, 상기 쿠키는 클라이언트 인증값을 포함하고, 상기 클라이언트 인증값은 상기 클라이언트에 저장된 공유키와 상기 클라이언트가 전송받은 HTTP 응답에 포함된 난수를 이용하여 계산됨-; 및 상기 제1 서버 인증값 및 상기 제2 서버 인증값 중 어느 하나와 상기 클라이언트 인증값을 비교하여 상기 클라이언트의 송신자 인증의 성공 또는 실패를 결정하는 단계를 포함한다. The user session management method includes: calculating a first server authentication value using a random number previously generated by the server and a shared key stored in the server; Generating a new random number; Calculating a second server authentication value using the random number and the shared key stored in the server; Sending an HTTP response including the random number to the client; Receiving an HTTP request including a cookie from the client, wherein the cookie includes a client authentication value, wherein the client authentication value is a shared key stored in the client and the client received Calculated using a random number included in the HTTP response; And comparing the client authentication value with any one of the first server authentication value and the second server authentication value to determine success or failure of sender authentication of the client.

여기서, 상기 서버는 상기 클라이언트로부터의 사용자 로그인 과정에서 상기 공유키를 상기 클라이언트와 공유할 수 있다. Here, the server may share the shared key with the client during a user login process from the client.

그리고 상기 결정 단계는, 상기 클라이언트 인증값과 상기 제1 서버 인증값이 동일하고 상기 HTTP 요청의 도착 시점이 직전 HTTP 요청의 도착 시점으로부터 소정 시간 경과 이전인 경우 상기 송신자 인증이 성공한 것으로 결정할 수 있다. 상기 송신자 인증이 성공한 경우 상기 제2 서버 인증값의 계산에 이용된 난수를 HTTP 응답에 포함시켜 상기 클라이언트에 전송하는 단계를 더 포함할 수 있다. The determining may include determining that the sender authentication succeeds when the client authentication value and the first server authentication value are the same and the arrival time of the HTTP request is a predetermined time elapsed from the arrival time of the previous HTTP request. If the sender authentication is successful, the method may further include including a random number used to calculate the second server authentication value in an HTTP response and transmitting the same to the client.

한편, 상기 결정 단계는, 상기 클라이언트 인증값과 상기 제2 서버 인증값이 동일한 경우 상기 송신자 인증이 성공한 것으로 결정하되, 난수를 새로 생성하는 단계; 상기 제2 서버 인증값을 상기 제1 서버 인증값에 복사하는 단계; 상기 새로 생성된 난수 및 상기 서버에 저장된 공유키를 이용하여 상기 제2 서버 인증값을 갱신하는 단계; 및 상기 새로 생성된 난수를 HTTP 응답에 포함시켜 상기 클라이언트에 전송하는 단계를 더 포함할 수 있다. Meanwhile, the determining may include determining that the sender authentication succeeds when the client authentication value and the second server authentication value are the same, but generating a new random number; Copying the second server authentication value to the first server authentication value; Updating the second server authentication value using the newly generated random number and the shared key stored in the server; And including the newly generated random number in an HTTP response and transmitting the same to the client.

또한, 상기 결정 단계는, 상기 클라이언트 인증값이 상기 제1 서버 인증값 및 상기 제2 서버 인증값과 동일하지 않은 경우 상기 송신자 인증이 실패한 것으로 결정할 수 있다. 상기 난수와, 상기 클라이언트가 상기 난수 및 상기 클라이언트에 저장된 공유키를 이용하여 계산한 새로운 클라이언트 인증값을 즉시 HTTP 요청하도록 하는 실행코드를 포함하는 HTTP 응답을 상기 클라이언트에 전송하는 단계를 더 포함할 수 있다. 상기 난수와 상기 실행 코드를 포함하는 HTTP 응답의 전송 단계는 소정 횟수 동안 반복할 수 있다. 상기 소정 횟수를 반복한 이후에 소정 시간 동안 상기 난수와 상기 실행 코드를 포함하는 HTTP 응답의 전송 단계를 반복할 수 있다. 상기 소정 시간이 경과한 후에 상기 사용자 세션을 삭제시키는 단계를 더 포함할 수 있다. The determining may include determining that the sender authentication has failed when the client authentication value is not the same as the first server authentication value and the second server authentication value. And transmitting an HTTP response to the client, the HTTP response including the random number and an execution code that causes the client to immediately request a new client authentication value calculated using the random number and the shared key stored in the client. have. The transmitting of the HTTP response including the random number and the execution code may be repeated for a predetermined number of times. After repeating the predetermined number of times, the transmitting of the HTTP response including the random number and the execution code may be repeated for a predetermined time. The method may further include deleting the user session after the predetermined time elapses.

상기 제1 서버 인증값 및 상기 제2 서버 인증값은 상기 서버에 저장된 공유키와 키 변형 인수를 이용하여 생성된 서버 비밀키 및 상기 난수를 인수로 하는 일방향 함수로 계산될 수 있다. 상기 HTTP 응답을 상기 클라이언트에 전송하는 단계는 상기 키 변형 인수를 상기 HTTP 응답에 더 포함하여 전송할 수 있다. 상기 클라이언트 인증값은 상기 클라이언트에 저장된 공유키와 상기 키 변형 인수를 이용하여 생성된 클라이언트 비밀키 및 상기 난수를 인수로 하는 일방향 함수로 계산될 수 있다. The first server authentication value and the second server authentication value may be calculated as a one-way function that takes a server secret key and the random number generated using a shared key and a key modification factor stored in the server. The transmitting of the HTTP response to the client may further include the key modification factor in the HTTP response. The client authentication value may be calculated as a one-way function that takes a client secret key generated using the shared key stored in the client and the key modification factor and the random number as arguments.

한편, 상술한 사용자 세션 관리 방법은 컴퓨터에 의하여 수행될 수 있으며, 컴퓨터에서 실행하기 위한 프로그램을 기록하는 컴퓨터 판독 가능한 기록매체에 기록되어 서버에서 수행될 수 있다. Meanwhile, the above-described user session management method may be performed by a computer, and may be recorded on a computer-readable recording medium for recording a program to be executed on the computer, and then performed by a server.

본 발명의 다른 측면에 따르면, 웹 환경에서 네트워크를 통해 서버와 연결된 클라이언트에서 사용자 세션을 관리하는 방법이 제공된다. According to another aspect of the present invention, a method for managing a user session in a client connected to a server via a network in a web environment is provided.

사용자 세션 관리 방법은, 상기 클라이언트가 상기 서버와 공유키를 공유하는 단계; 상기 공유키를 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시(Flash)의 지역 공유 객체(LSO: Local Shared Object) 또는 액티브X에 저장하는 단계; 상기 서버로부터의 HTTP 응답을 전송받는 단계-상기 HTTP 응답은 상기 서버에서 생성된 세션정보를 포함함-; 상기 세션정보와 상기 공유키를 이용하여 클라이언트 인증값을 계산하는 단계; 및 상기 클라이언트 인증값을 쿠키에 저장하는 단계를 포함하되, 상기 세션정보는 상기 공유키를 저장한 저장 공간에 저장된다. A user session management method includes: sharing a shared key with the server by the client; The shared key may be assigned to a window name (window.name), a local shared object (LSO) or ActiveX of a window object of a document object model (DOM) of a web browser. Storing; Receiving an HTTP response from the server, wherein the HTTP response includes session information generated at the server; Calculating a client authentication value using the session information and the shared key; And storing the client authentication value in a cookie, wherein the session information is stored in a storage space storing the shared key.

여기서, 상기 서버로부터 복수의 HTTP 응답을 전송받는 단계를 더 포함하되, 상기 복수의 HTTP 응답에 포함된 세션정보와 상기 저장 공간에 저장된 세션정보가 동일한 경우 이미 생성된 상기 쿠키를 재사용하고, 다른 경우 상기 저장 공간에 저장된 세션정보를 갱신하고 상기 갱신된 세션정보를 이용하여 상기 클라이언트 인증값을 새로 계산하고 상기 쿠키를 새로 생성할 수 있다. The method may further include receiving a plurality of HTTP responses from the server. If the session information included in the plurality of HTTP responses is identical to the session information stored in the storage space, the cookie may be reused. The session information stored in the storage space may be updated, the client authentication value may be newly calculated using the updated session information, and the cookie may be newly generated.

그리고 소정 시간 이내에 송신자 인증이 필요한 복수의 HTTP 요청시 각 상기 HTTP 요청은 상기 저장 공간에 저장된 세션정보를 이용하여 생성된 클라이언트 인증값을 포함하는 쿠키를 공통으로 포함하여 상기 서버에 전송되는 단계를 더 포함할 수 있다. And in case of a plurality of HTTP requests requiring sender authentication within a predetermined time, the HTTP requests are commonly transmitted to the server including a cookie including a client authentication value generated using session information stored in the storage space. It may include.

또한, 상기 클라이언트 인증값은 상기 세션정보와 상기 공유키를 이용하여 일방향 함수로 계산될 수 있다. In addition, the client authentication value may be calculated as a one-way function using the session information and the shared key.

상기 세션정보는 난수일 수 있다. The session information may be a random number.

한편, 상기 세션정보는 난수와 키 변형 인수를 포함할 수 있다. 상기 클라이언트 인증값은 상기 클라이언트에 저장된 상기 공유키 및 상기 키 변형 인수를 이용하여 계산한 클라이언트 비밀키와, 상기 HTTP 응답에 포함된 상기 난수를 인수로 하는 일방향 함수로 계산될 수 있다. Meanwhile, the session information may include a random number and a key modification factor. The client authentication value may be calculated as a one-way function that takes a client secret key calculated using the shared key and the key modification factor stored in the client, and the random number included in the HTTP response.

한편, 상술한 사용자 세션 관리 방법은 컴퓨터에 의하여 수행될 수 있으며, 컴퓨터에서 실행하기 위한 프로그램을 기록하는 컴퓨터 판독 가능한 기록매체에 기록되어 클라이언트에서 수행될 수 있다. Meanwhile, the above-described user session management method may be performed by a computer, and may be recorded on a computer-readable recording medium for recording a program to be executed on the computer and executed by the client.

전술한 것 외의 다른 측면, 특징, 이점이 이하의 도면, 특허청구범위 및 발명의 상세한 설명으로부터 명확해질 것이다.Other aspects, features, and advantages other than those described above will become apparent from the following drawings, claims, and detailed description of the invention.

본 발명에 따른 사용자 세션 관리 방법 및 이를 수행하는 프로그램이 기록된 기록매체는 시도-응답 방식의 인증 알고리즘을 HTTP 프로토콜에 적용하여 사용자의 세션 보호가 가능하다. The method of managing a user session according to the present invention and a recording medium on which a program for performing the same are recorded can protect a user's session by applying an authentication algorithm of an attempt-response method to the HTTP protocol.

또한, 웹 브라우저에서 공유키를 저장하기 위하여 쿠키가 아닌 다른 저장 공간을 이용함으로써 평문 형태로 자동 전송되는 종래 쿠키의 단점 극복이 가능한 효과가 있다. In addition, by using a storage space other than the cookie to store the shared key in the web browser it is possible to overcome the disadvantage of the conventional cookie that is automatically transmitted in the form of plain text.

또한, HTTP에서 웹 서비스에 로그인한 사용자와 서버 사이의 채널을 시도-응답 방식의 인증 알고리즘을 이용하여 도청(sniffing), 침입(injection), 위조(forgery) 등의 공격으로부터 안전하게 보호할 수 있다.In addition, a channel between a user logged in to a web service and a server in HTTP can be secured from an attack such as sniffing, injection, and forgery using a challenge-response authentication algorithm.

또한, 액티브X 등의 신규 프로그램을 클라이언트에 배포하지 않고서도 사용자의 세션 보호가 가능하며, 클라이언트의 웹 브라우저가 서버와 계속 통신을 유지하지 않아도 된다. 그리고 상술한 과정을 통해 인증된 쿠키로 서버에서 제공하는 다양한 웹 서비스와 안전하게 세션 공유가 가능하다. In addition, users' sessions can be protected without distributing new programs such as ActiveX to the client, and the client's web browser does not have to maintain communication with the server. In addition, the session can be securely shared with various web services provided by the server using the authenticated cookie.

또한, HTTP 프로토콜에 시도-응답 방식을 적용할 경우 사용자의 행동패턴 또는 네트워크의 상황에 따라 공유하는 난수가 동기화되지 않는 경우 공유키의 재검증 루틴을 추가하여 오류를 줄일 수 있다. In addition, when the challenge-response method is applied to the HTTP protocol, errors can be reduced by adding a revalidation routine of the shared key when the random number shared by the user's behavior pattern or the network situation is not synchronized.

또한, 문턱 시간을 설정하여 동시다발적인 HTTP 요청에 대해서도 유연하게 응답 가능하다. In addition, it is possible to flexibly respond to multiple HTTP requests by setting a threshold time.

본 발명은 다양한 변환을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.As the invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the present invention to specific embodiments, it should be understood to include all transformations, equivalents, and substitutes included in the spirit and scope of the present invention. In the following description of the present invention, if it is determined that the detailed description of the related known technology may obscure the gist of the present invention, the detailed description thereof will be omitted.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. Terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.

도 1은 본 발명에 적용되는 시도-응답 프로토콜(challenge-response protocol)의 인증 방법을 설명한 도면이다. 이하에서 비밀키는 클라이언트(1)가 클라이어트 인증값을 계산하고 서버(2)가 서버 인증값을 계산하기 위해 필요한 키이며, 공유키는 클라이언트(1)와 서버(2)가 최초 사용자 로그인 과정에서 공유하는 키를 의미한다.1 is a view for explaining the authentication method of the challenge-response protocol applied to the present invention. Hereinafter, the secret key is a key required for the client 1 to calculate the client authentication value and the server 2 to calculate the server authentication value, and the shared key is used by the client 1 and the server 2 during the initial user login process. Means a shared key.

클라이언트(1)와 서버(2) 사이의 비밀키인 K를 클라이언트(1)와 서버(2)가 서로 공유하고 있다(단계 S10). 여기서, 비밀키 K는 공유키에 해당한다. 공유키 K는 안전한 키 교환 프로토콜(예를 들어, PAKE(Password Authenticated Key Exchange) 등)을 이용하여 클라이언트(1)를 통한 서버(2)로의 사용자 로그인 과정에서 공유가능하다. The client 1 and the server 2 share K, which is a secret key between the client 1 and the server 2 (step S10). Here, the secret key K corresponds to the shared key. The shared key K can be shared during the user login process to the server 2 via the client 1 using a secure key exchange protocol (e.g., Password Authenticated Key Exchange (PAKE), etc.).

서버(2)는 난수 R1을 생성하고(단계 S11), 세션 등을 이용하여 난수 R1을 저장한다. 그리고 생성한 난수 R1을 클라이언트(1)에 전송한다(단계 S12). 난수 R1을 클라이언트(1)에 전송하는 과정이 시도(challenge) 과정에 해당한다. The server 2 generates a random number R1 (step S11) and stores the random number R1 using a session or the like. The generated random number R1 is transmitted to the client 1 (step S12). The process of transmitting the random number R1 to the client 1 corresponds to a challenge process.

클라이언트(1)는 서버(2)로부터 전송받은 난수 R1과 클라이언트(1)가 미리 저장하고 있었던 공유키 K를 이용하여 클라이언트 인증값 C를 계산한다(단계 S13). 난수 R1과 공유키 K를 이용하여 클라이언트 인증값 C를 계산하는 함수는 일방향 함수이다. 일방향 함수는 인수로부터 결과(함수값)를 구하는 것은 간단하지만, 결과로부터 인수를 구하는 것은 어려운 함수를 일컬으며, 이러한 일방향 함수로는 해쉬 함수, 유사 난수 함수 등이 포함된다. The client 1 calculates the client authentication value C using the random number R1 received from the server 2 and the shared key K previously stored by the client 1 (step S13). The function of calculating the client authentication value C using the random number R1 and the shared key K is a one-way function. One-way functions are simple to get the result (function value) from the argument, but it is difficult to get the argument from the result. Such one-way functions include hash functions, pseudorandom functions, and the like.

클라이언트(1)는 생성된 클라이언트 인증값 C를 서버(2)에 전송한다(단계 S14). 클라이언트 인증값 C를 서버(2)에 전송하는 과정이 응답(response) 과정에 해당한다. The client 1 transmits the generated client authentication value C to the server 2 (step S14). The process of transmitting the client authentication value C to the server 2 corresponds to the response process.

서버(2)는 단계 S11에서 난수 R1을 생성한 후 후술할 단계 S16 이전까지의 과정 중에 임의의 시점에서 난수 R1과 서버(2)가 미리 저장하고 있었던 공유키 K를 이용하여 서버 인증값 S를 계산한다(단계 S15). 난수 R1과 공유키 K를 이용하여 서버 인증값 S를 계산하는 함수는 일방향 함수이며, 클라이언트(1)에서 이용한 일방향 함수와 동일한 것이 바람직하다. The server 2 generates the server authentication value S using the random number R1 and the shared key K previously stored by the server 2 at any point in the process up to step S16, which will be described later, after generating the random number R1 in step S11. Calculate (step S15). The function of calculating the server authentication value S using the random number R1 and the shared key K is a one-way function, preferably the same as the one-way function used by the client 1.

서버(2)는 클라이언트(1)로부터 전송받은 클라이언트 인증값 C와, 서버(2) 내에서 생성한 서버 인증값 S를 비교한다(단계 S16). The server 2 compares the client authentication value C received from the client 1 with the server authentication value S generated in the server 2 (step S16).

비교 결과 클라이언트 인증값 C와 서버 인증값 S가 다른 경우에는 클라이언트(1)가 가지고 있는 공유키 K가 서버(2)가 가지고 있는 공유키 K와 다른 것으로 판단하여 클라이언트(1)의 인증에 실패한 것으로 간주하고(단계 S17a), 사용자 세션이 유효하지 않으므로 사용자 세션을 삭제한다. As a result of the comparison, when the client authentication value C and the server authentication value S are different, it is determined that the shared key K possessed by the client 1 is different from the shared key K possessed by the server 2. (Step S17a), the user session is not valid and the user session is deleted.

비교 결과 클라이언트 인증값 C와 서버 인증값 S가 동일한 경우에는 클라이언트(1)가 가지고 있는 공유키 K가 서버(2)가 가지고 있는 공유키 K와 동일한 것으로 판단하여 클라이언트(1)의 인증에 성공한 것으로 간주하고(단계 S17b), 사용자 세션의 유효를 유지시킨다. 그리고 새로운 난수 R2를 생성한다(단계 S18). 그리고 상술한 단계 S12 내지 S16에 설명한 시도-응답 과정을 새로운 난수 R2를 이용하여 반복하게 된다. As a result of the comparison, if the client authentication value C and the server authentication value S are the same, it is determined that the shared key K of the client 1 is the same as the shared key K of the server 2 and the authentication of the client 1 is successful. (Step S17b), the user session is maintained valid. Then, a new random number R2 is generated (step S18). Then, the trial-response process described in the above steps S12 to S16 is repeated using the new random number R2.

서버(2)에서 클라이언트(1)로 새로운 난수 R2를 전송(단계 S19)하는 경우 새로운 난수 R2가 클라이언트(1)에 도달하기 이전에 클라이언트(1)로부터 이전에 클라이언트(1)에 전송되었던 난수 R1에 상응하는 클라이언트 인증값 C가 서버(2)로 다시 전송될 수 있다(단계 S14a). When the server 2 transmits a new random number R2 from the server 2 to the client 1 (step S19), the random number R1 previously transmitted from the client 1 to the client 1 before the new random number R2 reaches the client 1. The corresponding client authentication value C can be sent back to the server 2 (step S14a).

이 경우 서버(2)는 새로운 난수 R2를 생성하였는 바, 서버 인증값은 새로운 난수 R2에 상응하는 함수값이고, 클라이언트 인증값은 기존의 난수 R1에 상응하는 함수값이어서 클라이언트(1)와 서버(2)가 공유한 난수가 동기화되지 않을 수 있다. In this case, the server 2 generates a new random number R2. The server authentication value is a function value corresponding to the new random number R2, and the client authentication value is a function value corresponding to the existing random number R1. Random numbers shared by 2) may not be synchronized.

본 발명에서는 상술한 시도-응답 프로토콜을 HTTP 프로토콜에 적용하는 경우 사용자의 행동패턴 또는 네트워크의 상황에 따라 상술한 것과 같이 클라이언트(1)와 서버(2)가 공유하는 난수가 동기화되지 않을 수 있으므로, 이를 대비할 필요가 있다. 여기서, 사용자의 행동패턴은 다수의 웹 브라우저 이용 혹은 동시다발적인 서비스 요청 등이 있을 수 있다. 네트워크 상황은 패킷이 지연되거나 패킷이 손실되는 경우 등을 의미한다. In the present invention, when the above-described challenge-response protocol is applied to the HTTP protocol, random numbers shared by the client 1 and the server 2 may not be synchronized as described above according to the behavior pattern of the user or the situation of the network. You need to prepare for this. Here, the behavior pattern of the user may be using a plurality of web browsers or simultaneous service requests. The network condition refers to a case where a packet is delayed or lost.

이러한 사용자의 행동패턴 또는 네트워크 상황에 따라 HTTP 요청이나 HTTP 응답이 지연되거나 손실될 수 있다. HTTP 응답이 지연 또는 손실될 경우 서버(2)는 HTTP 응답을 하기 위하여 난수를 갱신하였지만, 클라이언트(1)에서는 이를 받아보지 못하거나 수신이 늦어지는 사이에 갱신되지 않은 난수에 상응하는 HTTP 요청이 전송되어 서버(2)과 클라이언트(1) 사이에 공유된 난수가 동기화되지 않는다. Depending on the user's behavior patterns or network conditions, the HTTP request or HTTP response may be delayed or lost. If the HTTP response is delayed or lost, the server 2 updates the random number to make the HTTP response, but the client 1 does not receive it or the HTTP request corresponding to the unrenewed random number is sent while the reception is late. The random number shared between the server 2 and the client 1 is not synchronized.

상술한 시도-응답 방식의 목적이 공유키를 검증하기 위함이므로 난수가 동기화되지 않았음을 이유로 한번 검증에 실패한 경우 클라이언트측 스크립트(Client Side Script), 플래시(Flash) 또는 액티브X(ActiveX) 등의 간결한 실행코드만을 클라이언트(1)에 전송하여 공유키를 재검증한다. 공유키를 재검증하는 횟수를 제한하며, 재검증 시도가 소정 횟수를 초과하면 사용자 세션을 삭제하여 로그아웃시킨다. 여기서, 재검증 루틴은 클라이언트(1)의 캐시를 이용하도록 하여 재검증에 부담을 줄이도록 한다.Since the purpose of the above-described challenge-response method is to verify the shared key, when verification fails because of the random number being out of sync, client side script, flash, or ActiveX. Only the concise executable code is sent to the client 1 to re-verify the shared key. The number of times to re-verify the shared key is limited. If the re-validation attempt exceeds a predetermined number, the user session is deleted and logged out. Here, the revalidation routine uses the cache of the client 1 to reduce the burden on revalidation.

또한, 웹 환경에서는 HTTP 요청이 동시다발적으로 이루어지는 경우가 있다. 하나의 문서 안에 또 다른 문서를 포함하는 것이 그 예이다. 이 경우 HTTP 요청과 HTTP 응답의 순서가 뒤섞일 수 있다. 따라서, 일정 시간 내에 도착한 2번째 HTTP 요청부터는 첫번째 HTTP 요청에 사용된 클라이언트 인증값을 그대로 사용할 수 있도록 하고, 해당 클라이언트 인증값이 유효한 시간을 연장가능하도록 하여 짧은 시간 안에 다수의 HTTP 요청에 대해서 유연하게 응답을 할 수 있도록 한다. In addition, in a web environment, HTTP requests may occur concurrently. An example is the inclusion of another document in a document. In this case, the order of the HTTP request and the HTTP response can be mixed. Therefore, from the second HTTP request that arrives within a certain time, the client authentication value used in the first HTTP request can be used as it is, and the client authentication value can be extended for a valid time to flexibly respond to a large number of HTTP requests in a short time. Allow the response.

이하에서는 상술한 내용이 적용된 웹 환경에서 안전한 사용자 세션 관리 방법을 제공하고자 한다. Hereinafter, a method of managing a secure user session in a web environment to which the above description is applied will be provided.

도 2는 본 발명의 일 실시예에 따른 서버에 포함되는 세션 관리 모듈의 블록구성도이다. 2 is a block diagram of a session management module included in a server according to an embodiment of the present invention.

도 2를 참조하면, 세션 관리 모듈(20), 난수 생성부(21), 인증값 산출부(22), 인증값 비교부(23), 인증 관리부(24), 시간 분석부(25), 오류허용 분석 부(26)가 도시되어 있다. 2, the session management module 20, the random number generator 21, the authentication value calculator 22, the authentication value comparison unit 23, the authentication manager 24, the time analyzer 25, and an error. Acceptance analysis section 26 is shown.

세션 관리 모듈(20)은 웹 서비스를 제공하는 서버(2)에 포함된다. 세션 관리 모듈(20)은 클라이언트(1)로부터의 HTTP 요청에 대한 송신자 인증을 위해 세션을 관리한다. The session management module 20 is included in the server 2 that provides a web service. The session management module 20 manages sessions for sender authentication for HTTP requests from client 1.

난수 생성부(21)는 클라이언트(1)와 공유하기 위한 난수를 생성한다. The random number generator 21 generates a random number for sharing with the client 1.

인증값 산출부(22)는 생성된 난수와 미리 저장되어 있는 공유키 등을 인수로 하는 미리 정해진 함수로 계산한 결과값인 서버 인증값을 산출한다. 본 발명에서는 시간 간격을 두고 생성된 2개의 난수에 각각 대응하는 제1 서버 인증값과 제2 서버 인증값을 산출한다. 제1 서버 인증값이 먼저 생성된 난수에 상응하는 결과값이고, 제2 서버 인증값이 새로 생성된 난수에 상응하는 결과값이다. The authentication value calculation unit 22 calculates a server authentication value which is a result obtained by calculating a predetermined function using the generated random number and a pre-stored shared key as an argument. In the present invention, a first server authentication value and a second server authentication value corresponding to two random numbers generated at time intervals are calculated. The first server authentication value is a result value corresponding to the random number generated first, and the second server authentication value is a result value corresponding to the newly generated random number.

인증값 비교부(23)는 인증값 산출부(22)에서 계산한 제1 서버 인증값 또는 제2 서버 인증값과 클라이언트(1)로부터 전송되는 클라이언트 인증값(클라이언트(1)에서 난수와 공유키 등을 인수로 하는 미리 정해진 함수로 계산한 결과값)을 비교한다. The authentication value comparison unit 23 is configured to calculate the first server authentication value or the second server authentication value calculated by the authentication value calculator 22 and the client authentication value (random number and shared key from the client 1). And the result calculated by a predetermined function whose arguments are the same).

인증 관리부(24)는 비교 결과에 따라 HTTP 요청을 한 클라이언트(1)의 송신자 인증 성공 또는 인증 실패가 결정된다. 인증이 실패한 경우 부적합한 클라이언트(1)로부터의 HTTP 요청(예를 들어, 공격자의 HTTP 요청 등)으로 판단하고 세션을 삭제시킨다. 인증이 성공한 경우 적합한 클라이언트(1)로부터의 HTTP 요청으로 판단하고 세션을 유지시킨다. The authentication manager 24 determines the sender authentication success or the authentication failure of the client 1 that made the HTTP request according to the comparison result. If authentication fails, it is determined as an HTTP request (for example, an HTTP request of an attacker) from the inappropriate client 1, and the session is deleted. If authentication succeeds, it is determined as an HTTP request from the appropriate client 1 and the session is maintained.

시간 분석부(25)는 클라이언트(1)로부터 소정 시간(예를 들어, 문턱 시간 등) 내에 연속적으로 도착하는 HTTP 요청이 동일한 클라이언트 인증값을 가지고, 클라이언트 인증값이 제1 서버 인증값과 동일한 경우 동시다발적인 서비스 요청으로 판단하여 난수를 갱신하지 않고 HTTP 응답을 제공한다. The time analyzer 25 determines that an HTTP request continuously arriving from the client 1 within a predetermined time (for example, a threshold time) has the same client authentication value, and the client authentication value is the same as the first server authentication value. It is judged as a simultaneous service request and provides HTTP response without updating random number.

클라이언트 인증값이 제2 서버 인증값과 동일한 경우에는 먼저 생성된 난수가 적용된 HTTP 요청이 종료되고 이후 새로 생성된 난수가 적용된 HTTP 요청이 수신되는 것으로 판단한다. 이 경우 제2 서버 인증값을 제1 서버 인증값에 복사한다. 그리고 난수를 새로 생성하고 새로운 제2 서버 인증값을 계산하며, 새로 생성한 난수를 클라이언트(1)에 전송하는 HTTP 응답에 포함시킨다. If the client authentication value is the same as the second server authentication value, it is determined that the HTTP request to which the random number generated first is applied is terminated and the HTTP request to which the newly generated random number is applied is received. In this case, the second server authentication value is copied to the first server authentication value. A new random number is generated, a new second server authentication value is calculated, and the newly generated random number is included in an HTTP response transmitted to the client 1.

HTTP 요청이 클라이언트(1)로부터 소정 시간 내에 연속적으로 도착하지 못하고, 클라이언트 인증값이 제2 서버 인증값과 다른 경우, 해당 HTTP 요청은 공격자에 의한 HTTP 요청인 경우가 대부분이다. 하지만, 상술한 것과 같이 사용자의 행동패턴이나 네트워크 상황에 따라 클라이언트(1)가 서버(2)와 동일한 공유키를 가지고 있음에도 난수의 비동기화로 인한 오류가 발생할 수도 있다. If the HTTP request does not arrive continuously from the client 1 within a predetermined time, and the client authentication value is different from the second server authentication value, the HTTP request is usually an HTTP request by an attacker. However, as described above, even if the client 1 has the same shared key as the server 2 according to a user's behavior pattern or network situation, an error may occur due to asynchronous synchronization of random numbers.

이러한 오류를 허용하기 위하여 오류허용 분석부(26)는 공유키의 재검증 루틴을 이용한다. 소정 횟수 동안 및/또는 소정 시간 동안 클라이언트(1)에 난수를 전송하고 이 난수에 상응하여 계산된 클라이언트 인증값을 즉시 HTTP 요청으로 전송하게 하는 HTTP 응답을 클라이언트(1)에 전송한다. 즉시 전송된 HTTP 요청에 포함된 클라이언트 인증값을 제1 서버 인증값 또는 제2 서버 인증값과 비교하여 클라이언트(1)이 공유키를 가지고 있는지 여부를 재검증한다. In order to allow such an error, the error tolerance analyzing unit 26 uses a shared key revalidation routine. An HTTP response is sent to the client 1 for sending a random number to the client 1 for a predetermined number of times and / or for a predetermined time and for immediately sending a client authentication value calculated according to this random number as an HTTP request. The client authentication value included in the immediately transmitted HTTP request is compared with the first server authentication value or the second server authentication value to re-verify whether the client 1 has a shared key.

도 3 및 도 4를 참조하여 클라이언트(1)와 서버(2)가 공유키를 공유하는 경 우 안정하게 사용자 세션을 관리하는 방법을 설명하고, 이후 도 5a 이하 도면을 참조하여 본 발명에 따른 시간에 유연하고 오류를 허용하는 사용자 세션 관리 방법을 설명하기로 한다. Referring to FIGS. 3 and 4, a method of stably managing a user session when the client 1 and the server 2 share a shared key will be described. After that, the time according to the present invention will be described with reference to FIGS. This article describes how to manage a flexible and error-tolerant user session.

도 3은 안전한 사용자 세션 관리 방법, HTTP 요청의 송신자 인증 프로토콜을 설명한 도면이다.3 is a diagram illustrating a secure user session management method and a sender authentication protocol of an HTTP request.

클라이언트(1)와 서버(2) 사이의 비밀키 K를 클라이언트(1)와 서버(2)가 서로 공유하고 있다(단계 S30). 즉, 비밀키 K는 공유키에 해당한다. 공유키 K는 안전한 키 교환 프로토콜(예를 들어, PAKE 등)를 이용하여 클라이언트(1)를 통한 서버(2)로의 웹 서비스의 사용자 로그인 과정에서 공유가능하다. The secret key K between the client 1 and the server 2 is shared between the client 1 and the server 2 (step S30). That is, the secret key K corresponds to the shared key. The shared key K can be shared during the user login process of the web service via the client 1 to the server 2 using a secure key exchange protocol (e.g., PAKE, etc.).

공유키 K는 클라이언트(1)의 로그인 단계에서 교환되어 로그아웃될 때까지 웹 브라우저에 저장되어 있어야 한다. 그리고 웹 페이지가 바뀌더라도 지속적으로 유지되어야 한다. The shared key K must be stored in the web browser until it is exchanged and logged out at the login stage of the client 1. And even if the web page changes, it must be maintained.

이 경우 공유키를 쿠키에 저장하는 경우 클라이언트(1)로부터의 HTTP 요청에 쿠키가 포함되어 네트워크로 전송되므로 공유키가 그대로 노출되는 문제점이 있다. In this case, when the shared key is stored in a cookie, the cookie is included in the HTTP request from the client 1 and transmitted to the network, thereby exposing the shared key as it is.

따라서, 클라이언트(1)는 공유키 K를 쿠키가 아닌 별도의 저장 공간에 저장한다. 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시(Flash)의 지역 공유 객체(LSO: Local Shared Object), 액티브X 등의 저장 공간이 이용될 수 있다. 이러한 저장 공간에 대해서는 추후 상세히 설명하기로 한다. Therefore, the client 1 stores the shared key K in a separate storage space rather than a cookie. Among the properties of the window object of the document object model (DOM) of the web browser, the storage space of the window name (window.name), local shared object (LSO) of Flash, ActiveX, etc. Can be used. This storage space will be described later in detail.

클라이언트(1)로부터 HTTP 요청(HTTP request)이 전송되면(단계 S31), 서버(2)는 다음과 같이 동작한다. When an HTTP request is transmitted from the client 1 (step S31), the server 2 operates as follows.

서버(2)는 난수 R을 생성한다(단계 S32). 이와 관련된 의사 코드(Pseudo code)는 하기와 같다. The server 2 generates a random number R (step S32). Pseudo code associated with this is as follows.

R = random()R = random ()

서버(2)는 난수 R과 공유키 K를 이용하여 미리 정해진 함수로 계산한 결과값인 서버 인증값 S를 산출한다(단계 S37). 여기서, 사용자 식별정보인 ID 등이 미리 정해진 함수의 인수로 더 포함될 수 있다. 이와 관련된 의사 코드는 하기와 같다.The server 2 calculates a server authentication value S which is a result calculated by a predetermined function using the random number R and the shared key K (step S37). Here, ID, which is user identification information, may be further included as an argument of a predetermined function. The pseudo code related to this is as follows.

S = Func(K, R, ID, …)S = Func (K, R, ID,…)

여기서, 미리 정해진 함수는 일방향 함수인 것이 바람직하다. 일방향 함수는 인수로부터 결과(함수값)를 구하는 것은 간단하지만, 결과로부터 인수를 구하는 것은 어려운 함수를 일컬으며, 이러한 일방향 함수로는 해쉬 함수, 유사 난수 함수 등이 포함된다. Here, the predetermined function is preferably a one-way function. One-way functions are simple to get the result (function value) from the argument, but it is difficult to get the argument from the result. Such one-way functions include hash functions, pseudorandom functions, and the like.

서버(2)는 공유키 K, 난수 R, 서버 인증값 S를 웹 어플리케이션에서 제공하는 세션 또는 데이터베이스에 저장한다. 이와 관련된 의사 코드는 하기와 같다. The server 2 stores the shared key K, the random number R, and the server authentication value S in a session or database provided by the web application. The pseudo code related to this is as follows.

Session = {K, R, S}Session = {K, R, S}

상술한 단계 S37은 후술한 단계 S32 이후 단계 S38 이전에 임의의 시점에서 서버(2)에서 수행되면 충분하다. It is sufficient that step S37 described above is performed at the server 2 at any point in time after step S32 and before step S38 described later.

서버(2)는 HTTP 응답(HTTP response)을 통해 단계 S32에서 생성된 난수 R을 클라이언트(1)에 전송한다(단계 S33). 난수 R은 세션정보에 해당한다. 여기서, 세 션정보는 사용자 세션 인증을 위해 서버(2)가 클라이언트(1)에 제공하는 정보를 의미한다. The server 2 transmits the random number R generated in step S32 to the client 1 via an HTTP response (step S33). The random number R corresponds to session information. Here, the session information refers to information that the server 2 provides to the client 1 for user session authentication.

클라이언트(1)는 전송받은 난수 R과, 소정의 저장 공간에 저장된 공유키 K를 이용하여 미리 정해진 함수로 계산한 결과값인 클라이언트 인증값 C를 산출한다(단계 S34). 여기서, 사용자 식별정보인 ID 등이 미리 정해진 함수의 인수로 더 포함될 수 있다. 여기서, 미리 정해진 함수는 단계 S37에서 서버(2)가 이용한 일방향 함수와 동일해야 한다. The client 1 calculates the client authentication value C, which is a result of the calculation using a predetermined function, using the received random number R and the shared key K stored in the predetermined storage space (step S34). Here, ID, which is user identification information, may be further included as an argument of a predetermined function. Here, the predetermined function must be the same as the one-way function used by the server 2 in step S37.

이후 클라이언트(1)는 산출된 클라이언트 인증값 C를 쿠키에 저장한다(단계 S35). 이와 관련된 의사 코드는 하기와 같다. The client 1 then stores the calculated client authentication value C in a cookie (step S35). The pseudo code related to this is as follows.

setCookie(C = Func(K, R, ID, …))setCookie (C = Func (K, R, ID,…))

클라이언트(1)가 HTTP 요청을 하는 경우 클라이언트 인증값 C를 저장하고 있는 쿠키는 자동으로 포함되어 서버(2)로 전송된다(단계 S36). When the client 1 makes an HTTP request, the cookie that stores the client authentication value C is automatically included and sent to the server 2 (step S36).

서버(2)는 쿠키에 포함된 클라이언트 인증값 C와 단계 S37에서 산출된 서버 인증값 S를 비교한다(단계 S38). 비교 결과 두 인증값이 다른 경우 단계 S39로 진행하고, 동일한 경우 단계 S40으로 진행한다. The server 2 compares the client authentication value C included in the cookie with the server authentication value S calculated in step S37 (step S38). The comparison proceeds to step S39 if the two authentication values are different, and if so, to step S40.

단계 S39에서, 두 인증값이 다르므로 서버(2)는 클라이언트(1)의 송신자 인증이 실패한 것으로 간주하고 서버(2)에 저장된 서버측 세션유지정보(난수 R, 공유키 K 등)를 삭제하고 세션을 삭제한다. 이와 관련된 의사 코드는 하기와 같다. In step S39, since the two authentication values are different, the server 2 regards the sender authentication of the client 1 as failed and deletes the server-side session maintenance information (random number R, shared key K, etc.) stored in the server 2, and Delete the session. The pseudo code related to this is as follows.

Session destroy()Session destroy ()

그리고 클라이언트(1)에 저장된 클라이언트측 세션유지정보(공유키 K와 난수 R, 쿠키 등)가 모두 NULL로 설정되도록 하는 클라이언트측 스크립트, 플래시 또는 액티브X를 클라이언트(1)에 전송한다. 이 과정에서 사용자는 로그아웃된다. Then, the client-side script, flash, or ActiveX is transmitted to the client 1 so that all client-side session maintenance information (shared key K, random number R, cookies, etc.) stored in the client 1 are set to NULL. In this process, the user is logged out.

단계 S40에서, 두 인증값이 동일하므로 서버(2)는 클라이언트(1)의 송신자 인증이 성공한 것으로 간주하고, 새로운 난수 R을 생성한다(단계 S41). 그리고 클라이언트(1)가 HTTP 요청을 통해 요청한 서비스에 대한 HTTP 응답에 새로 생성된 난수 R을 첨부하여 클라이언트(1)에 전송한다(단계 S42). 이후 서버(2)는 다른 HTTP 요청을 받게 되면 단계 S38 이하의 과정을 반복하게 된다. In step S40, since the two authentication values are the same, the server 2 considers the sender authentication of the client 1 to be successful, and generates a new random number R (step S41). Then, the client 1 attaches the newly generated random number R to the HTTP response to the service requested through the HTTP request and transmits it to the client 1 (step S42). Thereafter, when the server 2 receives another HTTP request, the server 2 repeats the process of step S38 or less.

클라이언트(1)는 단계 S30에서 교환한 공유키 K를 쿠키가 아닌 별도의 저장 공간에 저장한다. 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시(Flash)의 지역 공유 객체(LSO: Local Shared Object), 액티브X 등의 저장 공간이 이용될 수 있다. The client 1 stores the shared key K exchanged in step S30 in a separate storage space rather than a cookie. Among the properties of the window object of the document object model (DOM) of the web browser, the storage space of the window name (window.name), local shared object (LSO) of Flash, ActiveX, etc. Can be used.

일 실시예로, 클라이언트(1)에서의 저장 공간은 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name)일 수 있다. 여기서, 문서 객체 모델은 웹 브라우저를 통한 확장성 생성 언어(XML) 문서의 상호 연동을 위한 객체 기반의 문서 모델을 의미한다. 플랫폼과 언어 면에서 중립적인 인터페이스로서 프로그램과 스크립트에 의한 문서의 내용, 구조, 종류의 동적인 접근과 변경이 가능하며, 스크립트나 프로그램 언어에 웹 페이지를 연결해 준다. 웹 페이지를 조작, 생성하기 위해 사용되는 속성(property), 방법(method) 및 이벤트(event)가 객체를 구성하는데, 이러한 객체 들은 대부분의 웹 브라우저에서 스크립트 언어를 통해 접근할 수 있다.In one embodiment, the storage space in the client 1 may be a window name (window.name) among the properties of the window object of the document object model (DOM) of the web browser. Here, the document object model refers to an object-based document model for interworking an extensible generation language (XML) document through a web browser. It is a platform- and language-neutral interface that allows programs and scripts to dynamically access and change the content, structure, and type of documents, and links web pages to scripts or programming languages. The properties, methods, and events used to manipulate and create web pages make up objects, which can be accessed through scripting languages in most web browsers.

윈도우 이름(window.name)의 원래 목적은 각각의 브라우저(또는 탭)마다 이름을 부여하고 이 이름을 통해서 브라우저 간에 접근이 가능하도록 하는 것이었다. 브라우저 내의 페이지가 바뀌더라도 브라우저의 이름은 바뀌지 않기 때문에 최근엔 이를 이용하여 페이지 사이에 데이터를 전달하는 용도로 사용하고 있다. 윈도우 이름은 쓰기 가능한 크기도 정해져 있지 않아서 원하는 데이터를 크기 제한 없이 저장할 수 있다는 장점이 있다. The original purpose of the window name (window.name) was to give each browser (or tab) a name and make it accessible between browsers. Since the name of the browser does not change even if the page in the browser is changed, it is recently used to transfer data between pages. The name of the window is not fixed, and the advantage is that you can store the data you want without limiting its size.

다른 실시예로, 클라이언트(1)에서의 저장 공간은 플래시의 지역 공유 객체(LSO: Local Shared Object)일 수 있다. 지역 공유 객체는 플래시 플레이어에서 사용되는 쿠키와 유사한 데이터 엔티티(cookie-like data entity)이다. 플레시 플레이어에서 구동되는 어플리케이션은 스트링(string)이나 숫자(number) 같은 기본 데이터 타입(basic data type)으로 구성되거나 더 복잡한 객체로 구성되는 데이터를 저장(store)하고 검색(retrieve)할 수 있다. 플래시의 지역 공유 객체는 플래시 플러그인(plug-in)이 설치되어 있다면 이용할 수 있는 공간이다. 변수명이 윈도우 이름(window.name)으로 지정된 일 실시예와는 다르게 변수명을 원하는 것으로 설정할 수 있고 쿠키와 같이 도메인별로 데이터를 관리할 수 있기 때문에 보안문제가 어느 정도 완화될 수 있다. 지역 공유 객체의 기본 크기는 100kB이다.In another embodiment, the storage space at the client 1 may be a Local Shared Object (LSO) in Flash. Local shared objects are cookie-like data entities used in Flash Player. Applications running on Flash Player can store and retrieve data consisting of basic data types, such as strings or numbers, or of more complex objects. Flash's local shared objects are available if you have a flash plug-in installed. Unlike the embodiment in which the variable name is designated as the window name (window.name), the security name can be alleviated to some extent because the variable name can be set as desired and data can be managed for each domain such as a cookie. The default size of a local shared object is 100 kB.

또 다른 실시예로, 클라이언트(1)는 액티브X를 이용하여 공유키 K를 저장할 수도 있다. 액티브X는 익스플로러의 경우 이용할 수 있는 플러그인으로, 컴파일된 프로그램을 사용자의 컴퓨터에 설치하여 클라이언트의 자원을 보다 많이 이용할 수 있다는 장점이 있다. 액티브X를 이용할 경우 제작자가 설정한 위치에 데이터를 저장하고 읽을 수 있다. 액티브X와 관련된 기술로 저장 공간의 역할을 할 수 있는 것은 액티브X 도큐먼트, 액티브X 스크립팅 등이 있다. 액티브X 도큐먼트는 HTML과는 무관하게 작성된 것으로, MS워드나 엑셀 파일 등을 의미한다. 액티브 스크립팅은 액티브X 컨트롤이나 자바 애플릿에 포함시킬 수 있는 스크립트 언어로, J스크립트나 VB스크립트가 대표적이다. In another embodiment, the client 1 may store the shared key K using ActiveX. ActiveX is a plug-in that can be used in Explorer, which has the advantage of installing a compiled program on the user's computer to make more use of the client's resources. With ActiveX, you can save and read data in the location set by the author. ActiveX-related technologies can serve as storage spaces, such as ActiveX documents and ActiveX scripting. ActiveX documents are written without regard to HTML, meaning MS Word or Excel files. Active scripting is a scripting language that can be included in ActiveX controls or Java applets, such as JScript or VBScript.

이러한 저장 공간에 비밀키인 공유키를 저장하고 있는 경우 비밀키가 외부로 노출되는 경우 안전한 세션관리가 어려울 수 있다. 예를 들어, 윈도우 이름은 쓰기 가능한 크기도 정해져 있지 않아서 원하는 데이터를 크기 제한 없이 저장할 수 있다는 장점이 있지만 다른 서비스로 이동하여도 값이 바뀌지 않기 때문에 여기에 비밀키를 저장한다면 보안상에 결점이 발생할 수 있다. 여기서 생길 수 있는 보안 문제의 해결 방법은 비밀키 자체를 저장하지 않고 이를 변형 또는 암호화한 것을 저장하여 윈도우 이름에 저장된 값이 노출되더라도 비밀키가 직접적으로 노출되지 않도록 하는 것이다. In the case where the shared key, which is a secret key, is stored in such a storage space, it may be difficult to secure session management when the secret key is exposed to the outside. For example, the window name has the advantage of being able to store the desired data without any size limit because the window name is not fixed, but the value does not change even when moving to another service. Can be. The solution to this security problem is to store the modified or encrypted version of the private key without storing it, so that the private key is not directly exposed even if the value stored in the window name is exposed.

도 3을 참조하여 상술한 내용에서는 비밀키와 공유키가 동일한 경우이며, 이하에서는 비밀키와 공유키가 다른 경우를 중심으로 도 4를 참조하여 상세히 설명하기로 한다. In the above description with reference to FIG. 3, the case where the secret key and the shared key are the same will be described below in detail with reference to FIG. 4.

도 4는 다른 안전한 사용자 세션 관리 방법, 키 보호모드에서의 HTTP 요청의 송신자 인증 프로토콜을 설명한 도면이다. 4 is a diagram illustrating another secure user session management method and a sender authentication protocol of an HTTP request in key protection mode.

즉, 키 보호모드는 공유키가 노출되더라도 비밀키는 노출되지 않아 HTTP 요청의 송신자 인증이 가능한 경우를 의미하며, 도 3을 참조하여 설명한 것과는 달리 공유키와 비밀키가 다른 값을 가진다. That is, the key protection mode means that the secret key is not exposed even if the shared key is exposed, so that the sender authentication of the HTTP request is possible. Unlike the description with reference to FIG. 3, the shared key has a different value.

클라이언트(1)와 서버(2) 사이의 공유키인 K를 클라이언트(1)와 서버(2)가 서로 공유하고 있다(단계 S50). 공유키 K는 안전한 키 교환 프로토콜(예를 들어, PAKE 등)를 이용하여 클라이언트(1)를 통한 서버(2)로의 웹 서비스의 사용자 로그인 과정에서 공유가능하다. The client 1 and the server 2 share K, which is a shared key between the client 1 and the server 2 (step S50). The shared key K can be shared during the user login process of the web service via the client 1 to the server 2 using a secure key exchange protocol (e.g., PAKE, etc.).

공유키 K는 클라이언트(1)의 로그인 단계에서 교환되어 로그아웃될 때까지 웹 브라우저에 저장되어 있어야 한다. 그리고 웹 페이지가 바뀌더라도 지속적으로 유지되어야 한다. The shared key K must be stored in the web browser until it is exchanged and logged out at the login stage of the client 1. And even if the web page changes, it must be maintained.

이 경우 공유키를 쿠키에 저장하는 경우 클라이언트(1)로부터의 HTTP 요청에 쿠키가 포함되어 네트워크로 전송되므로 공유키가 그대로 노출되는 문제점이 있다. In this case, when the shared key is stored in a cookie, the cookie is included in the HTTP request from the client 1 and transmitted to the network, thereby exposing the shared key as it is.

따라서, 클라이언트(1)는 공유키 K를 쿠키가 아닌 별도의 저장 공간에 저장한다. 웹 브라우저의 문서 객체 모델(DOM)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시의 지역 공유 객체(LSO), 액티브X 등의 저장 공간이 이용될 수 있다. 이에 대해서는 앞서 설명하였는바 상세한 설명은 생략하기로 한다. Therefore, the client 1 stores the shared key K in a separate storage space rather than a cookie. Among the properties of the window object of the document object model (DOM) of the web browser, a storage space such as a window name (window.name), a local shared object (LSO) of Flash, ActiveX, or the like may be used. As described above, the detailed description will be omitted.

여기서, 공유키 K는 키 보호모드에 적용하기 위하여 하기의 수학식 1과 같은 특징을 가진다. Here, the shared key K has the characteristics as shown in Equation 1 below to apply to the key protection mode.

K = ① Func1(K1, K2) or ② K1K = ① Func1 (K1, K2) or ② K1

Func2(K, K2) = K'Func2 (K, K2) = K '

K' = ① K1 or ② K3K '= ① K1 or ② K3

여기서, K는 공유키, K'는 비밀키, Func1은 클라이언트(1)에 저장된 값을 통해 비밀키가 직접적으로 노출되지 않도록 키 변형 인수 K2를 이용하여 키를 변형시키는 키 변형 함수, Func2는 공유키 K로부터 키 변형 인수 K2를 이용하여 비밀키 K2를 생성해내는 비밀키 생성 함수이다.Here, K is a shared key, K 'is a secret key, Func1 is a key modification function that modifies a key using the key modification factor K2 so that the secret key is not directly exposed through a value stored in the client 1, and Func2 is shared. Secret key generation function that generates secret key K2 from key K using key transformation argument K2.

클라이언트(1)는 공유키 K만을 저장하고 있으며, 서버(2)는 공유키 K와 키 변형 인수 K2를 저장하고 있다. 이 경우 클라이언트(1)에 저장된 공유키 K 및/또는 키 변형 인수 K2가 외부에 노출되더라도 공유키 K와 키 변형 인수 K2를 이용하여 클라이언트 비밀키 K'를 생성해내므로, 비밀키의 보호가 가능하게 된다. The client 1 stores only the shared key K, and the server 2 stores the shared key K and the key modification factor K2. In this case, even if the shared key K and / or key modification factor K2 stored in the client 1 is exposed to the outside, the client secret key K 'is generated using the shared key K and the key modification factor K2, so that the secret key can be protected. Done.

제1 실시예(①)에 따르면, K1이 비밀키이다. According to the first embodiment (1), K1 is a secret key.

비밀키 K1이 노출되지 않도록 키 변형 함수 Func1과 키 변형 인수 K2를 이용하여 변형된 공유키 K를 클라이언트(1)와 서버(2)가 공유한다. 여기서, 비밀키 생성 함수 Func2는 키 변형 함수 Func1을 통해 변형된 키 K로부터 비밀키 K1을 복구해내는 함수이다. The client 1 and the server 2 share the modified shared key K using the key modification function Func1 and the key modification factor K2 so that the secret key K1 is not exposed. Here, the secret key generation function Func2 is a function for recovering the secret key K1 from the modified key K through the key transformation function Func1.

따라서, 클라이언트(1)는 공유키 K, 키 변형 인수 K2를 비밀키 생성 함수 Func2로 계산한 결과값인 클라이언트 비밀키 K', 즉 K1을 계산하고, 이를 송신자 인증을 위한 클라이언트측 세션유지정보 생성에 이용한다. 그리고 서버(2)는 공유키 K, 키 변형 인수 K2를 비밀키 생성 함수 Func2로 계산한 결과값인 서버 비밀키 K', 즉 K1을 계산하고, 이를 송신자 인증을 위한 서버측 세션유지정보 생성에 이용 한다.Accordingly, the client 1 calculates the client secret key K ', ie, K1, which is the result of calculating the shared key K and the key modification factor K2 by the secret key generation function Func2, and generates the client side session maintenance information for sender authentication. We use for. The server 2 calculates the server secret key K ', ie, K1, which is the result of calculating the shared key K and the key modification factor K2 by the secret key generation function Func2, and generates the server side session maintenance information for the sender authentication. I use it.

제2 실시예(②)에 따르면, K1이 공유키이다. According to the second embodiment (2), K1 is the shared key.

공유키 K가 K1인 경우 비밀키 생성 함수 Func2는 K1과 키 변형 인수 K2를 인수로 하여 새로운 결과값인 K3를 비밀키로 생성해낸다. 따라서, 클라이언트(1)는 공유키 K1, 키 변형 인수 K2를 비밀키 생성 함수 Func2로 계산한 결과값인 클라이언트 비밀키 K', 즉 K3를 계산하고, 이를 송신자 인증을 위한 클라이언트측 세션유지정보 생성에 이용한다. 그리고 서버(2)는 공유키 K1, 키 변형 인수 K2를 비밀키 생성 함수 Func2로 계산한 결과값인 서버 비밀키 K', 즉 K3를 계산하고, 이를 송신자 인증을 위한 서버측 세션유지정보 생성에 이용한다.When the shared key K is K1, the secret key generation function Func2 generates a new result, K3, as a secret key using K1 and the key modification factor K2 as arguments. Accordingly, the client 1 calculates the client secret key K ', that is, K3, which is the result of calculating the shared key K1 and the key modification factor K2 by the secret key generation function Func2, and generates the client side session maintenance information for sender authentication. We use for. The server 2 calculates the server secret key K ', that is, K3, which is the result of calculating the shared key K1 and the key modification factor K2 by the secret key generation function Func2, and generates the server side session maintenance information for sender authentication. I use it.

단계 S50을 통해 서버(2)와 클라이언트(1)는 안전한 키 교환 프로토콜을 통해 공유키 K를 공유함을 가정하고 이하 송신자 인증 방법을 설명하기로 한다. In step S50, it is assumed that the server 2 and the client 1 share the shared key K through a secure key exchange protocol, and the sender authentication method will be described below.

서버(2)는 클라이언트(1)로부터의 HTTP 요청(단계 S51)을 전송받고, 서버(2)는 난수 R을 생성한다(단계 S52). 이와 관련된 의사 코드는 하기와 같다. The server 2 receives the HTTP request (step S51) from the client 1, and the server 2 generates a random number R (step S52). The pseudo code related to this is as follows.

R = random()R = random ()

서버(2)는 난수 R과 서버 비밀키 K'를 이용하여 미리 정해진 함수로 계산한 결과값인 서버 인증값 S를 산출한다(단계 S58). 여기서, 서버 비밀키 K'는 서버(2)가 미리 공유키 K와 키 변형 인수 K2를 인수로 하여 비밀키 생성 함수 Func2로 계산한 결과값이다. The server 2 calculates the server authentication value S, which is a result calculated by the predetermined function using the random number R and the server secret key K '(step S58). Here, the server secret key K 'is a result of the server 2 previously calculating the secret key generation function Func2 using the shared key K and the key modification factor K2 as arguments.

여기서, 사용자 식별정보인 ID 등이 미리 정해진 함수의 인수로 더 포함될 수 있다. 이와 관련된 의사 코드는 하기와 같다.Here, ID, which is user identification information, may be further included as an argument of a predetermined function. The pseudo code related to this is as follows.

S = Func(K', R, ID, …)S = Func (K ', R, ID,…)

여기서, 미리 정해진 함수는 일방향 함수인 것이 바람직하다. 이러한 일방향 함수로는 해쉬 함수, 유사 난수 함수 등이 포함된다. Here, the predetermined function is preferably a one-way function. Such one-way functions include hash functions and pseudorandom functions.

서버(2)는 공유키 K, 키 변형 인수 K2, 난수 R, 서버 인증값 S를 웹 어플리케이션에서 제공하는 세션 또는 데이터베이스에 저장한다. 이와 관련된 의사 코드는 하기와 같다. The server 2 stores the shared key K, the key modification factor K2, the random number R, and the server authentication value S in a session or database provided by the web application. The pseudo code related to this is as follows.

Session = {K, K2, R, S}Session = {K, K2, R, S}

상술한 단계 S58은 후술한 단계 S52 이후 단계 S59 이전에 임의의 시점에서 서버(2)에서 수행되면 충분하다. It is sufficient that step S58 described above is performed at the server 2 at any point in time after step S52 and before step S59 described later.

서버(2)는 HTTP 응답을 통해 단계 S52에서 생성된 난수 R과 키 변형 인수 K2를 클라이언트(1)에 전송한다(단계 S53). 난수 R과 키 변형 인수 K2는 세션정보에 해당한다. 여기서, 세션정보는 사용자 세션 인증을 위해 서버(2)가 클라이언트(1)에 제공하는 정보를 의미한다.The server 2 transmits the random number R and the key modification factor K2 generated in step S52 to the client 1 through the HTTP response (step S53). The random number R and the key modification factor K2 correspond to session information. Here, the session information refers to information that the server 2 provides to the client 1 for user session authentication.

이 경우 HTTP 응답에는 클라이언트(1)에서 공유키 K와 키 변형 인수 K2를 이용하여 클라이언트 비밀키 K'를 계산하고, 클라이언트 비밀키 K'를 이용하여 클라이언트측 세션유지정보인 클라이언트 인증값 C를 계산하며, 산출된 클라이언트 인증값 C를 쿠키에 저장하도록 하는 실행코드(예를 들어, 자바스크립트 등)가 더 포함될 수 있다. In this case, in the HTTP response, the client 1 calculates the client secret key K 'using the shared key K and the key modification factor K2, and calculates the client authentication value C, which is client-side session maintenance information, using the client secret key K'. In addition, execution code (for example, JavaScript) may be further included to store the calculated client authentication value C in a cookie.

클라이언트(1)는 전송받은 키 변형 인수 K2와 소정의 저장 공간에 저장된 공 유키 K를 이용하여 비밀키 생성 함수 Func2로 계산한 클라이언트 비밀키 K'를 산출한다(단계 S54). The client 1 calculates the client secret key K 'calculated by the secret key generation function Func2 using the received key modification factor K2 and the shared key K stored in the predetermined storage space (step S54).

이후 클라이언트(1)는 전송받은 난수 R과, 단계 S54에서 산출된 클라이언트 비밀키 K'를 이용하여 미리 정해진 함수로 계산한 결과값, 즉 클라이언트측 세션유지정보인 클라이언트 인증값 C를 산출한다(단계 S55). 여기서, 사용자 식별정보인 ID 등이 미리 정해진 함수의 인수로 더 포함될 수 있다. 여기서, 미리 정해진 함수는 단계 S58에서 서버(2)가 이용한 일방향 함수와 동일해야 한다. After that, the client 1 calculates a result calculated by a predetermined function using the received random number R and the client secret key K 'calculated in step S54, that is, the client authentication value C which is client-side session maintenance information (step S54). S55). Here, ID, which is user identification information, may be further included as an argument of a predetermined function. Here, the predetermined function must be the same as the one-way function used by the server 2 in step S58.

이후 클라이언트(1)는 산출된 클라이언트 인증값 C를 쿠키에 저장한다(단계 S56). 이와 관련된 의사 코드는 하기와 같다. The client 1 then stores the calculated client authentication value C in a cookie (step S56). The pseudo code related to this is as follows.

setCookie(C = Func(K', R, ID, …))setCookie (C = Func (K ', R, ID,…))

여기서, 클라이언트 인증값 C를 쿠키에 저장한 직후에 공유키 K를 제외한 나머지는 모두 삭제하여 외부로 노출되지 않도록 한다. Here, immediately after storing the client authentication value C in the cookie, all but the shared key K is deleted to prevent exposure to the outside.

클라이언트(1)가 인증이 필요한 HTTP 요청을 하는 경우 새로운 클라이언트측 세션유지정보가 포함되어 서버(2)로 전송된다. 즉, 클라이언트 인증값 C를 저장하고 있는 쿠키가 자동으로 포함되어 서버(2)로 전송된다(단계 S57). When the client 1 makes an HTTP request requiring authentication, new client side session maintenance information is included and transmitted to the server 2. That is, the cookie storing the client authentication value C is automatically included and transmitted to the server 2 (step S57).

서버(2)는 쿠키에 포함된 클라이언트 인증값 C와 단계 S58에서 산출된 서버 인증값 S를 비교한다(단계 S59). 비교 결과 두 인증값이 다른 경우 단계 S60으로 진행하고, 동일한 경우 단계 S61로 진행한다. The server 2 compares the client authentication value C included in the cookie with the server authentication value S calculated in step S58 (step S59). The comparison proceeds to step S60 if the two authentication values are different, and if so, to step S61.

단계 S60에서, 두 인증값이 다른 경우는 서버 비밀키와 클라이언트 비밀키가 다른 경우로, 서버(2)는 클라이언트(1)의 송신자 인증이 실패한 것으로 간주하고 서버측 세션유지정보(난수 R, 공유키 K, 키 변형인수 K2 등)을 삭제하고 세션을 삭제한다. 이와 관련된 의사 코드는 하기와 같다. In step S60, if the two authentication values are different, the server secret key and the client secret key are different, the server 2 considers the sender authentication of the client 1 to have failed and server-side session maintenance information (random number R, shared). Key K, key modification factor K2, etc.) and delete the session. The pseudo code related to this is as follows.

Session destroy()Session destroy ()

그리고 클라이언트(1)에 저장된 클라이언트측 세션유지정보(공유키 K, 키 변형 인수 K2, 난수 R, 쿠키 등)가 모두 NULL로 설정되도록 하는 클라이언트측 스크립트, 플래시 또는 액티브X를 클라이언트(1)에 전송한다. 이 과정에서 사용자는 로그아웃된다. Then, the client-side script, flash, or ActiveX is transmitted to the client 1 so that all client-side session maintenance information (shared key K, key modification factor K2, random number R, cookie, etc.) stored in the client 1 is set to NULL. do. In this process, the user is logged out.

단계 S61에서, 두 인증값이 동일한 경우는 서버 비밀키와 클라이언트 비밀키가 동일한 경우로, 서버(2)는 클라이언트(1)의 송신자 인증이 성공한 것으로 간주하고, 새로운 난수 R을 생성한다(단계 S62). 그리고 클라이언트(1)가 HTTP 요청을 통해 요청한 서비스에 대한 HTTP 응답에 새로 생성된 난수 R과 키 변형 인수 K2를 첨부하여 클라이언트(1)에 전송한다(단계 S63). 이후 서버(2)는 다른 HTTP 요청을 받게 되면 단계 S59 이하의 과정을 반복하게 된다. In step S61, if the two authentication values are the same, the server secret key and the client secret key are the same, the server 2 considers the sender authentication of the client 1 to be successful, and generates a new random number R (step S62). ). Then, the client 1 attaches the newly generated random number R and the key modification factor K2 to the HTTP response to the service requested by the HTTP request to the client 1 (step S63). Thereafter, when the server 2 receives another HTTP request, the server 2 repeats the process of step S59 or below.

상술한 사용자 세션 관리 방법을 이용하면 사용자의 세션 자체는 보호받을 수 있지만, 여전히 송수신되는 HTTP의 내용은 도청될 수 있다. 도청으로부터 송수신되는 내용을 보호하기 위해서 HTTP의 내용 중 중요한 내용(예를 들어, 인터넷 뱅킹 서비스에서 계좌번호 등)을 클라이언트(1)와 서버(2)가 공유하는 비밀키를 이용하여 암호화하여 전송한다. 여기서, 암호화는 AES(advanced encryption standard)의 암호루틴을 이용한다. Using the above-described user session management method, the user's session itself can be protected, but the contents of HTTP which are still transmitted and received can be intercepted. In order to protect the contents transmitted and received from eavesdropping, important contents of HTTP contents (for example, account number in Internet banking service) are encrypted and transmitted using a secret key shared by the client 1 and the server 2. . Here, the encryption uses an encryption routine of the advanced encryption standard (AES).

서버(2)가 HTTP 응답을 하는 경우 중요한 내용을 비밀키를 이용하여 암호화하고, 클라이언트(1)에서 이를 복호화할 수 있도록 하는 클라이언트측 스크립트, 플래시 또는 액티브X를 함께 클라이언트(1)로 전송한다. When the server 2 makes an HTTP response, it encrypts the important content using the secret key, and transmits a client-side script, flash, or ActiveX together with the client 1 to enable the client 1 to decrypt it.

클라이언트(1)가 HTTP 요청을 하는 경우 중요한 내용을 비밀키로 암호화할 수 있도록 하는 암호루틴을 서버(2)가 HTTP 응답에 포함하여 전송한다. 이 경우 클라이언트(1)는 HTTP 요청을 생성할 때 암호루틴에 따라 비밀키를 이용하여 HTTP 내용 중 중요한 내용은 암호화가 가능하다. When the client 1 makes an HTTP request, the server 2 transmits the encryption routine included in the HTTP response so that the important content can be encrypted with the secret key. In this case, when the client 1 generates an HTTP request, important contents of the HTTP contents can be encrypted using a secret key according to an encryption routine.

클라이언트(1)와 서버(2)는 비밀키 또는 비밀키를 생성할 수 있는 공유키를 공유하고 있으므로, 암호화된 내용을 복호화하는 것은 어렵지 않음을 당업자는 이해할 것이다. Since the client 1 and the server 2 share a secret key or a shared key for generating a secret key, those skilled in the art will understand that it is not difficult to decrypt the encrypted contents.

이러한 HTTP 내용 중 일부의 암호화는 종래 SSL(secure sockets layer)을 이용한 것과는 다음과 같은 차이가 있다. SSL을 이용하는 경우 SSL은 전송 계층(Transport layer)이며, HTTP 내용 전체를 암호화하고, 도메인간의 세션 관리가 불가능하였다. 하지만, 상술한 것과 같이 클라이언트(1)와 서버(2)가 공유하고 있는 비밀키를 이용한 암호화는 응용 계층(Application layer)에서 이루어지며, HTTP 내용 중 일부만의 선택적인 암호화가 가능하고 도메인간의 세션 관리가 가능한 장점이 있다. The encryption of some of these HTTP contents is different from that of the conventional secure sockets layer (SSL) as follows. In case of using SSL, SSL is a transport layer, and the entire HTTP content is encrypted and session management between domains is not possible. However, as described above, the encryption using the secret key shared by the client 1 and the server 2 is performed in the application layer, and it is possible to selectively encrypt only some of the HTTP contents and manage sessions between domains. There is a possible advantage.

또한, 본 발명에서 윈도우 이름을 공유키의 저장 공간으로 이용하는 경우 자식 창을 사용하는 경우에는 window.name=opener.name과 같은 방법 등을 통해서 부모 창이 저장하고 있는 공유키를 자식 창에서도 공유하도록 한다. 여기서, opener.name이 부모 창의 윈도우 이름이다. In the present invention, when using a window name as a storage space for the shared key, when using a child window, the shared key stored in the parent window is shared in the child window through a method such as window.name = opener.name. . Where opener.name is the window name of the parent window.

상술한 안전한 사용자 세션 관리 방법에 의하는 경우에도 사용자의 행동패턴이나 네트워크 상황에 따른 세션정보(도 3에서는 난수, 도 4에서는 난수와 키 변형 인수)의 비동기화로 인해 서버(2)에서 클라이언트(1)의 공유키 저장 여부 검증이 어려운 바 이하에서는 이를 해결한 사용자 세션 관리 방법을 설명하기로 한다. Even in the above-described secure user session management method, due to the asynchronousization of session information (random number in FIG. 3, random number and key transformation factor in FIG. 4) according to a user's behavior pattern or network situation, the server 2 may execute the client 1. ), It is difficult to verify whether the shared key is saved.

도 5a는 본 발명의 일 실시예에 따른 안전한 사용자 세션 관리 방법을 설명하기 위한 도면이고, 도 5b는 도 5a의 서버에서 실행되는 의사 코드이다. FIG. 5A is a diagram illustrating a secure user session management method according to an embodiment of the present invention, and FIG. 5B is pseudo code executed in the server of FIG. 5A.

클라이언트(1)와 서버(2)는 안전한 키 교환 프로토콜(예를 들어, PAKE 등)을 이용하여 공유키 K를 공유한다(단계 S70). 이는 웹 서비스의 사용자 로그인 과정에서 적용된다.The client 1 and the server 2 share the shared key K using a secure key exchange protocol (for example, PAKE, etc.) (step S70). This is applied during the user login process of the web service.

여기서, 클라이언트(1)는 공유키 K를 소정의 저장 공간(WLA: 윈도우 이름(window.name), 플래시의 지역 공유 객체(LSO), 액티브X 등)에 저장한다. Here, the client 1 stores the shared key K in a predetermined storage space (WLA: window.name, local shared object (LSO) of Flash, ActiveX, etc.).

서버(2)는 공유키 K 이외에 최대 문턱 시간(MAXt), 최대 문턱 카운터(MAXc), 최대 검증 문턱 시간(MAXv)의 상수(constant)와, 카운터(counter), 타임스탬프(TS: timestamp), 검증 타임스탬프(TV)의 변수를 저장한다. In addition to the shared key K, the server 2 includes constants of a maximum threshold time MAXt, a maximum threshold counter MAXc, a maximum verification threshold time MAXv, a counter, a timestamp (TS), Stores the variables of the verification timestamp (TV).

각 변수의 초기치는 다음과 같다. The initial value of each variable is as follows.

counter = 0, TS = ctime(), TV = 0counter = 0, TS = ctime (), TV = 0

여기서, ctime()은 현재 시각을 나타내는 함수이다. Here, ctime () is a function representing the current time.

여기서, 제1 서버 인증값 S1에는 임의의 값으로 초기화되어 있다. 제1 서버 인증값 S1에는 제2 서버 인증값 S2가 갱신되는 경우 갱신되기 이전의 제2 서버 인증값 S2를 복사한다. Here, the first server authentication value S1 is initialized to an arbitrary value. When the second server authentication value S2 is updated, the second server authentication value S2 is copied to the first server authentication value S1.

클라이언트(1)로부터의 HTTP 요청을 수신하면(단계 S71), 서버(2)는 난수 R를 생성하고, 생성한 난수 R과 서버(2)에 저장된 공유키 K를 이용하여 미리 정해진 함수로 제2 서버 인증값 S2를 계산한다. 미리 정해진 함수는 일방향 함수인 것이 바람직하다. 그리고 사용자 식별정보 ID가 미리 정해진 함수의 인수로 더 포함될 수 있다. Upon receiving the HTTP request from the client 1 (step S71), the server 2 generates a random number R and uses the generated random number R and the shared key K stored in the server 2 to generate a second function with a predetermined function. Compute the server authentication value S2. Preferably, the predetermined function is a one-way function. The user identification information ID may be further included as an argument of a predetermined function.

서버(2)는 단계 S71에서 생성한 난수 R을 포함하는 HTTP 응답을 클라이언트(1)에 전송한다(단계 S72). The server 2 transmits an HTTP response including the random number R generated in step S71 to the client 1 (step S72).

서버(2)는 제1 서버 인증값 S1, 제2 서버 인증값 S2 및 제2 서버 인증값 S2에 상응하는 난수 R을 웹 어플리케이션에서 제공하는 세션 또는 데이터베이스에 저장한다. The server 2 stores a random number R corresponding to the first server authentication value S1, the second server authentication value S2, and the second server authentication value S2 in a session or database provided by the web application.

클라이언트(1)는 단계 S72에서 전송된 HTTP 응답을 수신한다. 클라이언트(1)는 수신한 HTTP 응답에 포함된 난수 R이 이미 소정의 저장 공간에 저장되어 있는 난수와 다를 경우에만 수신한 HTTP 응답에 포함된 난수 R과 클라이언트(1)에 저장된 공유키 K를 이용하여 미리 정해진 함수로 클라이언트 인증값 C를 계산한다. 미리 정해진 함수는 서버(2)에서 이용되는 일방향 함수와 동일한 것이 바람직하다. 사용자 식별정보 ID가 미리 정해진 함수의 인수로 더 포함될 수 있다. 그리고 HTTP 응답에 포함된 난수 R을 소정의 저장 공간에 덮어 쓴다. The client 1 receives the HTTP response sent in step S72. The client 1 uses the random number R included in the received HTTP response and the shared key K stored in the client 1 only if the random number R included in the received HTTP response is different from the random number already stored in the predetermined storage space. The client authentication value C is calculated using a predetermined function. The predetermined function is preferably the same as the one-way function used in the server 2. The user identification information ID may be further included as an argument of a predetermined function. The random number R included in the HTTP response is overwritten in a predetermined storage space.

클라이언트 인증값 C는 쿠키에 저장한다. 클라이언트(1)의 HTTP 요청의 헤더 에 쿠키는 자동으로 포함되어 서버(2)로 전송된다(단계 S73). The client authentication value C is stored in a cookie. The cookie is automatically included in the header of the HTTP request of the client 1 and transmitted to the server 2 (step S73).

서버(2)는 쿠키에 포함된 클라이언트 인증값 C가 서버(2)가 가지고 있는 제1 서버 인증값 S1과 동일하고 ctime()-TS가 최대 문턱 시간(MAXt) 이내라면 시간 유연 루틴인 의사 코드 모듈 T1을 수행한다. 여기서, 최대 문턱 시간(MAXt)은 연속적인 HTTP 응답을 동시다발적인 하나의 HTTP 응답 그룹으로 묶을 수 있는 시간이다. The server 2 is a pseudo-code which is a time flexible routine if the client authentication value C contained in the cookie is equal to the first server authentication value S1 possessed by the server 2 and ctime ()-TS is within the maximum threshold time MAXt. Perform module T1. Here, the maximum threshold time MAXt is a time for grouping successive HTTP responses into one concurrent HTTP response group.

시간 유연 루틴(T1)에서, 타임스탬프(TS)에 현재 시간(ctime())을 저장한다. 이는 이후 연속적인 HTTP 응답이 최대 문턱 시간 이내에 도달하는지 여부를 판단하기 위한 기준이 된다. 그리고 카운터(counter)는 0으로 초기화한다. 카운터는 재검증 루틴(T3)에서 설명하기로 한다. 그리고 클라이언트(1)에 현재 서버(2)가 저장하고 있는 난수 R을 HTTP 응답에 포함시켜 전송한다(단계 S76). In the time smoothing routine T1, the current time ctime () is stored in the time stamp TS. This is then a criterion for determining whether successive HTTP responses arrive within the maximum threshold time. The counter is initialized to zero. The counter will be described in the revalidation routine T3. Then, the client 1 transmits the random number R stored in the server 2 in the HTTP response (step S76).

HTTP 요청 #1(S73), HTTP 요청 #2(S74), HTTP 요청 #3(S75), HTTP 요청 #4(S77)이 동시다발적인 하나의 HTTP 응답 그룹인 것으로 가정한다. It is assumed that HTTP request # 1 (S73), HTTP request # 2 (S74), HTTP request # 3 (S75), and HTTP request # 4 (S77) are one simultaneous HTTP response group.

이 경우 서버(2)는 HTTP 요청 #1이 서버(2)에 도착한 시점인 HR1으로부터 최대 문턱 시간(MAXt) 이내인 HR1'까지 도착하는 HTTP 요청 #2를 시간 유연 루틴(T1)에 의해 동시다발적인 하나의 HTTP 응답 그룹으로 판단한다. In this case, the server 2 simultaneously bundles the HTTP request # 2 arriving from the HR1, which is the point at which the HTTP request # 1 arrives at the server 2, to the HR1 'which is within the maximum threshold time MAXt, by the time flexible routine T1. One HTTP response group.

그리고 서버(2)는 HTTP 요청 #2가 서버(2)에 도착한 시점인 HR2로부터 최대 문턱 시간(MAXt) 이내인 HR2'까지 도착하는 HTTP 요청 #3을 시간 유연 루틴(T1)에 의해 동시다발적인 하나의 HTTP 응답 그룹으로 판단한다.In addition, the server 2 simultaneously generates an HTTP request # 3 arriving at the HR2 'within the maximum threshold time MAXt from HR2, which is the point at which the HTTP request # 2 arrives at the server 2, by the time-flexible routine T1. Determined as one HTTP response group.

하지만, 서버(2)는 HTTP 요청 #3이 서버(2)에 도착한 시점인 HR3으로부터 최대 문턱 시간(MAXt) 이내인 HR3'까지 도착하지 못한 HTTP 요청 #4는 동시다발적인 하나의 HTTP 응답 그룹으로 판단하지 못한다. HTTP 요청 #4는 추후 재검증 루틴(T3)을 통해 재검증이 이루어진다. However, the server 2 does not arrive from HR3 when the HTTP request # 3 arrives at the server 2 to HR3 'within the maximum threshold time MAXt. The HTTP request # 4 is a group of simultaneous HTTP responses. I can't judge. HTTP request # 4 is revalidated later through the revalidation routine (T3).

쿠키에 포함된 클라이언트 인증값 C가 서버(2)가 가지고 있는 제2 서버 인증값 S2와 동일하다면 서버(2)는 갱신 루틴인 의사 코드 모듈 T2를 수행한다. 클라이언트(1)에 제2 서버 인증값 S2에 상응하는 난수가 저장되었으므로, 서버(2)는 새로운 난수를 생성한다. 그리고 제2 서버 인증값 S2를 제1 서버 인증값 S1에 복사한다. 그리고 제2 서버 인증값 S2에는 새로운 난수와 공유키 K를 이용하여 미리 정해진 함수로 계산한 함수값을 저장한다. 그리고 타임스탬프는 현재 시각을 저장하고 카운터는 0으로 초기화한다. 그리고 클라이언트(1)에 현재 서버(2)가 새로 생성한 난수 R을 HTTP 응답에 포함시켜 전송한다. If the client authentication value C included in the cookie is the same as the second server authentication value S2 owned by the server 2, the server 2 performs a pseudo code module T2 which is an update routine. Since the random number corresponding to the second server authentication value S2 has been stored in the client 1, the server 2 generates a new random number. Then, the second server authentication value S2 is copied to the first server authentication value S1. The second server authentication value S2 stores a function value calculated by a predetermined function using the new random number and the shared key K. The timestamp stores the current time and the counter resets to zero. Then, the server 1 transmits the newly generated random number R included in the HTTP response to the client 1.

상술한 조건을 모두 만족하지 않는 경우 서버(2)는 재검증 루틴인 의사 코드 모듈 T3를 수행한다. 재검증 루틴(T3)은 반복 루틴(F1), 시간 루틴(F2), 삭제 루틴(F3)을 포함한다. If all of the above conditions are not satisfied, the server 2 performs the pseudo code module T3 which is a revalidation routine. The revalidation routine T3 includes an iteration routine F1, a time routine F2, and a deletion routine F3.

반복 루틴(F1)에서, 서버(2)는 카운터를 1씩 증가시키면서 서버(2)가 저장하고 있는 난수 R과, 클라이언트(1)가 난수 R 및 클라이언트(1)에 저장된 공유키 K를 이용하여 계산한 새로운 클라이언트 인증값 C를 즉시 HTTP 요청하도록 하는 실행코드(예를 들어, 클라이언트측 스크립트, 플래시, 액티브X 등)를 포함하는 HTTP 응답을 클라이언트(1)에 전송한다(단계 S78). 이러한 HTTP 응답을 CFA 응답(CFA response)이라고 정의한다. 검증 타임스탬프(TV)는 현재 시각을 저장한다. In the iterative routine F1, the server 2 increases the counter by one, using the random number R stored in the server 2, and the client 1 using the random number R and the shared key K stored in the client 1; An HTTP response including the execution code (for example, client-side script, flash, ActiveX, etc.) for immediately HTTP requesting the calculated new client authentication value C is transmitted to the client 1 (step S78). This HTTP response is defined as a CFA response. The verification timestamp (TV) stores the current time.

클라이언트(1)는 수신한 CFA 응답에 따라 단계 S78에서 수신한 난수 R을 이용하여 계산한 새로운 클라이언트 인증값 C를 쿠키에 저장 또는 HTTP 요청에 get 또는post 형식으로 첨부하여 서버(2)에 전송한다(단계 S79). The client 1 transmits the new client authentication value C calculated using the random number R received in step S78 according to the received CFA response to the server 2 by storing it in a cookie or attaching it in a get or post format to an HTTP request. (Step S79).

반복 루틴(F1)에서 송신자 인증이 될 때까지 소정 횟수 반복한다. 여기서, 소정 횟수는 최대 문턱 카운터(MAXc)에 저장된 값이다. The repetition routine F1 repeats a predetermined number of times until the sender authentication. Here, the predetermined number is a value stored in the maximum threshold counter MAXc.

소정 횟수를 초과하더라도 서버(2)는 시간 루틴(F2)을 수행하여, ctime()-검증 타임스탬프(TV)가 최대 검증 문턱 시간(MAXv) 이내라면 서버(2)가 저장하고 있는 난수 R과, 클라이언트(1)가 난수 R 및 클라이언트(1)에 저장된 공유키 K를 이용하여 계산한 새로운 클라이언트 인증값 C를 즉시 HTTP 요청하도록 하는 실행코드(예를 들어, 클라이언트측 스크립트, 플래시, 액티브X 등)를 포함하는 HTTP 응답을 클라이언트(1)에 전송한다.Even if the predetermined number is exceeded, the server 2 executes the time routine F2, so that if the ctime ()-verification timestamp TV is within the maximum verification threshold time MAXv, the server 2 stores the random number R stored in the server 2; Execution code (eg, client-side script, Flash, ActiveX, etc.) that causes the client 1 to immediately request an HTTP request for a new client authentication value C calculated using the random number R and the shared key K stored in the client 1. Send an HTTP response to the client (1).

반복 루틴(F1)과 시간 루틴(F2)에 의해서도 송신자 인증이 안 되는 경우 최종적으로 송신자 인증이 실패한 것으로 간주하고 사용자 세션을 삭제한다(삭제 루틴(F3)). 그리고 사용자는 로그아웃된다. If the sender authentication fails even by the repetition routine F1 and the time routine F2, the sender authentication is finally considered to have failed and the user session is deleted (delete routine F3). The user is logged out.

사용자가 로그아웃되거나 로그아웃하는 경우 서버(2)는 사용자 세션유지정보(공유키 K, 각종 상수들(MAXt, MAXc, MAXv), 각종 변수들(counter, TS, TV), 난수 R, 서버 인증값(S1, S2))를 삭제한다. 그리고 클라이언트(2)의 소정 저장 공간에 저장된 공유키 K, 난수 R, 쿠키 등을 모두 NULL 로 설정하도록 클라이언트(1)에 클라이언트측 스크립트, 플래시 또는 액티브X를 전송한다. When the user logs out or logs out, the server 2 maintains user session maintenance information (shared key K, various constants (MAXt, MAXc, MAXv), various variables (counter, TS, TV), random number R, server authentication. Delete the values (S1, S2). Then, the client side script, flash, or ActiveX is transmitted to the client 1 to set the shared key K, the random number R, the cookie, and the like stored in the predetermined storage space of the client 2 all to NULL.

도 6a는 본 발명의 다른 실시예에 따른 안전한 사용자 세션 관리 방법을 설명하기 위한 도면이고, 도 6b는 도 6a의 서버에서 실행되는 의사 코드이다. FIG. 6A is a diagram for describing a secure user session management method according to another embodiment of the present invention, and FIG. 6B is pseudo code executed in the server of FIG. 6A.

도 5a 및 5b에 도시된 일 실시예는 클라이언트 인증값, 서버 인증값을 생성함에 있어서 공유키 K를 직접 이용하는 것에 비해 도 6a 및 6b에 도시된 다른 실시예는 공유키 K와 키 변형 인수 K2를 이용하여 비밀키 K'를 생성하고, 비밀키 K'를 이용하여 클라이언트 인증값, 서버 인증값을 생성하는 것이 차이가 있다. 키 변형 인수를 이용하는 것은 도 4를 참조하여 상세히 설명하였는 바 상세한 설명은 생략하기로 한다. 5A and 5B show the use of the shared key K in generating the client authentication value and the server authentication value, whereas the other embodiment shown in FIGS. 6A and 6B uses the shared key K and the key modification factor K2. There is a difference in generating a secret key K 'by using the secret key K' and generating a client authentication value and a server authentication value by using the secret key K '. Using the key modification factor has been described in detail with reference to FIG. 4, and thus the detailed description thereof will be omitted.

한편, 상술한 사용자 세션 관리 방법은 컴퓨터 프로그램으로 작성 가능하다. 상기 프로그램을 구성하는 코드들 및 코드 세그먼트들은 당해 분야의 컴퓨터 프로그래머에 의하여 용이하게 추론될 수 있다. 또한, 상기 프로그램은 컴퓨터가 읽을 수 있는 정보저장매체(computer readable media)에 저장되고, 컴퓨터에 의하여 읽혀지고 실행됨으로써 문서 탐색 서비스 제공 방법을 구현한다. 상기 정보저장매체는 자기 기록매체, 광 기록매체, 및 캐리어 웨이브 매체를 포함한다.On the other hand, the user session management method described above can be created by a computer program. Codes and code segments constituting the program can be easily inferred by a computer programmer in the art. In addition, the program is stored in a computer readable media, and read and executed by a computer to implement a method for providing a document search service. The information storage medium includes a magnetic recording medium, an optical recording medium, and a carrier wave medium.

상기에서는 본 발명에 대하여 그 실시예를 중심으로 설명하였지만, 해당 기술 분야에서 통상의 지식을 가진 자라면 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.In the above, the present invention has been described based on the embodiments, but those skilled in the art may vary the present invention without departing from the spirit and scope of the present invention as set forth in the claims below. It will be understood that modifications and changes can be made.

도 1은 본 발명에 적용되는 시도-응답 프로토콜의 인증 방법을 설명한 도면.1 illustrates an authentication method of a challenge-response protocol applied to the present invention.

도 2는 본 발명의 일 실시예에 따른 서버에 포함되는 세션 관리 모듈의 블록구성도.2 is a block diagram of a session management module included in a server according to an embodiment of the present invention.

도 3은 안전한 사용자 세션 관리 방법, HTTP 요청의 송신자 인증 프로토콜을 설명한 도면.3 illustrates a method for secure user session management and a sender authentication protocol for HTTP requests.

도 4는 다른 안전한 사용자 세션 관리 방법, 키 보호모드에서의 HTTP 요청의 송신자 인증 프로토콜을 설명한 도면. 4 illustrates another secure user session management method, a sender authentication protocol of an HTTP request in key protected mode.

도 5a는 본 발명의 일 실시예에 따른 안전한 사용자 세션 관리 방법을 설명하기 위한 도면.5A is a diagram for explaining a secure user session management method according to one embodiment of the present invention;

도 5b는 도 5a의 서버에서 실행되는 의사 코드. FIG. 5B is pseudo code executed on the server of FIG. 5A. FIG.

도 6a는 본 발명의 다른 실시예에 따른 안전한 사용자 세션 관리 방법을 설명하기 위한 도면.6A is a diagram illustrating a secure user session management method according to another embodiment of the present invention.

도 6b는 도 6a의 서버에서 실행되는 의사 코드. FIG. 6B is pseudo code executed on the server of FIG. 6A. FIG.

<도면의 주요부분에 대한 부호의 설명><Description of the symbols for the main parts of the drawings>

1: 클라이언트1: client

2: 서버2: server

Claims (22)

웹 환경에서 네트워크를 통해 클라이언트와 연결된 서버에서 상기 클라이언트와의 사용자 세션을 관리하는 방법에 있어서,상기 서버가 이전에 생성한 난수와 상기 서버에 저장된 공유키를 이용하여 제1 서버 인증값을 계산하는 단계;A method of managing a user session with a client in a server connected to a client through a network in a web environment, the method comprising: calculating a first server authentication value using a random number previously generated by the server and a shared key stored in the server step; 난수를 새로 생성하는 단계;Generating a new random number; 상기 난수와 상기 서버에 저장된 공유키를 이용하여 제2 서버 인증값을 계산하는 단계;Calculating a second server authentication value using the random number and the shared key stored in the server; 상기 난수를 포함하는 HTTP 응답(HTTP response)을 상기 클라이언트에 전송하는 단계;Sending an HTTP response including the random number to the client; 상기 클라이언트로부터 쿠키(cookie)를 포함하는 HTTP 요청(HTTP request)을 전송받는 단계-여기서, 상기 쿠키는 클라이언트 인증값을 포함하고, 상기 클라이언트 인증값은 상기 클라이언트에 저장된 공유키와 상기 클라이언트가 전송받은 HTTP 응답에 포함된 난수를 이용하여 계산됨-; 및Receiving an HTTP request including a cookie from the client, wherein the cookie includes a client authentication value, wherein the client authentication value is a shared key stored in the client and the client received Calculated using a random number included in the HTTP response; And 상기 제1 서버 인증값 및 상기 제2 서버 인증값 중 어느 하나와 상기 클라이언트 인증값을 비교하여 상기 클라이언트의 송신자 인증의 성공 또는 실패를 결정하는 단계를 포함하는 사용자 세션 관리 방법.Comparing the client authentication value with any one of the first server authentication value and the second server authentication value to determine success or failure of sender authentication of the client. 제1항에 있어서,The method of claim 1, 상기 서버는 상기 클라이언트로부터의 사용자 로그인 과정에서 상기 공유키를 상기 클라이언트와 공유하는 것을 특징으로 하는 사용자 세션 관리 방법. And the server shares the shared key with the client during a user login process from the client. 제1항에 있어서,The method of claim 1, 상기 결정 단계는, The determining step, 상기 클라이언트 인증값과 상기 제1 서버 인증값이 동일하고 상기 HTTP 요청의 도착 시점이 직전 HTTP 요청의 도착 시점으로부터 소정 시간 경과 이전인 경우 상기 송신자 인증이 성공한 것으로 결정하는 것을 특징으로 하는 사용자 세션 관리 방법.And determining that the sender authentication succeeds when the client authentication value and the first server authentication value are the same and the arrival time of the HTTP request is a predetermined time elapsed from the arrival time of the previous HTTP request. . 제3항에 있어서,The method of claim 3, 상기 송신자 인증이 성공한 경우 상기 제2 서버 인증값의 계산에 이용된 난수를 HTTP 응답에 포함시켜 상기 클라이언트에 전송하는 단계를 더 포함하는 사용자 세션 관리 방법. And if the sender authentication succeeds, including the random number used to calculate the second server authentication value in an HTTP response and transmitting the same to the client. 제1항에 있어서,The method of claim 1, 상기 결정 단계는, The determining step, 상기 클라이언트 인증값과 상기 제2 서버 인증값이 동일한 경우 상기 송신자 인증이 성공한 것으로 결정하되, If the client authentication value and the second server authentication value is the same, it is determined that the sender authentication is successful, 난수를 새로 생성하는 단계;Generating a new random number; 상기 제2 서버 인증값을 상기 제1 서버 인증값에 복사하는 단계;Copying the second server authentication value to the first server authentication value; 상기 새로 생성된 난수 및 상기 서버에 저장된 공유키를 이용하여 상기 제2 서버 인증값을 갱신하는 단계; 및Updating the second server authentication value using the newly generated random number and the shared key stored in the server; And 상기 새로 생성된 난수를 HTTP 응답에 포함시켜 상기 클라이언트에 전송하는 단계를 더 포함하는 사용자 세션 관리 방법. And including the newly generated random number in an HTTP response and transmitting it to the client. 제1항에 있어서,The method of claim 1, 상기 결정 단계는, The determining step, 상기 클라이언트 인증값이 상기 제1 서버 인증값 및 상기 제2 서버 인증값과 동일하지 않은 경우 상기 송신자 인증이 실패한 것으로 결정하는 것을 특징으로 하는 사용자 세션 관리 방법. And if the client authentication value is not the same as the first server authentication value and the second server authentication value, determine that the sender authentication has failed. 제6항에 있어서,The method of claim 6, 상기 난수와, 상기 클라이언트가 상기 난수 및 상기 클라이언트에 저장된 공유키를 이용하여 계산한 새로운 클라이언트 인증값을 즉시 HTTP 요청하도록 하는 실행코드를 포함하는 HTTP 응답을 상기 클라이언트에 전송하는 단계를 더 포함하는 사용자 세션 관리 방법. And transmitting the HTTP response to the client, the HTTP response including the random number and execution code for allowing the client to immediately request a new client authentication value calculated using the random number and the shared key stored in the client. Session management method. 제7항에 있어서,The method of claim 7, wherein 상기 난수와 상기 실행 코드를 포함하는 HTTP 응답의 전송 단계는 소정 횟수 동안 반복하는 것을 특징으로 하는 사용자 세션 관리 방법. And transmitting the HTTP response including the random number and the execution code repeats for a predetermined number of times. 제8항에 있어서,The method of claim 8, 상기 소정 횟수를 반복한 이후에 소정 시간 동안 상기 난수와 상기 실행 코드를 포함하는 HTTP 응답의 전송 단계를 반복하는 것을 특징으로 하는 사용자 세션 관리 방법. And transmitting the HTTP response including the random number and the execution code for a predetermined time after repeating the predetermined number of times. 제9항에 있어서,The method of claim 9, 상기 소정 시간이 경과한 후에 상기 사용자 세션을 삭제시키는 단계를 더 포함하는 사용자 세션 관리 방법. And deleting the user session after the predetermined time has elapsed. 제1항에 있어서,The method of claim 1, 상기 제1 서버 인증값 및 상기 제2 서버 인증값은 상기 서버에 저장된 공유키와 키 변형 인수를 이용하여 생성된 서버 비밀키 및 상기 난수를 인수로 하는 일방향 함수로 계산된 것을 특징으로 하는 사용자 세션 관리 방법.Wherein the first server authentication value and the second server authentication value are calculated as a one-way function using the server secret key and the random number generated using the shared key and the key modification factor stored in the server. How to manage. 제11항에 있어서,The method of claim 11, 상기 HTTP 응답을 상기 클라이언트에 전송하는 단계는 상기 키 변형 인수를 상기 HTTP 응답에 더 포함하여 전송하는 것을 특징으로 하는 사용자 세션 관리 방법. And transmitting the HTTP response to the client further includes the key modification factor in the HTTP response. 제12항에 있어서,The method of claim 12, 상기 클라이언트 인증값은 상기 클라이언트에 저장된 공유키와 상기 키 변형 인수를 이용하여 생성된 클라이언트 비밀키 및 상기 난수를 인수로 하는 일방향 함수로 계산된 것을 특징으로 하는 사용자 세션 관리 방법. And the client authentication value is calculated using a shared secret stored in the client, a client secret key generated by using the key modification factor, and a one-way function having the random number as an argument. 웹 환경에서 네트워크를 통해 서버와 연결된 클라이언트에서 사용자 세션을 관리하는 방법에 있어서,In a web environment, a method for managing a user session from a client connected to a server via a network, 상기 클라이언트가 상기 서버와 공유키를 공유하는 단계;Sharing, by the client, a shared key with the server; 상기 공유키를 웹 브라우저의 문서 객체 모델(DOM: Document Object Model)의 윈도우 객체의 속성 중 윈도우 이름(window.name), 플래시(Flash)의 지역 공유 객체(LSO: Local Shared Object) 또는 액티브X에 저장하는 단계;The shared key may be assigned to a window name (window.name), a local shared object (LSO) or ActiveX of a window object of a document object model (DOM) of a web browser. Storing; 상기 서버로부터의 HTTP 응답을 전송받는 단계-상기 HTTP 응답은 상기 서버에서 생성된 세션정보를 포함함-;Receiving an HTTP response from the server, wherein the HTTP response includes session information generated at the server; 상기 세션정보와 상기 공유키를 이용하여 클라이언트 인증값을 계산하는 단계; 및Calculating a client authentication value using the session information and the shared key; And 상기 클라이언트 인증값을 쿠키에 저장하는 단계를 포함하되,Storing the client authentication value in a cookie; 상기 세션정보는 상기 공유키를 저장한 저장 공간에 저장되는 것을 특징으로 하는 사용자 세션 관리 방법. And the session information is stored in a storage space storing the shared key. 제14항에 있어서,The method of claim 14, 상기 서버로부터 복수의 HTTP 응답을 전송받는 단계를 더 포함하되, Further comprising the step of receiving a plurality of HTTP responses from the server, 상기 복수의 HTTP 응답에 포함된 세션정보와 상기 저장 공간에 저장된 세션정보가 동일한 경우 이미 생성된 상기 쿠키를 재사용하고, If the session information included in the plurality of HTTP responses and the session information stored in the storage space are the same, the cookie already generated is reused. 다른 경우 상기 저장 공간에 저장된 세션정보를 갱신하고 상기 갱신된 세션정보를 이용하여 상기 클라이언트 인증값을 새로 계산하고 상기 쿠키를 새로 생성하는 것을 특징으로 하는 사용자 세션 관리 방법.And in other cases, update session information stored in the storage space, newly calculate the client authentication value using the updated session information, and generate the cookie. 제14항에 있어서,The method of claim 14, 소정 시간 이내에 송신자 인증이 필요한 복수의 HTTP 요청시 각 상기 HTTP 요청은 상기 저장 공간에 저장된 세션정보를 이용하여 생성된 클라이언트 인증값을 포함하는 쿠키를 공통으로 포함하여 상기 서버에 전송되는 단계를 더 포함하는 것을 특징으로 하는 사용자 세션 관리 방법.In the case of a plurality of HTTP requests requiring sender authentication within a predetermined time, each HTTP request further includes a step of transmitting to the server including a cookie including a client authentication value generated using the session information stored in the storage space in common. User session management method, characterized in that. 제14항에 있어서,The method of claim 14, 상기 클라이언트 인증값은 상기 세션정보와 상기 공유키를 이용하여 일방향 함수로 계산된 것을 특징으로 하는 사용자 세션 관리 방법. The client authentication value is calculated using a one-way function using the session information and the shared key. 제14항에 있어서,The method of claim 14, 상기 세션정보는 난수인 것을 특징으로 하는 사용자 세션 관리 방법. And the session information is a random number. 제14항에 있어서,The method of claim 14, 상기 세션정보는 난수와 키 변형 인수를 포함하는 것을 특징으로 하는 사용 자 세션 관리 방법. The session information includes a random number and a key modification factor. 제19항에 있어서,The method of claim 19, 상기 클라이언트 인증값은 상기 클라이언트에 저장된 상기 공유키 및 상기 키 변형 인수를 이용하여 계산한 클라이언트 비밀키와, 상기 HTTP 응답에 포함된 상기 난수를 인수로 하는 일방향 함수로 계산되는 것을 특징으로 하는 사용자 세션 관리 방법. The client authentication value is calculated as a one-way function that takes a client secret key calculated using the shared key and the key modification factor stored in the client, and the random number included in the HTTP response. How to manage. 제1항 내지 제13항 중 어느 한 항의 방법을 컴퓨터에서 실행하기 위한 프로그램을 기록하는 컴퓨터 판독 가능한 기록매체.A computer-readable recording medium for recording a program for executing the method of any one of claims 1 to 13 on a computer. 제14항 내지 제20항 중 어느 한 항의 방법을 컴퓨터에서 실행하기 위한 프로그램을 기록하는 컴퓨터 판독 가능한 기록매체. A computer-readable recording medium for recording a program for executing the method of any one of claims 14 to 20 on a computer.
KR1020070100637A 2007-10-05 2007-10-05 Secure user session managing method under web environment and recording medium recorded program executing it KR100969196B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020070100637A KR100969196B1 (en) 2007-10-05 2007-10-05 Secure user session managing method under web environment and recording medium recorded program executing it
US11/965,941 US20090094372A1 (en) 2007-10-05 2007-12-28 Secret user session managing method and system under web environment, recording medium recorded program executing it

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070100637A KR100969196B1 (en) 2007-10-05 2007-10-05 Secure user session managing method under web environment and recording medium recorded program executing it

Publications (2)

Publication Number Publication Date
KR20090035381A true KR20090035381A (en) 2009-04-09
KR100969196B1 KR100969196B1 (en) 2010-07-09

Family

ID=40760832

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070100637A KR100969196B1 (en) 2007-10-05 2007-10-05 Secure user session managing method under web environment and recording medium recorded program executing it

Country Status (1)

Country Link
KR (1) KR100969196B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170077003A (en) * 2015-12-27 2017-07-05 전자부품연구원 Light Encryption/Decryption Method and System using a Symmetric Cryptographic Algorithm
KR101969723B1 (en) 2017-10-26 2019-04-17 충남대학교산학협력단 Manufacturing method of biodegradable micro-beads by melt electrospray process

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101492821B1 (en) 2013-07-30 2015-02-12 캠프모바일 주식회사 Method and system for transmitting key securely to hypertext transfer protocol page

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10340255A (en) 1997-06-10 1998-12-22 Kyushu Nippon Denki Software Kk System for authenticating network user
JP2004023662A (en) 2002-06-19 2004-01-22 Acs:Kk Mutual authentication method
KR100535626B1 (en) * 2002-06-28 2005-12-08 주식회사 케이티 Non-interactive Mobile Authentification Method
JP4540353B2 (en) 2004-01-23 2010-09-08 三菱電機株式会社 Authentication system and terminal device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170077003A (en) * 2015-12-27 2017-07-05 전자부품연구원 Light Encryption/Decryption Method and System using a Symmetric Cryptographic Algorithm
KR101969723B1 (en) 2017-10-26 2019-04-17 충남대학교산학협력단 Manufacturing method of biodegradable micro-beads by melt electrospray process

Also Published As

Publication number Publication date
KR100969196B1 (en) 2010-07-09

Similar Documents

Publication Publication Date Title
US20090094372A1 (en) Secret user session managing method and system under web environment, recording medium recorded program executing it
US10212173B2 (en) Deterministic reproduction of client/server computer state or output sent to one or more client computers
JP4864289B2 (en) Network user authentication system and method
US8196193B2 (en) Method for retrofitting password enabled computer software with a redirection user authentication method
US7150038B1 (en) Facilitating single sign-on by using authenticated code to access a password store
CN111355726B (en) Identity authorization login method and device, electronic equipment and storage medium
WO2016173199A1 (en) Mobile application single sign-on method and device
Beckles et al. Mechanisms for increasing the usability of grid security
WO2022057002A1 (en) Abnormal request processing method and device
Kornienko et al. The Single Page Application architecture when developing secure Web services
US20200210584A1 (en) Deterministic Reproduction of Client/Server Computer State or Output Sent to One or More Client Computers
Sendor et al. Platform-level support for authorization in cloud services with OAuth 2
KR100969196B1 (en) Secure user session managing method under web environment and recording medium recorded program executing it
KR100915003B1 (en) Secure user session managing method and system under web environment, recording medium recorded program executing it
Huang et al. Private editing using untrusted cloud services
Felsch et al. SECRET: On the feasibility of a secure, efficient, and collaborative real-time web editor
Wang et al. A framework for formal analysis of privacy on SSO protocols
Aljawarneh Emerging challenges, security issues, and Technologies in Online Banking Systems
Singh et al. Prevention of session hijacking using token and session id reset approach
Al‐Tariq et al. A scalable framework for protecting user identity and access pattern in untrusted Web server using forward secrecy, public key encryption and bloom filter
Nikeshin et al. Testing the conformance of implementations of the EAP protocol and its methods to internet specifications
Torkveen Internet Security Scanner
US20240080195A1 (en) Managing composite tokens for content access requests
Chung et al. Architecture-driven penetration testing against an identity access management (IAM) system
Benjamin Adapting Kerberos for a browser-based environment

Legal Events

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

Payment date: 20130527

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20140612

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20150626

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20160602

Year of fee payment: 7

LAPS Lapse due to unpaid annual fee