Communication system
The communication system addresses secure communication across different devices by using key-based authentication and challenge responses, ensuring secure and consistent communication sessions.
Patent Information
- Application Number
- JP2024022852
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-19
- Publication Date
- 2025-08-29
AI Technical Summary
Existing communication systems do not ensure secure communication when originating from a device different from the communication partner.
A communication system involving a first and second communication device, with each storing corresponding private and public keys, uses a relay device to authenticate and encrypt session keys with digital signatures, ensuring secure communication by limiting sessions to one device and using challenge responses for authentication.
Ensures secure communication by maintaining session secrecy from the relay device and enhancing security through challenge responses, simplifying session management, and ensuring consistent charge balance.
Smart Images

Figure 2025126562000001_ABST
Abstract
Description
[Technical Field]
[0001] The present application relates to a communication system that performs highly secure communication. [Background technology]
[0002] Patent Document 1 describes a communication system including a server, a mobile terminal capable of communicating with the server and having a relay function, and a communication adapter capable of communicating with the mobile terminal and using the relay function of the mobile terminal to communicate with the server. Specifically, the server and the communication adapter are configured to share a first common key that the mobile terminal does not possess, and the server, the mobile terminal, and the communication adapter are configured to share a second common key that is different from the first common key, and the server and the communication adapter use the first common key and the second common key separately as keys used to encrypt data. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent No. 6097153 Summary of the Invention [Problem to be solved by the invention]
[0004] However, the communication system described in Patent Document 1 does not mention performing secure communication when communication originates from a device different from the communication partner.
[0005] The present application aims to provide a technology that can ensure communication security even when communication originates from a device different from the communication partner. [Means for solving the problem]
[0006] In order to achieve the above object, a communication system of the present application is a communication system including a first communication device, a relay device, and a second communication device, wherein the first communication device stores a first private key and a second public key corresponding to the second private key, and the second communication device stores the second private key and a first public key corresponding to the first private key, and the relay device transmits a first session request including authentication information to the first communication device, and when authentication of the authentication information included in the first session request received from the relay device is successful, the first communication device creates a session key, attaches a first digital signature using the first private key to the session key, and transmits first encrypted information obtained by encrypting the session key with the attached first digital signature using the second public key to the relay device, and the relay device transmits the first encrypted information received from the first communication device The second communication device transmits a second session request including the first encrypted information to the second communication device, and the second communication device decrypts the first encrypted information included in the second session request received from the relay device using the second private key, and decrypts the first electronic signature of the session key obtained by decrypting the first encrypted information using the first public key.If it is confirmed that the first electronic signature is genuine, it transmits second encrypted information, which is specified information encrypted using the session key, to the relay device, and the relay device transmits the second encrypted information received from the second communication device to the first communication device, and the first communication device decrypts the second encrypted information received from the second communication device using the session key.If it is confirmed that the information obtained by decrypting the second encrypted information is specified information, it performs communication using the session key.
[0007] In the communication system of the present application, even when a first communication device and a second communication device communicate with each other starting from a relay device, the contents of communication between the first communication device and the second communication device can be kept secret from the relay device.
[0008] Furthermore, if authentication of the authentication information is successful, the first communication device stores a first session ID in association with the session key and transmits the first session ID and the first encrypted information to the relay device, and the relay device stores the first session ID received from the first communication device. If the second communication device confirms that the first electronic signature is genuine, it stores a second session ID in association with the session key and transmits the second encrypted information and the second session ID to the relay device. The relay device stores the second session ID received from the second communication device in association with the first session ID, and, if it receives information with the first session ID assigned from the first communication device, it assigns the second session ID to the information and transmits it to the second communication device, and, if it receives information with the second session ID assigned from the second communication device, it assigns the first session ID to the information and transmits it to the first communication device.
[0009] In this way, the relay device stores the second session ID received from the second communication device in correspondence with the first session ID, and when it receives information with the first session ID assigned from the first communication device, it assigns the second session ID to the information and sends it to the second communication device, and when it receives information with the second session ID assigned from the second communication device, it assigns the first session ID to the information and sends it to the first communication device, so that the relay device can properly relay information between the first communication device and the second communication device.
[0010] The relay device also transmits a first acknowledgment to the first communication device, the first acknowledgment including the second encryption information and for starting a session in response to the first session request. As a result, the first acknowledgment serves to confirm the first session started by the relay device and also to transmit the second encryption information to the first communication device.
[0011] Furthermore, after transmitting the first acknowledgment to the first communication device, the relay device transmits a second acknowledgment to the second communication device for starting a session in response to the second session request. By using this first acknowledgment, it is possible to further improve the security of communication.
[0012] Furthermore, the first communication device deletes the session key when the session started in response to the first session request ends, and the second communication device deletes the session key when the session started in response to the second session request ends. In this way, the session key is deleted after the session ends, making it possible to carry out secure communications.
[0013] Furthermore, during communication using the session key, the second communication device refuses to receive encrypted information sent from a relay device other than the relay device. For example, if the relay device notifies the start of a withdrawal session while a user is attempting to charge, it is difficult to ensure session consistency. Therefore, by limiting the session to one, it is possible to simplify the process and increase security (the most effective and secure method for ensuring consistency of the charge balance of the second communication device).
[0014] The relay device also transmits a challenge request to the first communication device, and the first communication device generates a challenge in response to the challenge request received from the relay device and transmits a first signed challenge to the relay device, the first signed challenge having a first digital signature using a first private key attached to the challenge; the relay device transmits a digital certificate request including the first signed challenge received from the first communication device to the second communication device; the second communication device decrypts the first digital signature of the first signed challenge included in the digital certificate request received from the relay device using the first public key, and if it is confirmed that the first digital signature is authentic, transmits a second signed challenge to the relay device, the second digital signature having a second digital signature using a second private key attached to the challenge, and a digital certificate including the identification information and the second public key of the second communication device; and the relay device and transmits a registration request for the second communication device, including the second signed challenge received from the relay device and the electronic certificate, to the first communication device; and when the second signed challenge and the electronic certificate received from the relay device satisfy a predetermined condition, the first communication device generates authentication information, associates and stores information corresponding to the identification information of the second communication device included in the electronic certificate received from the relay device with the second public key and the authentication information, and transmits the authentication information to the relay device; the relay device stores the authentication information; the predetermined condition includes: the electronic certificate received from the second communication device being confirmed to be authentic; and the second electronic signature of the second signed challenge being confirmed to be authentic as a result of decrypting the second electronic signature using the second public key; and the challenge of the second signed challenge matching the generated challenge.
[0015] Since it is cumbersome to register all the different certificates for each device in the first communication device in advance, a secure device can be registered in the first communication device by obtaining an electronic certificate from the device during device registration and registering the device's identification information if the certificate can be verified. Furthermore, the first communication device issues a challenge to the relay device in response to device registration. This allows the relay device to obtain a challenge that proves that the user of the device is a legitimate user, and to securely request a session between the first communication device and the second communication device, originating from the relay device.
[0016] Furthermore, in communication using a session key, the relay device transmits a challenge request to the second communication device, the second communication device generates a challenge in response to the challenge request received from the relay device, stores the challenge in association with the session key, and transmits the challenge encrypted with the session key to the relay device, the relay device transmits an instruction request to the first communication device, including the challenge encrypted with the session key, for requesting an instruction from the first communication device, the first communication device, upon receiving the instruction request from the relay device, decrypts the encrypted challenge with the session key and transmits an encryption instruction in which the instruction and the decrypted challenge are encrypted with the session key to the relay device, the relay device transmits the encryption instruction to the second communication device, the second communication device decrypts the encryption instruction with the session key, and performs processing in accordance with the instruction if the challenge included in the decrypted encryption instruction matches the challenge stored in association with the session key. This allows the second communication device to perform processing in accordance with the instruction from the first communication device while ensuring security.
[0017] The second communication device is a device capable of executing processing of the processable amount, and the relay device transmits an instruction request to the first communication device to cause the second communication device to add to the processable amount, and the first communication device transmits an instruction to the relay device to cause the second communication device to add a predetermined processable amount, and the second communication device executes processing to add the predetermined processable amount to the processable amount stored in the second communication device in response to the instruction. This allows the second communication device to execute the addition processing in response to the instruction to add the processable amount from the first communication device while ensuring security.
[0018] Furthermore, the second communication device deletes the challenge when it has completed adding the processable amount in response to the instruction, thereby enabling the second communication device to execute the addition process in response to the processable amount addition instruction from the first communication device while ensuring security.
[0019] The second communication device is a device capable of executing processing of the processable amount, and the relay device transmits an instruction request to the first communication device to cause the first communication device to recover the processable amount stored in the second communication device as an instruction request, and the first communication device transmits an instruction to the relay device to cause the first communication device to recover the processable amount stored in the second communication device as an instruction request, and the second communication device executes processing to cause the first communication device to recover the processable amount stored in the second communication device in response to the instruction. This allows the second communication device to execute processing to cause the first communication device to recover the processable amount stored in the second communication device while ensuring security.
[0020] Furthermore, when the process of recovering the printable amount in accordance with the instruction is completed, the second communication device deletes the session key, thereby enabling the second communication device to execute the process of having the first communication device recover the printable number stored in the second communication device while ensuring security. [Brief explanation of the drawings]
[0021] [Figure 1] 1 is a block diagram illustrating a configuration of a printing system according to an embodiment of the present application. [Figure 2] 1. FIG. 4 is a sequence diagram when a device registration process is executed by the printing system of FIG. [Figure 3] 3 is a flowchart showing the procedure of a user device token creation process included in the device registration process of FIG. 2. [Figure 4] FIG. 2 is a sequence diagram when a charging process is executed by the printing system of FIG. [Figure 5] FIG. 5 is a sequence diagram when a session start process included in the charge process of FIG. 4 is executed. [Figure 6] FIG. 5 is a sequence diagram when a session termination process included in the charge process of FIG. 4 is executed. [Figure 7] FIG. 2 is a sequence diagram when a collection process is executed by the printing system of FIG. DETAILED DESCRIPTION OF THE INVENTION
[0022] Hereinafter, embodiments of the present application will be described in detail with reference to the drawings.
[0023] (Configuration of Printing System 1) FIG. 1 shows the configuration of a printing system 1 according to an embodiment of the present application. The printing system 1 (an example of a "communication system" herein) is used for a printing service provided to users. The printing service allows users to print by paying a fee for the number of printable sheets (an example of a "processable amount" herein), which is the number of sheets of paper that can be printed by a printer 20 (an example of a "second communication device" herein). When a user applies for this printing service, they pay an initial fee and are granted a predetermined number of printable sheets (e.g., 500 sheets). Here, the term "number of sheets" is used to refer to a unit of counting the number of sheets on one side of a sheet of paper. Therefore, the number of printable sheets refers to the number of sheets on one side of a sheet that can be printed. Printing on one side of a sheet of paper reduces the number of printable sheets by one, and printing on both sides reduces the number of printable sheets by two. In the following description, setting the number of printable sheets or increasing the number of printable sheets by charging an additional fee may sometimes be referred to as "charging." The number of printable sheets may also be referred to as the charged number.
[0024] In this embodiment, the printer 20 is, for example, an inkjet printer. The printer 20 sent from the vendor to the user is filled with the amount of ink necessary to print at least the predetermined number of printable sheets (e.g., 500 sheets + α sheets) granted to the user. Therefore, with this printing service, after the user obtains the printer 20, the user does not need to go through the trouble of filling the printer 20 with ink or replacing ink cartridges until the number of printable sheets granted to the user is printed after paying the initial fee. Therefore, this printing service eliminates the need to refill the printer 20 with ink, making it a highly convenient service for the user.
[0025] Furthermore, if the user wishes to print more than the specified number of printable pages granted by paying the initial fee, he or she must pay an additional fee. By purchasing additional printable pages, the user can continue to use the printer 20. If the user repeatedly purchases additional printable pages and the ink level of the printer 20 obtained by paying the initial fee becomes low, the user can request a printer 20 replacement, and the printer 20 will be replaced, thereby continuing the printing service. Note that the number α is a number appropriately set by the vendor providing the printing service.
[0026] The printing system 1 includes a mobile terminal device 10 (an example of a "relay device" in the present application), a printer 20, and a server 30 (an example of a "first communication device" in the present application). The mobile terminal device 10 and the printer 20 are connected to each other via a router 2, either wired or wirelessly (for example, via a LAN), so as to be able to communicate with each other. The mobile terminal device 10 and the server 30 are also connected to each other via the router 2 and the Internet 3, so as to be able to communicate with each other. The printer 20 and the server 30 are also connected to each other via the router 2 and the Internet 3, so as to be able to communicate with each other. The above-described network configuration is merely an example. For example, the server 30 may be located within a LAN. A plurality of mobile terminal devices 10 and printers 20 may be connected to the server 30, and a plurality of mobile terminal devices 10 may be connected to one printer 20, or the printer 20 to perform printing may be selected from a plurality of printers 20.
[0027] (Configuration of mobile terminal device 10) The mobile terminal device 10 causes a printer 20 to print an image on paper. The mobile terminal device 10 is, for example, a smartphone. The mobile terminal device 10 includes a terminal CPU 11, a terminal storage unit 12, a short-range communication unit 13, a display 14, an input I / F (abbreviation of interface) 15, an image acquisition unit 16, and an external communication unit 17. These components are capable of communicating with each other via a bus 18.
[0028] The terminal storage unit 12 is configured by combining, for example, RAM, ROM, flash memory, HDD, and buffers provided in the terminal CPU 11. The terminal storage unit 12 stores a terminal program 12A, an application program (hereinafter sometimes referred to as an application) 12B, and print data 12C. The terminal program 12A is a program that comprehensively controls the mobile terminal device 10 and provides basic functions and services to the application 12B. The terminal program 12A is, for example, the Android (registered trademark) OS or iOS (registered trademark). If the mobile terminal device 10 is, for example, a PC, the terminal program 12A is, for example, the Windows (registered trademark) OS. The application 12B is, for example, a web application program provided by the vendor of the printer 20. When a user performs an operation, the application 12B sends a request to the server 30, receives a web page generated by the server 30 in response to the request, and displays the web page on the display 14. Furthermore, the application 12B is a program that uses the functions of the terminal program 12A to execute various processes, which will be described later, such as setting processes and print commands for the printer 20, and charge commands for the server 30. The terminal CPU 11 executes the terminal program 12A and application 12B to control the mobile terminal device 10 and execute commands for the server 30. The print data 12C is an image to be printed that has been converted into a data format that can be interpreted by the printer 20. The terminal storage unit 12 is also used to store the number of pages that can be printed by the printer 20.
[0029] In the following description, the mobile terminal device 10 that executes the terminal program 12A and the application 12B on the terminal CPU 11 may be referred to simply by the device name. For example, the description "the mobile terminal device 10" may mean "the mobile terminal device 10 that executes the terminal program 12A and the application 12B on the terminal CPU 11." The same applies to the printer 20 that executes the printer program 26B1 on the printer CPU 26A and the server 30 that executes the server program 32B1 on the server CPU 32A, which will be described later.
[0030] The short-range communication unit 13 wirelessly communicates with the printer 20 over a short distance. The short-range communication unit 13 includes a communication circuit that wirelessly communicates with a short-range communication unit 21 of the printer 20, which will be described later, using, for example, Bluetooth (registered trademark) or NFC (short for Near Field Communication). The display 14 displays various information and may employ an LCD, an organic EL display, or the like, but is not limited to these. The input I / F 15 may employ a touch panel that is integrally configured with the display 14 and accepts user operations on icons and the like displayed on the display 14. The input I / F 15 may also be a keyboard, a mouse, or the like.
[0031] The image acquisition unit 16 includes, for example, a camera (not shown) provided in the mobile terminal device 10, and acquires images captured by the camera. The image acquisition unit 16 may also be connected to an external device such as an HDD to acquire images. The images acquired by the image acquisition unit 16 may be converted into print data 12C and stored in the terminal storage unit 12.
[0032] The external communication unit 17 includes a communication circuit for transmitting and receiving data to and from the router 2 by wireless communication conforming to the Wi-Fi (registered trademark) communication standard, for example. The external communication unit 17 is connected to the printer 20 via the router 2. The external communication unit 17 is also connected to the server 30 via the router 2 and the Internet 3. The external communication unit 17 may also be configured to be connected to the router 2 by wired communication such as a LAN cable.
[0033] (Configuration of printer 20) The printer 20 is, for example, an inkjet color printer. The printer 20 includes a short-range communication unit 21, an external communication unit 22, tanks 23, an ink level detection unit 24, a printing unit 25, a user I / F 27, and a printer control unit 26. The external communication unit 22 includes a communication circuit for transmitting and receiving signals to and from external devices (the mobile terminal device 10 and the server 30 in this embodiment) connected via a network. The tanks 23 are containers for storing ink. In this embodiment, there are four types of ink (magenta M, cyan C, yellow Y, and black BK), and multiple tanks 23 are provided for each type of ink. That is, the printer 20 uses multiple tanks 23 to independently store each of the four types of ink. In this embodiment, when the printer 20 is supplied to a user by a vendor, each of the multiple tanks 23 is filled with an amount of ink sufficient to print a predetermined number of sheets of paper, assuming a single-color coverage of 5%, for example. The predetermined number is a number that is greater than the number of printable sheets that is granted to a user who applies for a printing service, and can be set appropriately by a vendor that provides the printing service.
[0034] Furthermore, the tank 23 is provided so that the user cannot refill it with ink. Specifically, the tank 23 is located in a position where the user cannot touch it. The tank 23 is fixed to the printer 20 so that it cannot be removed. The remaining ink level detection unit 24 detects the amount of ink remaining in the tank 23. The remaining ink level detection unit 24 is an optical sensor that is located in the tank 23 and detects the level of ink by detecting the height of the ink liquid surface. The remaining ink level detection unit 24 is located in each of the multiple tanks 23 and detects the amount of ink remaining in each of the multiple tanks 23. Note that the printer 20 may be configured so that the user can remove and attach the tank 23. The tank 23 may also be provided with an inlet through which the user can fill the tank 23 with ink.
[0035] The printing unit 25 includes a print head, a carriage on which the print head is mounted, and a transport mechanism for transporting paper, and performs printing by ejecting ink stored in the tank 23 from the print head onto the paper. The printing unit 25 executes processing to print images such as print data 12C received from the mobile terminal device 10 onto paper using a known inkjet method. The user I / F 27 is, for example, a touch panel integrated with a display, a push button switch, or the like, and receives operation inputs from the user and displays various information. The printer control unit 26 performs overall control of the printer 20. The printer control unit 26 includes a printer CPU 26A and a printer memory unit 26B. Note that the configuration of the printer 20 described above is an example.
[0036] Printer CPU 26A controls the operation of printer 20 by executing printer program 26B1 in printer storage unit 26B. Printer program 26B1 is a program that comprehensively manages printer 20 and causes printer 20 to execute various processes. Printer storage unit 26B is configured by combining, for example, RAM, ROM, flash memory, HDD, and buffers provided in printer CPU 26A.
[0037] The printer storage unit 26B also stores a printer management table PT. The printer management table PT is a table that stores information about the printer 20 regarding the use of the printing service. The information stored in the printer management table PT is used as appropriate when various processes, which will be described later, are executed. The printer management table PT stores the device ID, the number of printable pages, the remaining ink amount, the device settings, and the synchronization date and time, all associated with each other.
[0038] The device ID is, for example, a serial number set by the vendor of the printer 20, and is unique information that allows the printer 20 to be distinguished from other printers. The device ID is not limited to a serial number, and may be, for example, a wired MAC address or a wireless MAC address of the short-range communication unit 21 or the external communication unit 22. The printable number indicates the number of sheets of paper that can be printed by the printer 20. A user using the printer 20 can print up to the printable number stored in the printer management table PT. The printable number is increased (charged) by the number of sheets corresponding to the amount charged by the user. On the other hand, the printable number is decreased by the number of sheets of paper used by the printer 20 for printing. Addition and subtraction of the printable number will be described in detail later. The printable number may be stored in association with the user ID of the user using the printer 20.
[0039] The remaining ink amount indicates the amount of ink remaining detected by the remaining ink amount detection unit 24. After the printer 20 performs an operation that uses ink, such as refilling ink, checking the nozzles, or printing, the printer 20 stores the remaining ink amount detected by the remaining ink amount detection unit 24 in the printer management table PT. The device settings are setting information such as the functions of the printer 20 (printing, etc.), settings for each function (paper size, color, magnification, etc.), and the language to be displayed on the user I / F 27. The synchronization date and time is the date and time when the previous (most recent) synchronization process was performed with the server 30. The synchronization process here refers to, for example, a process of matching the number of printable pages between the server 30 and the printer 20.
[0040] (Configuration of Server 30) As shown in FIG. 1, the server 30 includes an external communication unit 31 and a server control unit 32. The external communication unit 31 includes a communication circuit that communicates with the mobile terminal device 10 and the printer 20 connected via a network. The server control unit 32 controls the overall operation of the server 30. The server control unit 32 includes a server CPU 32A and a server storage unit 32B. The server CPU 32A controls the operation of the server 30 by executing a server program 32B1 in the server storage unit 32B. The server program 32B1 is a program that performs overall management of the server 30 and causes the server 30 to execute various processes.
[0041] The server storage unit 32B is configured by combining, for example, RAM, ROM, flash memory, HDD, and buffers provided in the server CPU 32A. The server storage unit 32B also stores a server management table ST. The server management table ST is a table that stores information necessary for using the print service. The server management table ST stores information about each printer 20 that uses the print service in association with the device ID of the printer 20, and is managed by the vendor. The information stored in the server management table ST is used as appropriate when various processes, described below, are executed.
[0042] The server management table ST stores device records, user records, and real device records in association with each other. Details of each record will be described later, but the device record stores a device ID and a printable number of pages in association with each other. The device ID and printable number of pages are the same data as those in the printer management table PT described above, and data in the printer management table PT corresponding to the same device ID is stored. The printable number of pages may be stored in association with the user ID of the user who uses the printer 20 instead of the device ID. The user record also stores the login ID, password, and email address used by the user of the mobile terminal device 10 when logging in to the server 30. The real device record stores the serial number and device certificate of the printer 20.
[0043] In this embodiment, the server 30 manages the printable number of each printer 20 using the printing service using a server management table ST that associates the device ID with the printable number of each printer 20. The server 30 manages the latest printable number in the server management table ST by executing a synchronization process that synchronizes the printable number of each printer 20, which increases or decreases in response to the user's charging operation or print instruction, with the printer 20.
[0044] The control process executed by the printing system 1 configured as above will be described below with reference to FIGS.
[0045] 2 shows a sequence when device registration processing is executed by the printing system 1. The device registration processing is processing for registering information about the printer 20, which is a device, to the server 30 via the mobile terminal device 10. This device registration processing starts when a user issues an instruction to register the printer 20 to the server 30 while the application 12B is running on the mobile terminal device 10. Note that although the user of the printer 20 and the user who registers the device using the mobile terminal device 10 may be different users, in this embodiment, both users are assumed to be the same. In the following explanation of each procedure, steps will be represented as "S."
[0046] 2, first, a check is made between the mobile terminal device 10 and the server 30 to see if user registration has been completed (S10). This check can be performed, for example, by the user entering their own email address in the email address input field of the user registration confirmation screen displayed on the display 14 and operating (pressing) the confirmation button, causing the mobile terminal device 10 to transmit the email address to the server 30, and in response, the server 30 determining whether a user record linked to the received email address is registered in the server storage unit 32B.
[0047] If the check in S10 shows that the user has not been registered, the server 30 sends an email containing link information for a user registration web page to the mobile terminal device 10. In response, the mobile terminal device 10 receives the email, and when the user operates (presses) the link information in the email displayed on the display 14, the mobile terminal device 10 accesses the user registration web page of the server 30 and sends a user registration request (S11).
[0048] When the server 30 receives a user registration request from the mobile terminal device 10, it creates a user record for the user, associates the user's email address with the user record and stores it in the server storage unit 32B (S12a), and also creates a user token (S12b). The user token is also associated with the user record and stored. Note that there are various possible methods for associating the user record with the email address. For example, the server 30 may name the user record the same as the email address, may provide an email address storage area in the user record and store the email address in that area, or may provide table data that associates the user record with the email address. Furthermore, when creating the user record, the server 30 may request a password for authentication from the user and store the password entered by the user in the user record.
[0049] Next, the server 30 transmits the created user token to the mobile terminal device 10 (S13). Here, the user token is used by the server 30 to grant the mobile terminal device 10 access authority to the user record created in S12a.
[0050] When the mobile terminal device 10 receives the user token from the server 30, the mobile terminal device 10 stores the received user token in the printer storage unit 26B (S14).
[0051] Next, if Wi-Fi wireless communication has not been established between the mobile terminal device 10 and the printer 20, the mobile terminal device 10 performs Wi-Fi settings (S15). Furthermore, the mobile terminal device 10 waits until physical authentication is performed by the printer 20 (S16). Here, physical authentication is a process for confirming that the user of the mobile terminal device 10 is the user of the printer 20, and includes the following processes. First, via the wireless communication established in S15, the mobile terminal device 10 transmits a printer registration request to the printer 20 to register information about the printer 20 with the server 30. In response to receiving the printer registration request from the mobile terminal device 10, the printer 20 displays a screen on the user I / F 27 prompting the user to perform an authentication operation. Then, when the user inputs the authentication operation via the user I / F 27, the printer 20 determines that the physical authentication was successful and transmits a permission for the printer registration request to the mobile terminal device 10. The reason for requesting physical authentication from the printer 20 in this way is to allow only the user of the printer 20 to register the device.
[0052] Next, the mobile terminal device 10 transmits a request to acquire a device registration challenge (an example of a "challenge request" in the present application) to the server 30 (S20). Here, the challenge is a random value used for challenge-response authentication. The device registration challenge is a server challenge required to register information about the printer 20 in the server, and this acquisition request includes the user token stored in S14. Upon receiving the request to acquire the device registration challenge, the server 30 creates a server challenge (an example of a "challenge" in the present application) (S21a), associates the created server challenge with the user token, stores the server challenge in the server storage unit 32B (S21b), and signs the server challenge with the server private key (S21c).
[0053] Here, the server 30 and the printer 20 exchange various data using public key cryptography. The server 30 possesses a server private key (an example of the "first private key" of the present application) and a device public key (an example of the "second public key" of the present application), and the printer 20 possesses a device private key (an example of the "second private key" of the present application) and a server public key (an example of the "first public key" of the present application). When the server 30 transmits signed data to the printer 20 via the mobile terminal device 10, the server 30 signs the data using the server private key and transmits it. The printer 20 then decrypts the signed data from the server 30 using the server public key, and if the data is successfully decrypted, determines that the data is data actually transmitted by the server 30. On the other hand, when the printer 20 transmits signed data to the server 30 via the mobile terminal device 10, the server 30 signs the data using the device private key and transmits it. The server 30 then decrypts the signed data from the printer 20 using the device public key, and if the data is successfully decrypted, determines that the data is data actually transmitted by the printer 20. At the time of S21c, the server 30 possesses the server private key but not the device public key. In contrast, the printer 20 possesses both the device private key and the server public key. The printer 20 may store the server public key in the printer storage unit 26B during manufacturing, or may acquire the server public key from, for example, the mobile terminal device 10 before the processing of S20. For example, when creating a user token in S12b, the server 30 may create a user token including the server public key and send it to the mobile terminal device 10. The mobile terminal device 10 may then store the user token including the server public key in S14 and, after physical authentication is completed in S16, send the server public key to the printer 20. Note that in the following description, signing data with a private key and encrypting data with a private key are used interchangeably.
[0054] Next, the server 30 transmits a server challenge signed with the server private key to the mobile terminal device 10 (S22). Hereinafter, the server challenge signed with the server private key will be referred to as a "server signed server challenge" (an example of a "first signed challenge" in the present application). The mobile terminal device 10 transmits a device certificate acquisition request (an example of a "digital certificate request" in the present application) including the received server signed server challenge to the printer 20 (S23).
[0055] The printer 20 verifies the signature of the server challenge with the server public key (S24a), and if the verification is successful, signs the server challenge with the device private key (S24b). Here, verifying the signature of the server challenge with the server public key means decrypting the server challenge with the server public key. Successful verification means successful decryption. Hereinafter, the server challenge signed with the device private key will be referred to as the "device signed server challenge" (an example of the "second signed challenge" in this application).
[0056] Next, the printer 20 transmits a device-signed server challenge and a device certificate (an example of the "digital certificate" in the present application) to the mobile terminal device 10 (S25). In this embodiment, the device certificate is a file containing a device public key and the serial number of the printer 20 (an example of the "identification information" in the present application) signed by a CA. CA stands for Certificate Authority, and is an organization that issues device certificates.
[0057] When the mobile terminal device 10 receives the server challenge with the device signature and the device certificate from the printer 20, it transmits a device registration request including the user token, the server challenge with the device signature, and the device certificate to the server 30 (S26). In response to this, the server 30 creates a user device token (an example of "authentication information" in the present application) (S27).
[0058] 3 shows detailed steps of the user device token creation process of S27. In FIG. 3, first, the server 30 acquires a server challenge linked to the user token (S30). Here, the user token is the user token included in the device registration request of S26, and the server 30 acquires the server challenge linked to this user token from the server storage unit 32B. Therefore, depending on the user token included in the device registration request, the server challenge may differ from the server challenge linked to the user token and stored in the server storage unit 32B in S21b above.
[0059] Next, the server 30 verifies the signature of the device certificate with the device CA public key (S31). Similar to the verification in S24a above, this verification involves decrypting the device certificate with the device CA public key. However, the difference is that the verification in S24a involves decrypting with the server public key, whereas the verification in S31 involves decrypting with the device CA public key. The device CA public key is issued by the CA as information unique to each printer and is stored in advance in the server storage unit 32B. If the verification of the device certificate signature is successful, the server 30 verifies, i.e., decrypts, the server challenge with the device signature with the device public key included in the device certificate decrypted in S31. Furthermore, in S33, the server 30 compares the server challenge decrypted in S32 with the server challenge acquired in S30. Then, the server 30 determines whether the verifications in S31 and S32 and the matching in S33 are all successful (S34), and if any one of them fails (S34: NO), the server 30 returns an error to the mobile terminal device 10 (S50) and then terminates the user device token creation process.
[0060] On the other hand, if all the determinations in S34 are successful (S34: YES), the server 30 acquires the serial number from the decrypted device certificate (S35), and determines whether a device record in which the acquired serial number is registered has been created in the server storage unit 32B (S36). If this determination determines that a device record in which the acquired serial number is registered is stored in the server storage unit 32B (S36: YES), the server 30 identifies the device record (S37), creates a user device token (S38), and then terminates the user device token creation process.
[0061] On the other hand, if it is determined in S36 that a device record in which the acquired serial number is registered is not stored in the server storage unit 32B (S36: NO), the server 30 creates a new device record (S40), creates a real device record using the serial number as a primary key (S41), and stores the decrypted device certificate in the real device record in the server storage unit 32B (S42). After that, the process proceeds to S38, where a user device token is created. The user device token is stored in the device record. The server 30 then terminates the user device token creation process.
[0062] 2, the server 30 transmits the user device token created in S27 to the mobile terminal device 10 (S28). The mobile terminal device 10 then stores the user device token received from the server 30 in the terminal storage unit 12 (S29). As a result, the serial number of the printer 20 and the decrypted device certificate are registered in the real device record of the server storage unit 32B of the server 30.
[0063] FIG. 4 shows a sequence when a charge process is executed by the printing system 1. In the charge process, the server 30 increments the charge amount based on the charge instructed to the printer 20 in response to a user's instruction from the mobile terminal device 10 to the server 30 to charge the printer 20. However, the charge process in FIG. 4 is based on the premise that the server 30 and the printer 20 are not connected, and therefore the server 30 cannot directly instruct the printer 20 to increment the charge amount. For this reason, the instruction from the server 30 to increment the charge amount is relayed by the mobile terminal device 10 to the printer 20. Even in this configuration, the instruction to increment the charge amount from the server 30 is transmitted from the server 30 to the printer 20 via the mobile terminal device 10 in a secure manner.
[0064] The charge process in Fig. 4 begins with a session start process (S60). In the session start process, a short-lived common passcode (an example of a "session key" in the present application) to be used between the printer 20 and the server 30 is generated. Fig. 5 shows the sequence when the session start process is executed. In Fig. 5, the mobile terminal device 10 first transmits a session start notification (an example of a "first session request" in the present application) to the server 30 (S100). The session start notification includes the user device token saved in S29 above.
[0065] When the server 30 receives a session start notification from the mobile terminal device 10, it acquires a device public key corresponding to the user device token included in the session start notification (S101a). Since the user device token identifies a device record in the server storage unit 32B, the server 30 can acquire the device public key included in the device certificate in the real device record stored in association with the device record identified by the user device token. Next, the server 30 creates a common passcode (S101b). The common passcode is, for example, a randomly generated character string. The server 30 then signs the common passcode with the server private key to generate a server-signed common passcode (S101c). Next, the server 30 creates a server session ID (an example of the "first session ID" in the present application) (S101d). The server session ID is an ID for identifying which session the server 30 started when multiple sessions have been started by the server 30 in response to the session start notification from the mobile terminal device 10. Next, the server 30 associates the common passcode with the server session ID and stores them in the device record of the server storage unit 32B (S101e).Furthermore, the server 30 encrypts the common passcode with the server signature using the device public key to generate ciphertext 1 (an example of the "first encrypted information" of the present application) (S101f).
[0066] Then, the server 30 transmits the server session ID and ciphertext 1 to the mobile terminal device 10 (S102). Upon receiving the server session ID and ciphertext 1 from the server 30, the mobile terminal device 10 stores the server session ID in the terminal storage unit 12 (S103). This is because the mobile terminal device 10 will use the server session ID in subsequent communications with the server 30. Furthermore, the mobile terminal device 10 transmits a session start notification (an example of the "second session request" of the present application) to the printer 20 (S104). The session start notification includes ciphertext 1 received from the server 30.
[0067] When the printer 20 receives a session start notification from the mobile terminal device 10, it decrypts ciphertext 1 included in the session start notification with the device private key (S105a). Because the server 30 generated ciphertext 1 by encrypting it with the device public key in S101f, if ciphertext 1 has not been tampered with, the printer 20 decrypts ciphertext 1 with the device private key, and the decryption is successful. If the decryption is successful, the printer 20 verifies, i.e., decrypts, the signature of the server-signed common passcode with the server public key (S105b). If this verification is successful, the printer 20 creates a device session ID (an example of the "second session ID" in the present application) (S105c), associates the decrypted common passcode with the device session ID, and stores it (S105d). Furthermore, the printer 20 encrypts a predetermined character string (an example of the "predetermined information" in the present application) with the common passcode to generate ciphertext 2 (an example of the "second encrypted information" in the present application) (S105e). The device session ID is created to prevent a session from starting even if a session start notification is sent from a source other than the mobile terminal device 10 during the charging process. This is because only one common passcode is stored for one session, so if another session starts between the start and end of one session, communication through the previous session cannot be maintained. In addition, it is assumed that the same character string as the predetermined character string encrypted in S105e is also stored on the server 30 side.
[0068] Next, the printer 20 transmits the device session ID and ciphertext 2 to the mobile terminal device 10 (S106). When the mobile terminal device 10 receives the device session ID and ciphertext 2 from the printer 20, it stores the device session ID in the terminal storage unit 12 in association with the server session ID stored in S102 above (S107). The reason for storing the server session ID and the device session ID in association in this manner is so that the mobile terminal device 10 can relay the session between the server 30 and the printer 20. More specifically, when the mobile terminal device 10 receives information to which a server session ID has been assigned from the server 30, it assigns the device session ID to the information and transmits it to the printer 20, and when the mobile terminal device 10 receives information to which a device session ID has been assigned from the printer 20, it assigns the server session ID to the information and transmits it to the server 30.
[0069] Next, the mobile terminal device 10 transmits a session start Ack (an example of the "first acknowledgment" of the present application) to the server 30 (S108). The session start Ack includes a server session ID and ciphertext 2. This session start Ack not only serves to confirm the session started by the mobile terminal device 10 in S100, but also to transmit ciphertext 2 to the server 30.
[0070] When the server 30 receives the session start Ack from the mobile terminal device 10, it acquires the common passcode associated with the server session ID included in the session start Ack from the server storage unit 32B (S109a). Then, the server 30 decrypts the ciphertext 2 included in the session start Ack with the common passcode (S109b). If the decryption is successful, the server 30 compares the decrypted predetermined character string with the predetermined character string previously stored by the server 30 as described above (S109c). If this comparison is successful, the server 30 changes the state of the server session to a valid state (S109d). Note that the session start Ack is transmitted to the server 30 only once by the mobile terminal device 10. This is to prevent the common passcode from being cracked.
[0071] Next, the server 30 sends an OK to the mobile terminal device 10 indicating that the server session has become valid (S110). Upon receiving the OK from the server 30, the mobile terminal device 10 sends a session start Ack (an example of the "second acknowledgement" of the present application) to the printer 20 (S111). The session start Ack includes a device session ID. This completes the session start process.
[0072] The session start process can be completed without the process of S111. If the printer 20 completes the processes of S105a to S105e, successfully decrypts all of the ciphertext 1, and performs the process of S106, and recognizes that the session starting from the session start notification sent by the mobile terminal device 10 to the server 30 in S100 has been successful, there is no need to receive a session start ACK from the mobile terminal device 10 in S111. If the mobile terminal device 10 is unable to send a session start ACK to the server 30 in S108 and is therefore unable to establish a session, the mobile terminal device 10 can simply send an instruction to end the session to the printer 20. Furthermore, omitting the process of S111 can reduce the number of communications throughout the session start process, thereby further reducing the communication speed. However, including the process of S111 can further improve communication security. Specifically, the printer 20 measures the time since executing the process of S106, and if the printer 20 does not receive a session start Ack from the mobile terminal device 10 in S111 within a first timeout period (for example, 60 seconds), it abandons the current session. In addition, the printer 20 measures the time since receiving a session start Ack from the mobile terminal device 10 in S111, and if the printer 20 does not receive a command instruction using the session from the mobile terminal device 10 within a second timeout period (for example, 90 seconds), it abandons the current session. If the first timeout period is set shorter than the second timeout period, in the event of a communication failure of some kind, the session can be abandoned when the first timeout period has elapsed, without waiting for the second timeout period to elapse, thereby further improving communication security.
[0073] In this way, in the session initiation process, the common passcode created by the server 30 is sent to the printer 20 in a secure state. Then, in the processes after the session initiation process, data encrypted using the common passcode is sent and received in data transmission between the printer 20 and the server 30 via the mobile terminal device 10. This makes it possible to achieve highly secure data communication between the server 30 and the printer 20 via the mobile terminal device 10, even in a situation where the server 30 and the printer 20 are not directly connected.
[0074] 4, the mobile terminal device 10 transmits a device challenge acquisition request including a device session ID to the printer 20 (S61). Note that in the data transmissions of S61 to S71, data encrypted using a common passcode is transmitted. Furthermore, in S61 to S71, data transmission between the printer 20 and the mobile terminal device 10 includes the device session ID, and in S61 to S71, data transmission between the server 30 and the mobile terminal device 10 includes the server session ID.
[0075] When the printer 20 receives a device challenge acquisition request from the mobile terminal device 10, it decrypts the device challenge acquisition request with the common passcode, then creates a device challenge (S62a), associates the created device challenge with the device session ID included in the device challenge acquisition request, and temporarily stores the associated device challenge in the RAM constituting the printer storage unit 26B (S62b). Here, the device challenge is a one-time key that is stored in the RAM so that it is erased when the printer 20 is powered off, deleted after one use, expires after a predetermined time has elapsed, and is stored up to one per session. The device challenge is deleted after one use to prevent the server 30 from creating multiple charge commands in S66, which will be described later.
[0076] The printer 20 then transmits the device challenge to the mobile terminal device 10 (S63). Upon receiving the device challenge from the printer 20, the mobile terminal device 10 transmits a charge command creation request (an example of an "instruction request" of the present application) to the server 30 (S64). The charge command creation request includes the server session ID, the device challenge, payment information, and the charge amount. The server session ID is stored in the terminal storage unit 12 in association with the device session ID.
[0077] When the server 30 receives a charge command creation request from the mobile terminal device 10, it performs a settlement process with the mobile terminal device 10 (S65), then identifies the device record using the server session ID included in the charge command creation request, and updates the number of printable sheets by adding the charge number to the current number of printable sheets stored in the identified device record.The server 30 then creates a charge command (S66).The charge command includes the charge number specified by the user and a device challenge.The server 30 then transmits the charge command (an example of the "encryption instruction" of this application) to the mobile terminal device 10 (S67).
[0078] When the mobile terminal device 10 receives a charge command from the server 30, it sends a charge request to the printer 20 (S68). The charge request includes a device session ID and a charge command. When the printer 20 receives the charge request from the mobile terminal device 10, it decrypts the charge request with the common passcode and then verifies the device challenge (S69a). If the verification is successful, it adds the charge number included in the charge command to the current number of printable sheets, thereby updating the number of printable sheets (S69b). Furthermore, after updating the number of printable sheets, the printer 20 deletes the device challenge. The printer 20 then sends an OK to the mobile terminal device 10, indicating that the charge has been completed (S70). In response to this, the mobile terminal device 10 performs a session termination process (S71).
[0079] Fig. 6 shows a sequence when the session end process of S71 is executed. In Fig. 6, first, the mobile terminal device 10 transmits a session end notification to the server 30 (S120). The session end notification includes a server session ID.
[0080] When the server 30 receives the session end notification from the mobile terminal device 10, it deletes the server session ID stored in the server storage unit 32B (S121). Because the server session ID is stored in association with the common passcode (see S101e in FIG. 5 above), in S121, it is sufficient to delete the common passcode along with the device session ID. Then, the server 30 sends an OK to the mobile terminal device 10 indicating that the deletion of the server session ID has been completed (S122). In response, the mobile terminal device 10 sends a session end notification to the printer 20 (S123). The session end notification includes the device session ID.
[0081] When the printer 20 receives the session termination notification from the mobile terminal device 10, it deletes the device session ID stored in the printer storage unit 26B (S124). Because the common passcode is stored in association with the device session ID (see S105d in FIG. 5 above), in S124, it is sufficient to delete the common passcode along with the device session ID. Then, the printer 20 sends an OK to the mobile terminal device 10 indicating that the deletion of the device session ID has been completed (S125). This ends the session termination process, and also ends the charge process in FIG. 4.
[0082] FIG. 7 shows a sequence when the printing system 1 executes a collection process. In the collection process, if the printer 20 has remaining printable pages, the remaining printable pages are collected from the printer 20, and a collection report is stored in the server storage unit 32B of the server 30, associated with the printer 20 or the user. As described above, if the printer 20 runs low on ink or breaks down, the user can request a replacement and the printer 20 is replaced with another printer. In this case, if the printer 20 has one or more remaining printable pages, the collection process of FIG. 7 can be executed to collect the remaining printable pages from the printer 20 and store the collection report in the server storage unit 32B. Then, by executing the charge process of FIG. 4 on the replaced printer based on the collection report stored in the server storage unit 32B, the printable pages collected from the printer 20 are charged to the replaced printer, preventing the remaining printable pages from being wasted.
[0083] The collection process in Fig. 7 starts with the session start process (S80), similar to S60 in Fig. 4. The session start process has been described in detail based on Fig. 5, and will not be repeated here.
[0084] Next, data is transmitted and received between the mobile terminal device 10 and the printer 20 (S81 to S83). The processing of S81 to S83 is the same as the processing of S61 to S63 in Fig. 4, so a description of that processing will be omitted. Note that, unlike Fig. 4, some data is omitted in Fig. 7. For example, in the data transmission of S81 to S92, data encrypted using a common passcode is transmitted. Furthermore, in S81 to S91, data transmission between the printer 20 and the mobile terminal device 10 includes a device session ID, and in S81 to S91, data transmission between the server 30 and the mobile terminal device 10 includes a server session ID.
[0085] Next, when the mobile terminal device 10 receives the device challenge from the printer 20, it transmits a collection command creation request (an example of an "instruction request" in the present application) to the server 30 (S84). The collection command creation request includes the device challenge. When the server 30 receives the collection command creation request from the mobile terminal device 10, it generates a collection command ID (S85a) and also generates a collection command (S85b). The collection command includes the collection command ID and the device challenge. Then, the server 30 transmits the collection command (an example of an "encryption instruction" in the present application) to the mobile terminal device 10 (S86).
[0086] When the mobile terminal device 10 receives the collection command from the server 30, it transmits the received collection command as is to the printer 20 (S87). In response, the printer 20 decrypts the collection command with the common passcode, then collates and deletes the device challenge (S88a), copies the printable number stored in the printer management table PT of the printer storage unit 26B to RAM and clears it (S88b), and generates collection result data based on the printable number copied to RAM before clearing (S88c). The printer 20 then transmits the collection result data to the mobile terminal device 10 (S89). After transmitting the collection result data to the mobile terminal device 10, the printer 20 deletes the device challenge.
[0087] When the portable terminal device 10 receives the collection result data from the printer 20, it sends a collection report including the collection result data to the server 30 (S90). The server 30 decrypts the collection command ID with the common passcode and then verifies it (S91). If the verification is successful, the server 30 associates the collection report with the user record or the successor printer ID and stores it in the server storage unit 32B.
[0088] Then, the printing system 1 executes the session termination process in the same manner as in S71 (S92). The session termination process has been described in detail with reference to FIG. 6, and will not be repeated here.
[0089] Furthermore, if the location of the destination printer is known, the mobile terminal device 10 instructs the server 30 to charge the collected printable number of sheets to the destination printer. From the charge instruction to the actual charging of the destination printer, the charge process in Fig. 4 can be performed by changing the charge target from printer 20 to the destination printer, so further explanation will be omitted.
[0090] Although the number of printable sheets has been described as an example of the "processable amount" in this application, the "processable amount" is not limited to this and may be the amount of ink, the length of a sheet, etc. When the amount of ink is used as the "processable amount," the amount of remaining ink detected by the ink remaining amount detection unit 24 is compared with the calculated value of the amount of ink to be consumed in the print job to be printed next, and it is determined whether the amount of remaining ink is insufficient.
[0091] As described above, the printing system 1 of this embodiment is a printing system 1 including the server 30, the mobile terminal device 10, and the printer 20, in which the server 30 stores a server private key and a device public key corresponding to the device private key, and the printer 20 stores the device private key and a server public key corresponding to the server private key, and the mobile terminal device 10 transmits a session start notification including a user device token to the server 30 (S100), and when authentication of the user device token included in the session start notification received from the mobile terminal device 10 is successful, the server 30 creates a common passcode (S101b), adds a server digital signature using the server private key to the common passcode (S101c), and transmits ciphertext 1 (S101f) obtained by encrypting the common passcode with the server digital signature added using the device public key to the mobile terminal device 10 (S102), and the mobile terminal device 10 transmits the ciphertext 1 received from the server 30 to the mobile terminal device 10 (S103). The printer 20 sends a session start notification including ciphertext 1 to the printer 20 (S104). The printer 20 uses its device private key to decrypt ciphertext 1 included in the session start notification received from the mobile terminal device 10 (S105a). The printer 20 uses its server public key to decrypt the server digital signature of the common passcode obtained by decrypting ciphertext 1. If the server digital signature is confirmed to be authentic, the printer 20 sends ciphertext 2 (S105e), which is a predetermined character string encrypted with the common passcode, to the mobile terminal device 10 (S106). The mobile terminal device 10 then sends ciphertext 2 received from the printer 20 to the server 30. The server 30 uses the common passcode to decrypt ciphertext 2 received from the printer 20 (S109b). If the server 30 confirms that the information obtained by decrypting ciphertext 2 is the predetermined character string, communication is performed using the common passcode (S61, S63, S64, S67, S68, S81, S83, S84, S86, S87, S89, S90).
[0092] In this way, in the printing system 1 of this embodiment, even when communication between the server 30 and the printer 20 originates from the mobile terminal device 10, the contents of communication between the server 30 and the printer 20 can be kept secret from the mobile terminal device 10.
[0093] Furthermore, if authentication of the user device token is successful, the server 30 stores the server session ID in association with the common passcode (S101e) and transmits the server session ID and ciphertext 1 to the mobile terminal device 10 (S102). The mobile terminal device 10 stores the server session ID received from the server 30 (S103). If the printer 20 is able to confirm that the server digital signature is authentic, the printer 20 stores the device session ID in association with the common passcode (S105d) and transmits ciphertext 2 and the device session ID to the mobile terminal device 10 (S106). The mobile terminal device 10 stores the device session ID received from the printer 20 in association with the server session ID (S107). If the mobile terminal device 10 receives information with a server session ID assigned from the server 30, the mobile terminal device 10 assigns the device session ID to the information and transmits it to the printer 20. If the mobile terminal device 10 receives information with a device session ID assigned from the printer 20, the mobile terminal device 10 assigns the server session ID to the information and transmits it to the server 30.
[0094] In this way, the mobile terminal device 10 stores the device session ID received from the printer 20 in correspondence with the server session ID, and when it receives information with a server session ID assigned from the server 30, it assigns the device session ID to the information and sends it to the printer 20, and when it receives information with a device session ID assigned from the printer 20, it assigns the server session ID to the information and sends it to the server 30, so that the mobile terminal device 10 can properly relay information between the server 30 and the printer 20.
[0095] Furthermore, the mobile terminal device 10 transmits a session start Ack, which includes the ciphertext 2 and is used to start a session in response to the session start notification, to the server 30 (S108). As a result, the session start Ack plays a role in confirming the session started by the mobile terminal device 10, as well as in transmitting the ciphertext 2 to the server 30.
[0096] After transmitting a session start Ack to the server 30, the mobile terminal device 10 transmits a session start Ack to the printer 20 to start a session in response to the session start notification (S111). By using this session start Ack, it is possible to further improve the security of communication.
[0097] Furthermore, the server 30 deletes the common passcode when the session started in response to the session start notification ends (S121), and the printer 20 deletes the common passcode when the session started in response to the session start notification ends (S124). In this way, the common passcode is deleted after the session ends, making it possible to carry out secure communication.
[0098] Furthermore, during communication using the common passcode, the printer 20 refuses to receive encrypted information sent by a relay device other than the mobile terminal device 10. For example, if the start of a collection session is notified from the mobile terminal device 10 while a charge is being attempted, it is difficult to ensure session consistency, so by limiting it to one session, it is possible to simplify the process and increase security (the most effective and safe method for ensuring consistency of the remaining charge amount of the printer 20).
[0099] The mobile terminal device 10 also transmits a request for a device registration challenge to the server 30 (S20). The server 30 generates a server challenge in response to the device registration challenge request received from the mobile terminal device 10 (S21a). The server 30 adds a server digital signature using the server private key to the server challenge (S21c) and transmits the server-signed server challenge to the mobile terminal device 10 (S22). The mobile terminal device 10 then transmits a device certificate acquisition request including the server-signed server challenge received from the server 30 to the printer 20 (S23). The printer 20 decrypts the server digital signature of the server-signed server challenge included in the device certificate acquisition request received from the mobile terminal device 10 using the server public key (S24a). If the server digital signature is confirmed to be authentic, the printer 20 transmits to the mobile terminal device 10 the device-signed server challenge, which is the device registration challenge added with the device digital signature using the device private key, and a device certificate including the serial number and device public key of the printer 20 (S24b). S25), the mobile terminal device 10 sends to the server 30 a registration request for the printer 20, including the server challenge with the device signature received from the printer 20 and the device certificate (S26). If the server challenge with the device signature and the device certificate received from the mobile terminal device 10 satisfy a predetermined condition, the server 30 generates a user device token, associates and stores information corresponding to the serial number of the printer 20 included in the device certificate received from the mobile terminal device 10 with the device public key and authentication information, and sends the user device token to the mobile terminal device 10. The mobile terminal device 10 stores the previous user device token. The predetermined condition includes: the device certificate received from the printer 20 being confirmed to be authentic; the device digital signature in the server challenge with the device signature is confirmed to be authentic as a result of decrypting the device digital signature using the device public key; and the server challenge in the server challenge with the device signature matches the generated server challenge.
[0100] Since it is cumbersome to register all the different certificates for each device in the server in advance, a device certificate is obtained from the device when registering the device, and if the certificate can be verified, the serial number of the device is registered, thereby enabling a secure device to be registered in the server 30. In addition, the server 30 issues a server challenge to the mobile terminal device 10 in response to device registration. This allows the mobile terminal device 10 to obtain the server challenge that proves that the user is a legitimate device user, and enables a secure session to be initiated between the server 30 and the printer 20 from the mobile terminal device 10.
[0101] In addition, in communication using the device session ID, the mobile terminal device 10 transmits a device challenge acquisition request to the printer 20 (S61), the printer 20 generates a device challenge in response to the device challenge acquisition request received from the mobile terminal device 10 (S62a), stores the device challenge in association with the device session ID (S62b), and transmits the device challenge encrypted with the common passcode to the mobile terminal device 10 (S63), and the mobile terminal device 10 transmits an instruction request to the server 30, including the device challenge encrypted with the common passcode, for requesting an instruction from the server 30. When the server 30 receives an instruction request from the mobile terminal device 10, it decrypts the encrypted device challenge with the common passcode (S66), encrypts the instruction and the decrypted device challenge with the common passcode, and sends an encryption instruction to the mobile terminal device 10 (S67), the mobile terminal device 10 sends the encryption instruction to the printer 20 (S68), the printer 20 decrypts the encryption instruction with the common passcode (S69), and if the device challenge included in the decrypted encryption instruction matches the device challenge stored in association with the device session ID, it executes processing according to the instruction (S69b). This allows the printer 20 to execute processing according to the instruction from the server 30 while ensuring security.
[0102] The printer 20 is a device capable of executing processing for the number of printable sheets, and the mobile terminal device 10 sends an instruction request to the server 30 to cause the printer 20 to increment the number of printable sheets (S64), and the server 30 sends an instruction to the mobile terminal device 10 to cause the printer 20 to increment a predetermined charge number (S67), and the printer 20 executes processing to increment the predetermined charge number to the number of printable sheets stored in the printer 20 in response to the instruction (S69b). This allows the printer 20 to execute the increment processing in response to the increment instruction from the server 30 while ensuring security.
[0103] Furthermore, when the printer 20 has completed the increment of the printable number in response to the instruction, it deletes the device session ID (S124). This allows the printer 20 to execute the increment process in response to the increment instruction for the charge number from the server 30 while ensuring security.
[0104] The printer 20 is a device capable of executing processing for the number of printable sheets, and the mobile terminal device 10 transmits an instruction request to the server 30 to cause the server 30 to retrieve the number of printable sheets stored in the printer 20 (S84), the server 30 transmits an instruction to the mobile terminal device 10 to cause the server 30 to retrieve the number of printable sheets stored in the printer 20 (S86), and the printer 20 executes processing to cause the server 30 to retrieve the number of printable sheets stored in the printer 20 in accordance with the instruction (S89). This allows the printer 20 to execute processing to cause the server 30 to retrieve the number of printable sheets stored in the printer 20 while ensuring security.
[0105] Furthermore, when the process of collecting the printable number according to the instruction is completed, the printer 20 deletes the device session ID (S124). This allows the printer 20 to execute the process of collecting the printable number stored in the printer 20 to the server 30 while ensuring security.
[0106] The present invention is not limited to the above-described embodiment, and various modifications are possible without departing from the spirit of the present invention.
[0107] (1) In the above embodiment, an inkjet printer 20 is used as an example of the second communication device, but a laser or thermal printer may also be used. It may also be a multifunction peripheral with a scanning function, a fax function, or the like, or a copier. It may also be a communication device that does not belong to the category of an image forming device. Furthermore, a server 30 is used as an example of the first communication device, but this is not limiting, and any device that has a communication function may also be used, even if it does not belong to the category of a server.
[0108] (2) In the above embodiment, the processing executed by the server 30 is not limited to being executed by a single server device, but may be executed by a plurality of server devices in cooperation with each other.
[0109] (3) In the above embodiment, a printing process has been described as an example of an image formation process. However, the image formation process is not limited to this. Copying, scanning, and fax transmission / reception processes may also be used. When scanning is used as the image formation process, the number of pages on one side of a document to be scanned can be applied as the processable amount. When fax transmission / reception is used as the image formation process, the number of pages on one side of a document to be sent as a fax, the number of pages on one side of a paper on which a received fax is printed, the length of the paper, or the amount of ink on the paper can be applied as the processable amount.
[0110] (4) In the above embodiment, the application 12B operates as a web application, but it may be a native application as long as it has equivalent functionality. Furthermore, the application 12B may be a browser.
[0111] (5) In the above embodiment, the mobile terminal device 10 first sends a session request to the server 30 (S100) in the session start process (S60). However, instead, the mobile terminal device 10 may first send the session request to the printer 20. Upon receiving the session request, the printer 20 creates a common passcode and signs the common passcode with the device private key. The printer 20 then creates a device session ID and associates the device session ID with the common passcode and stores it in the printer storage unit 26B. The printer 20 then encrypts the device-signed common passcode with the server public key and transmits it to the server 20 via the mobile terminal device 10. The server 30 decrypts the encrypted device-signed passcode with the server private key, and if the decryption is successful, verifies the device-signed common passcode with the device public key. If the verification of the device-signed common passcode is successful, the server 30 creates a server session ID, associates it with the common passcode, and stores it in the device record. The server 30 then encrypts a predetermined character string with the common passcode and transmits it to the printer 20 via the mobile terminal device 10. The printer 20 decrypts the specified character string using the common passcode, and if the match is successful, it enables the session state, and thereafter, encrypted communication using the common passcode is performed between the printer 20 and the server 30. [Explanation of symbols]
[0112] 1...printing system (communication system), 10...portable terminal device (relay device), 11...terminal CPU, 12...terminal memory unit, 12B...application program, 12C...printing data, 17, 22, 31...external communication unit, 20...printer (second communication device), 26A...printer CPU, 26B...printer memory unit, 30...server (first communication device), 32A...server CPU, 32B...server memory unit, PT...printer management table, ST...server management table.
Claims
1. A communication system including a first communication device, a relay device, and a second communication device, the first communication device stores a first private key and a second public key corresponding to the second private key; the second communication device stores the second private key and a first public key corresponding to the first private key; The relay device sending a first session request to the first communication device, the first session request including authentication information; The first communication device If the authentication information included in the first session request received from the relay device is successfully authenticated, a session key is generated; affixing a first digital signature to the session key using the first private key; transmitting first encrypted information obtained by encrypting the session key to which the first digital signature has been added with the second public key to the relay device; The relay device transmitting a second session request to the second communication device, the second session request including the first encryption information received from the first communication device; the second communication device, decrypting the first encrypted information included in the second session request received from the relay device with the second private key; and transmitting second encrypted information, which is predetermined information encrypted with the session key, to the relay device when it is confirmed that the first electronic signature is authentic as a result of decrypting the first encrypted information and using the first public key to obtain the first electronic signature of the session key; The relay device transmitting the second encrypted information received from the second communication device to the first communication device; The first communication device decrypting the second encrypted information received from the second communication device with the session key; If it is confirmed that the information obtained by decrypting the second encrypted information is the predetermined information, communication is performed using the session key. Communication system.
2. The first communication device If the authentication information is successfully authenticated, a first session ID is stored in association with the session key; transmitting the first session ID and the first encryption information to the relay device; The relay device storing the first session ID received from the first communication device; the second communication device, If it is confirmed that the first electronic signature is authentic, a second session ID is stored in association with the session key; transmitting the second encryption information and the second session ID to the relay device; The relay device storing the second session ID received from the second communication device in association with the first session ID; When receiving information to which the first session ID has been assigned from the first communication device, assigning the second session ID to the information and transmitting the information to the second communication device; When receiving information to which the second session ID has been assigned from the second communication device, assigning the first session ID to the information and transmitting the information to the first communication device. The communication system of claim 1 .
3. The relay device transmitting a first acknowledgment to the first communication device, the first acknowledgment including the second encrypted information, for initiating a session in response to the first session request; The communication system of claim 1 .
4. The relay device After transmitting the first confirmation response to the first communication device, transmitting a second confirmation response to the second communication device for starting a session in response to the second session request. The communication system according to claim 3 .
5. The first communication device deleting the session key when the session initiated in response to the first session request is terminated; the second communication device, deleting the session key when the session started in response to the second session request is terminated. The communication system of claim 1 .
6. the second communication device, During communication using the session key, reception of encrypted information transmitted by a relay device different from the relay device is rejected. The communication system of claim 1 .
7. The relay device Sending a challenge request to the first communication device; The first communication device generating a challenge in response to a challenge request received from the relay device; transmitting a first signed challenge obtained by adding a first digital signature using the first private key to the challenge to a relay device; The relay device sending a digital certificate request including the first signed challenge received from the first communication device to the second communication device; the second communication device, and if it is confirmed that the first electronic signature is authentic as a result of decrypting the first electronic signature of the first signed challenge included in the electronic certificate request received from the relay device using the first public key, transmit to the relay device a second signed challenge obtained by attaching a second electronic signature using the second private key to the challenge, and the electronic certificate including the identification information and the second public key of the second communication device; The relay device sending a registration request for the second communication device to the first communication device, the registration request including the second signed challenge received from the second communication device and the digital certificate; The first communication device generating the authentication information if the second signed challenge received from the relay device and the digital certificate satisfy a predetermined condition; storing information corresponding to the identification information of the second communication device included in the digital certificate received from the relay device, the second public key, and the authentication information in association with each other; transmitting the authentication information to the relay device; the relay device stores the authentication information; the predetermined condition includes that the electronic certificate received from the second communication device is confirmed to be authentic, and that the second electronic signature of the second signed challenge is confirmed to be authentic as a result of decrypting the second electronic signature of the second signed challenge using the second public key, and that the challenge of the second signed challenge matches the generated challenge. The communication system of claim 1 .
8. In the communication using the session key, the relay device transmits a challenge request to the second communication device; the second communication device, generating a challenge in response to a challenge request received from the relay device; storing the challenge in association with the session key; sending the challenge encrypted with the session key to the relay device; The relay device sending an instruction request to the first communication device, the instruction request including the challenge encrypted with the session key, for requesting an instruction from the first communication device; The first communication device Upon receiving the instruction request from the relay device, decrypting the encrypted challenge with the session key; sending an encryption instruction to the relay device, the encryption instruction being the instruction and the decrypted challenge encrypted with the session key; the relay device transmits the encryption instruction to the second communication device; the second communication device, decrypting the encrypted instruction with the session key; If the challenge included in the decrypted encryption instruction matches the challenge stored in association with the session key, the encryption device executes a process according to the instruction. The communication system of claim 1 .
9. the second communication device is a device capable of executing a processable amount of processing, The relay device transmits, to the first communication device, an instruction request for causing the second communication device to add a processable amount as the instruction request; The first communication device transmits, to the relay device, an instruction to cause the second communication device to add a predetermined processable amount; the second communication device, In response to the instruction, a process is executed to add the predetermined processable amount to the processable amount stored in the second communication device.
9. The communication system of claim 8.
10. the second communication device deletes the challenge when the addition of the processable amount in accordance with the instruction is completed.
10. The communication system of claim 9.
11. the second communication device is a device capable of executing a processable amount of processing, The relay device transmits to the first communication device, as the instruction request, an instruction request for causing the first communication device to recover the processable amount stored in the second communication device; The first communication device transmits, to the relay device, an instruction to cause the first communication device to recover the processable amount stored in the second communication device as the instruction request; the second communication device, In response to the instruction, a process is executed to cause the first communication device to recover the processable amount stored in the second communication device.
9. The communication system of claim 8.
12. the second communication device deletes the session key when the process of recovering the processable amount in accordance with the instruction is completed.
12. The communication system of claim 11.
Citation Information
Patent Citations
Image forming apparatus
JP1985097153A