This application claims priority from Korean Patent Application No. 10-2004-0042275 filed on Jun. 9, 2004 in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference in its entirety.
1. Field of the Invention
The present invention relates to a method and apparatus for secure communication using a session key between a client and a server, and more particularly, to a method and apparatus for secure communication reusing a session key, by which a generated session key is not discarded even after a session ends but is managed according to session identification information and is reused in communication between a client and a server which share the session key under predetermined conditions, thereby reducing a load due to a procedure for sharing the session key, and by which an additional application program generated in the client is allowed to use the session key, thereby facilitating the management of the session key.
2. Description of the Related Art
With the use of the World Wide Web (WWW) as the major means of information communication and the commercial spread of the WWW, the necessity of protecting sensitive information such as purchase, order, or payment information transferred on the WWW is increasing day by day. However, a Transmission Control Protocol/Internet Protocol (TCP/IP) network is very weak in security due to protocol characteristics. Accordingly, for security, it is needed to encrypt the sensitive information (e.g., a credit card number and a password) transferred on the WWW (especially, on an electronic commerce site) under an agreement between two parties in communication.
Representative encryption methods are symmetric-key cryptography and public-key cryptography.
Symmetric-key cryptography is called secret-key cryptography in which a key used to encrypt data is the same as that used to decrypt the data. A data encryption standard (DES) is most usually used for symmetric-key cryptography. Recently, applications using an advanced encryption standard (AES) are increasing.
Public-key cryptography is called asymmetric encryption in which a key used to encrypt data is different from that used to decrypt the data. A pair of the keys are generated to be dependent on each other using a predetermined algorithm. A key used for encryption is referred to as a public key and a key used to decrypt text encrypted using the public key is referred to a private key. The private key is kept secret by a user while the public key is published and can be widely distributed. Text encrypted by the public key can only be decrypted by the paired private key. Examples of a public-key cryptosystem are a Diffie-Hellman cryptosystem, an RSA cryptosystem, an ElGamal cryptosystem, and an elliptic curve cryptosystem. Public-key cryptography is about 100-1000 times slower than symmetric-key cryptography and is thus used for key exchange or a digital signature instead of being used for encryption of content.
In practical applications of information encryption, a hybrid encryption system combining symmetric-key cryptography and public-key cryptography is used. In a hybrid encryption system, anyone can encrypt a message, but only people having a private key can decrypt the message. Actually, a message to be transmitted is encrypted using a randomly generated session key according to symmetric-key cryptography.
In the conventional SSL, the session sharing procedure complies with hybrid encryption. When a user accesses a web server using a web browser, the web server provides a certificate including the web server's public key. The web browser, i.e., a client, acquires the web server's public key from the certificate, generates a session key (S10), encrypts the session key using the web server's public key (S20), and transmits the encrypted session key to the web server. The web server decrypts a received message using its private key to acquire the session key (S30), encrypts a message using the session key (S40), and transmits the encrypted message to the client. The client decrypts the message from the web server using the session key (S50). When communication between the client and the web server ends, the client sends a session finish request to the web server and the client and the web server discard the session key (S60). A session key is discarded when a session ends and a new session key is generated whenever a new session is generated in order to prevent security problems that may be caused by an information leak.
In the conventional SSL protocol, however, the session key sharing procedure that must be always performed when a client accesses a server incurs a load on a central processing unit (CPU). As a result, the availability of the server is decreased and a transmission rate between the server and the client is also decreased. Since a session key sharing operation incurs the biggest load in data security, the conventional SSL protocol is not practical in a network environment, e.g., a home network environment, in which there are frequent access and many transactions. Moreover, since every web browser executed on one personal computer (PC) must independently perform the session key sharing operation with a server, the conventional SSL protocol cannot be used in a network environment in which messages broadcast from the server need to be processed.
An aspect of the present invention provides a method and apparatus for secure communication reusing a session key between a client and a server, by which a session key shared by the client and the server is managed according to session identification information and reused even after a session between the client and the server ends, thereby reducing a load in a session key sharing procedure, and by which an additional application program generated in the client securely communicates with the server without an additional session key sharing procedure, thereby reducing a load in session key management.
The above stated aspect as well as other aspects, features and advantages, of the present invention will become clear to those skilled in the art upon review of the following description, the attached drawings and appended claims.
According to an aspect of the present invention, there is provided a method for secure communication between a client and a server, including transmitting a certificate to at least one accessing client, receiving a session key generated by the client, generating session identification information corresponding to the session key, transmitting the session identification information to the client, and decrypting an encrypted message received from the client using the session key and encrypting a message to be transmitted to the client using the session key.
According to another aspect of the present invention, there is provided a method for secure communication between a client and a server, the method including transmitting a certificate to at least one accessing client, receiving a session key and session identification information, which are generated and encrypted using a public key included in the certificate by the client, decrypting the encrypted session key and session identification information, and decrypting an encrypted message received from the client, which has transmitted the session identification information, using the session key and encrypting a message to be transmitted to the client, which has transmitted the session identification information, using the session key.
According to still another aspect of the present invention, there is provided a method for secure communication between a client and a server, the method including accessing at least one server, receiving a certificate from the server, extracting a public key of the server from the certificate, generating a session key for communication with the server, encrypting the session key using the public key and transmitting the encrypted session key to the server, receiving session identification information corresponding to the session key from the server, and decrypting an encrypted message received from the server, which has generated the session identification information, using the session key and encrypting a message to be transmitted to the server, which has generated the session identification information, using the session key.
According to yet another aspect of the present invention, there is provided a method for secure communication between a client and a server, the method including accessing at least one server, receiving a certificate from the server, extracting a public key of the server from the certificate, generating a session key and session identification information corresponding to the session key for communication with the server, encrypting the session key and the session identification information using the public key and transmitting the encrypted session key and session identification information to the server, and decrypting an encrypted message received from the server, which has been accessed and is identified by the session identification information, using the session key and encrypting a message to be transmitted to the server, which has been accessed and is identified by the session identification information, using the session key.
According to a further aspect of the present invention, there is provided an apparatus for secure communication, including a session identification information generation module generating session identification information, and a transceiver module transmitting a certificate to an accessing client, receiving a session key from the client, transmitting the session identification information generated by the session identification information generation module to the client, and transmitting and receiving a message encrypted using the session key.
According to a still another aspect of the present invention, there is provided an apparatus for secure communication, including a session identification information generation module generating session identification information; a transceiver module transmitting a certificate to an accessing client, receiving a session key from the client, transmitting the session identification information generated by the session identification information generation module to the client, and transmitting and receiving a message encrypted using the session key; and an encryption module encrypting a message to be transmitted to the client using the session key received by the transceiver module and decrypting an encrypted message received by the transceiver module using the session key.
According to still another aspect of the present invention, there is provided an apparatus for secure communication, including a session key generation module generating a session key, a transceiver module receiving a certificate from a server, transmitting the session key generated by the session key generation module to the server, receiving session identification information corresponding to the session key from the server, and transmitting and receiving a message encrypted using the session key, a control module extracting a public key from the certificate received by the transceiver module, and an encryption module encrypting the session key generated by the session key generation module using the public key extracted by the control module, and encrypting and decrypting a message using the session key.
According to still another aspect of the present invention, there is provided an apparatus for secure communication, including a session key generation module generating a session key, a session identification information generation module generating session identification information corresponding to the session key, a transceiver module receiving a certificate from a server and transmitting the session key generated by the session key generation module and the session identification information generated by the session identification information generation module to the server, a control module extracting a public key from the certificate received by the transceiver module, and an encryption module encrypting the session key generated by the session key generation module and the session identification information generated by the session identification information generation module using the public key extracted by the control module, and encrypting and decrypting a message using the session key.
The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
The present invention will now be described more fully with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown.
Advantages and features of the present invention and methods of accomplishing the same may be understood more readily by reference to the following detailed description of exemplary embodiments and the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concept of the invention to those skilled in the art, and the present invention will only be defined by the appended claims. Like reference numerals refer to like elements throughout the specification.
The present invention can be used in a system environment such as a network environment in which there are frequent access and many transactions or a network environment in which messages broadcast by a server need to be processed. An example of such a system environment may be a home network environment in which household appliances, electric systems, and cooling and heating systems at home can be remotely controlled by accessing a server through a client. Referring to
The client 300 includes a session key verification module 310, a session key generation module 320, a control module 370, a storage module 330, an encryption module 340, a transceiver module 350, and a session key storage 360.
The session key verification module 310 verifies whether a session key stored in the session key storage 360 is reusable. A procedure for verifying whether a session key is reusable and valid will be described in detail with reference to
In another embodiment of the present invention, a client may generate session identification information corresponding to a session key. This will be described with reference to
The server 400 includes a session identification information generation module 405, a control module 410, a transceiver module 440, an encryption module 430, a storage module 420, and a session key storage 450. The control module 410 generates a message for requesting a client to reshare a session key and manages the operations of other modules.
The session identification information generation module 405 generates session identification information corresponding to the session key. The session identification information is an identifier of the session key used to manage the session key and has a format shown in
For example, when there are one client and a plurality of servers, the session identification information may include only information for identifying a server. When there are a plurality of clients and one server, a session can be identified only with the information for identifying a client. When there are a plurality of clients and servers, the session identification information needs to include both of the information for identifying a client and the information for identifying a server in order to identify a session. The information for identifying a client and a server may include any information by which the client and the server can be identified.
Under a client-server system environment using an embodiment of the present invention, as shown in
The transceiver module 440 receives a session key and data encrypted using the session key from a client and transmits to the client the session identification information generated by the session identification information generation module 405 and a session key resharing request message generated by the control module 410. The encryption module 430 decrypts a received message using the session key provided through the transceiver module 440 and encrypts a message to be transmitted to the client. The storage module 420 stores the session key provided through the transceiver module 440 and the session identification information generated by the session identification information generation module 405 in the session key storage 450.
In operation S510, an application, e.g., a web browser, generated on a client reads a session key and session identification information, e.g., data containing a session identifier (ID), from the session key storage 360, and then the session key verification module 310 determines whether a reusable and valid session key is present. When it is determined that there is no reusable and valid session key, the session key generation module 320 generates a new session key in operation S515 and the encryption module 340 encrypts the session key using a server's public key in operation S520 and provides the encrypted session key to the transceiver module 350. The transceiver module 350 transmits the encrypted session key to the server.
The server, e.g., a web server, decrypts the encrypted session key received through the transceiver module 440 using its private key in the encryption module 430 in operation S525, generates session identification information for managing the session key in the session identification information generation module 405 in operation S530, encrypts the session key and the session identification information using its unique key, and stores them in the session key storage 450 through the storage module 420 in operation S535. The server encrypts a message including the session key and the session identification information using its private key in the encryption module 430 in operation 540 and transmits the encrypted message to the client through the transceiver module 440.
Then, the client decrypts the encrypted message received through the transceiver module 350 using the server's public key in the encryption module 340 in operation S545, and encrypts the session key and the session identification information included in the decrypted message using its unique key and stores them in the session key storage 360 through the storage module 330 in operation S550. Through the above operations, the client and the server become to share the session key.
When the client has a message to be transmitted to the server, the client encrypts the message using the session key in operation S555 and transmits the encrypted message to the server. Then, the server decrypts the received message using the session key in operation S560. When an error occurs during the decryption, the server performs error processing in operation S565. The error processing will be described in detail with reference to
The client verifies whether a reusable and valid session key is present in operations S610 through S630. In detail, the client acquires a time when the session key is used last from a registry in operation S610. When it is determined that 24 hours has not lapsed since the time of last use in operation S615, the client reads a session key and session identification information from the session key storage 360 through the storage module 330 in operation S620. When it is determined that the session key and the session identification information are present in the session key storage 360 in operation S625, the client determines whether the session key and the session identification information have been modulated in operation S630. When it is determined that the session key and the session identification information have not been modulated, the client encrypts or decrypts a message using the session key during communication.
As mentioned above, one of the factors which determine whether or not a client reuses the stored session key is the amount of time lapsed since the last use of the session key. The amount of time lapsed since the last use of the session key may be determined through experiments considering a system's need for security, a system implementation environment, a supported network environment, etc. Accordingly, 24 hours used as the amount of time lapsed in operation S615 is just an example. In addition, information on time when the session was used may be included in the session identification information.
Operation S630 may be embodied by verifying whether an error occurs when the session key and the session identification information are decrypted using an encryption key used when they were stored.
When a predetermined period of time, e.g., 24 hours, has lapsed since the time of last use of the session key (S615), when no session key and session identification information are present in the session key storage 360 (S625), or when the session key and the session identification information stored in the session key storage 360 have been modulated (S630), the session key generation module 320 of the client generates a new session key in operation S645. In operation S650, the encryption module 340 of the client encrypts the new session key using a server's public key and provides it to the transceiver module 350, and the transceiver module 350 transmits the encrypted new session key to the server.
When a session key resharing request is received from the server in operation S655, operations S645 and S650 are repeated. However, when the session key resharing request is not received from the server, the transceiver module 350 receives a message including a session key and session identification information that have been encrypted using the server's private key from the server in operation S660. In operation S665, the encryption module 340 decrypts the received message using the server's public key, and the storage module 330 stores the decrypted message, i.e., the session key and the session identification information, in the session key storage 360.
Operations S1210 through S1240 shown in
In operation S710, the transceiver module 440 receives a session key that has been encrypted using the server's public key from a client. In operation S720, the encryption module 430 decrypts the received session key using the server's private key. In operation S730, the session identification information generation module 405 generates session identification information for management of the session key. In operation S740, the encryption module 430 encrypts the session key and the session identification information using the server's unique key, and the storage module 420 stores the encrypted session key in the session key storage 450. In operation S750, the session key and the session identification information are encrypted using the server's private key and then transmitted to the client. Through the above operations, the server shares the session key with the client. Thereafter, in operation S760, the server decrypts a message received from the client using the session key. When it is determined that an error occurs during the decryption of the message due to a wrong session key in operation S770, the server sends a session key resharing request to the client in operation S780 and repeats operations S710 through S750 to share a session key with the client. However, when the error occurs due to a cause other than the wrong session key, error processing corresponding to the cause, such as sending a message retransmission request to the client, will be performed.
In this embodiment, the session identification information is generated by a client. In operation S1310, the transceiver module 440 of the server receives a session key and session identification information that have been encrypted using the server's public key from the client. In operation S1320, the encryption module 430 decrypts the received session key and session identification information using the server's private key. In operation S1330, the encryption module 430 encrypts the decrypted session key and session identification information using the server's unique key, and the storage module 420 stores the encrypted session key and session identification information in the session key storage 450. In operation S1340, the server decrypts a message received from the client using the session key. When it is determined that an error occurs during the decryption of the message due to the session key in operation S1350, the server sends a session key resharing request to the client in operation S1360 and repeats operations S1310 through S1340.
A plurality of web browsers #1 through #n 920 generated on one client, e.g., a personal computer (PC) 910, are provided with services from one server, e.g., a web server 940. Here, if the web browser #1 performs a session key sharing procedure with the web server 940 and, as a result, if a valid session key is stored in a session key storage 930, the other web browsers #2 through #n can use the session key stored in the session key storage 930 without additional session key sharing procedures when communicating with the web server 940.
In operation S1010, a plurality of application programs executed on the client receive a session key resharing request from a server. In operation S1020, only one application program among the plurality of application programs receiving the session key resharing request performs the session key sharing procedure with the server and the other application programs are in a standby mode. The application program performing the session key sharing procedure may be an application program that receives the session key resharing request first or may be selected through arbitration between the application programs.
The application program selected using various methods performs the session key sharing procedure with the server. The session key sharing procedure may be embodied by performing operations S645 through S665 shown in
In operation S1110, the server sends a session key resharing request to a plurality of application programs executed on the client. The session key resharing request may be broadcast or multicast. The server performs the session key sharing procedure with one application program among the plurality of application programs. In operation S1120, the transceiver module 440 of the server receives a session key generated by the one application program. In operation S1130, the encryption module 430 of the server decrypts the session key using the server's private key. In operation S1140, the session identification information generation module 405 of the server generates session identification information. In operation S1150, the encryption module 430 encrypts the session key and the session identification information using the server's unique key, and then, the storage module 420 stores the encrypted session key and session identification information in the session key storage 450. In operation S1160, the encryption module 430 encrypts the session key and the session identification information using the server's private key, and the transceiver module 440 transmits the encrypted information to the client.
In concluding the detailed description, those skilled in the art will appreciate that many variations and modifications can be made to the preferred embodiments without substantially departing from the principles of the present invention. Therefore, the disclosed preferred embodiments of the invention are used in a generic and descriptive sense only and not for purposes of limitation.
A method and apparatus for secure communication according to the present invention may provide at least one among the following effects.
First, even if the connection between a client and a server that have shared a session key is interrupted, the client can use the session key stored therein when accessing the server thereafter without performing an additional session key sharing procedure, thereby reducing a load due to the session key sharing procedure.
Second, since a plurality of application programs generated on one client use the same session key when communicating with a server, the server manages only one session key, and therefore, a load due to session key management can be reduced.
Number | Date | Country | Kind |
---|---|---|---|
10-2004-0042275 | Jun 2004 | KR | national |