WO2009059496A1 - A method, system, server and terminal for processing an authentication - Google Patents

A method, system, server and terminal for processing an authentication Download PDF

Info

Publication number
WO2009059496A1
WO2009059496A1 PCT/CN2008/070686 CN2008070686W WO2009059496A1 WO 2009059496 A1 WO2009059496 A1 WO 2009059496A1 CN 2008070686 W CN2008070686 W CN 2008070686W WO 2009059496 A1 WO2009059496 A1 WO 2009059496A1
Authority
WO
WIPO (PCT)
Prior art keywords
random number
trigger message
server
terminal
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2008/070686
Other languages
English (en)
French (fr)
Inventor
Xiaoqian Chai
Hongtao Gao
Kepeng Li
Linyi Tian
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to JP2010532407A priority Critical patent/JP5209731B2/ja
Priority to ES08734046T priority patent/ES2426946T3/es
Priority to KR1020107011964A priority patent/KR101134059B1/ko
Priority to EP08734046.9A priority patent/EP2209253B1/en
Publication of WO2009059496A1 publication Critical patent/WO2009059496A1/zh
Priority to US12/775,937 priority patent/US8392717B2/en
Anticipated expiration legal-status Critical
Priority to US13/270,579 priority patent/US8245048B2/en
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3271Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, system, server, and terminal for authenticating using a Data Synchronization (DS) protocol and a Device Management (DM) protocol.
  • DS Data Synchronization
  • DM Device Management
  • Synchronization Markup Language is a protocol developed to synchronize personal information and intra-enterprise data between multiple platforms and networks. It defines a series of operations used between entities involved in operations. , also defines a set of message formats that carry these operations. Based on SyncML, the Open Mobile Alliance (OMA) developed the DS and DM protocols.
  • OMA Open Mobile Alliance
  • DS can synchronize personal information and data within the enterprise between multiple platforms and networks.
  • DS is typically used for data synchronization between mobile devices or application servers, with network servers, or between two PCs.
  • DM is a kind of low-cost remote control that downloads management command data from the network side to the terminal device through the over-the-air (OTA) technology, and automatically runs the terminal device to complete the software and hardware upgrade, configuration, and diagnosis of the terminal.
  • OTA over-the-air
  • the management solution at the same time, the DM can also transfer the service information required by the operator and the function information of the terminal device from the terminal device to the server side to support the development of other services.
  • Step 101 The server sends a Trigger message for triggering the session to the terminal.
  • the trigger message carries: a digest generated by using a server random number (s_nonce), and a trigger information (TriggerInfo).
  • the trigger message can be carried by an SMS or other Push message.
  • S—nonce is the random number generated by the terminal (nonce) for the server to use.
  • Step 102 The terminal sends a session request message to the server.
  • the terminal After receiving the Trigger message, the terminal uses the saved s_nonce to generate the Digest information to authenticate the Trigger message. After the authentication is passed, the session request message is sent to the server to initiate the session.
  • the session request message carries: a session identifier (SessionID) and an authentication information (Authenticate) of the terminal, and the authentication information is a Digest generated by using a terminal random number (c nonce ).
  • C—nonce is a nonce generated by the server for use by the terminal.
  • the terminal and the server formally establish a session connection.
  • Step 103 The server returns a response message including an authentication result and an authentication request. A response message containing the authentication result and the server authentication request.
  • the response message carries: a server-to-terminal authentication result, a SessionID, and a server Authenticate, which is a Digest generated using s-nonce.
  • Step 104 The terminal returns a message including the authentication result to the server.
  • the terminal authenticates the server according to the Authenticate sent by the server, and then returns a message containing the authentication result to the server.
  • the message carries: the identity authentication result of the terminal to the server, and other related information.
  • the server fails to authenticate the terminal, or the terminal fails to authenticate the server, for example, the password is incorrect, or the nonce value is incorrect, the server or terminal can directly challenge the other party to request re-authentication.
  • the server can consider that the s_nonce error used by the server uses a value.
  • the default nonce of 0x00000000 generates the Digest of the Trigger message.
  • the terminal fails to authenticate the Trigger message using the Digest generated by s_nonce, the terminal uses the default nonce to generate the Digest to re-authenticate the Trigger message. If the authentication succeeds, the default nonce is used.
  • the identity authentication of the server and the terminal is followed by re-updating s-nonce and c-nonce.
  • the update process is shown in Figure 2:
  • Step 201 The server sends a Trigger message for triggering the session to the terminal.
  • the server determines the s-nonce error it used before, it uses the default nonce value to generate the Trigger.
  • the message is sent to the terminal, and the Trigger message carries: Digest, and TriggerInfo generated by using the default nonce value.
  • Step 202 The terminal fails to authenticate the Trigger message, and uses the default nonce value to re-authenticate. After receiving the Trigger message, the terminal authenticates the Trigger message by using the saved s_nonce. When the authentication fails for some reason, the terminal re-authenticates the Trigger message by using the default nonce value.
  • the terminal sends a session request message to the server.
  • Step 203 The terminal sends a session request message to the server.
  • the terminal After the terminal passes the default nonce value authentication, it sends a session request message to the server to initiate a session.
  • the session request message carries: a SessionID, a Digest generated using a default nonce value.
  • Step 204 The server returns an answer message including an authentication result, an authentication request, and a c-nonce update command.
  • the server authenticates the terminal with the default nonce value and then returns a response message containing the authentication result and the authentication request to the terminal.
  • the response message carries: a server-to-terminal identity authentication result, a c-nonce update command, and a Digest generated using a default nonce value.
  • Step 205 The terminal returns a message including the authentication result and the s_nonce update command to the server.
  • the terminal authenticates the server with the default nonce value.
  • the authentication updates the c-nonce and then returns a message containing the authentication result and the s-nonce update command to the server.
  • Step 206 The server returns an s_nonce update result to the terminal.
  • the default nonce is used in the processing of s-nonce errors, since the default nonce is a publicly fixed one. Value, after the malicious server intercepts the message using the default nonce, it can repeatedly send the message to the attack server or terminal.
  • Embodiments of the present invention provide a method, a system, a server, and a terminal for performing authentication using a data synchronization protocol or a device management protocol, which can effectively optimize an authentication process between a terminal and a server using the DS and DM protocols.
  • An embodiment of the present invention provides a method for performing authentication by using a data synchronization protocol or a device management protocol, where the method includes:
  • the server generates a trigger message by using a trigger message random number, and sends the trigger message generated by using the trigger message random number to the terminal, so that the terminal can extract the trigger message random number, and confirm that the trigger message random number is valid. And using the trigger message random number generation digest to authenticate the trigger message generated by using the trigger message random number, and after the authentication is passed, initiate a session request to the server indicated by the trigger message, where the session request carries the session Logo.
  • a method of authenticating using a data synchronization protocol or a device management protocol comprising:
  • the terminal is informed that the server random number needs to be updated
  • a method of authenticating using a data synchronization protocol or a device management protocol comprising:
  • the terminal receives a trigger message generated by the server using a default random number
  • the terminal After receiving the trigger message, the terminal first uses the server random number to authenticate the trigger message, and then uses the default random number authentication trigger message after the authentication fails, and generates a session request by using a default random number after the authentication is passed.
  • the message requesting session sending a new server random number to the server in the session, causing the server to update the server random number, and receiving the authentication information generated by the server using the default random number to authenticate the server identity, and sending the server to send Updating the terminal random number command to update the terminal random number;
  • a method for authenticating using a data synchronization protocol or a device management protocol comprising: The terminal sends a session request message generated by using the default random number to the server, so that after the server receives the session request message, when determining that the default random number needs to be used for authentication, the terminal uses the default random number pair.
  • the session request message is authenticated, and when the authentication is passed, the response message including the authentication result, the authentication request generated by the default random number, and the terminal random number update command is returned to the terminal;
  • a method of authenticating using a data synchronization protocol or a device management protocol comprising:
  • the terminal receives a trigger message generated by the server using a default random number or a session identifier or a trigger message identifier;
  • the terminal After receiving the trigger message, the terminal first uses the server random number to authenticate the trigger message, and after the authentication fails, the default random number or the session identifier or the trigger message is used to identify the authentication trigger message, and after the authentication is passed, the terminal uses The terminal random number generation session request message is sent to the server, so that the server uses the terminal random number authentication terminal.
  • a system for authenticating using a data synchronization protocol or a device management protocol comprising:
  • a server configured to generate a trigger message by using a trigger message random number, and send the trigger message generated by using the trigger message random number;
  • the terminal is configured to receive the trigger message generated by using the random number of the trigger message, and extract the random number of the trigger message, and when the random number of the trigger message is valid, use the trigger message random number to generate a digest to trigger the use
  • the trigger message generated by the message random number is authenticated, and after the authentication is passed, the session request is initiated to the server indicated by the trigger message.
  • a server comprising:
  • a first generating unit configured to generate, by using a trigger message random number, a trigger message that conforms to a data synchronization protocol or a device management protocol specification;
  • a sending unit configured to send the trigger message generated by using the trigger message random number to the terminal, so that the terminal may extract the trigger message random number, and confirm that the trigger message random number is valid And triggering, by using the trigger message random number, the trigger message generated by using the trigger message random number, and after the authentication is passed, initiating a session request to the server indicated by the trigger message.
  • a terminal where the terminal includes:
  • a receiving unit configured to receive, by the server, a trigger message that is generated by using a random number of a trigger message and conforms to a data synchronization protocol or a device management protocol specification;
  • a first authentication unit configured to extract the trigger message random number, and use the trigger message random number generation digest to authenticate the trigger message generated by using the trigger message random number when confirming that the trigger message random number is valid, After the authentication is passed, a session request is initiated to the server indicated by the trigger message.
  • a terminal where the terminal includes:
  • the learning unit is configured to learn that the server random number needs to be updated
  • a first generating unit configured to generate a new server random number, and carry the new server random number in a session request message, and send the message to the server, so that the server may receive the new
  • the server random number is used for the session request, the server random number saved by itself is updated using the new server random number.
  • a terminal where the terminal includes:
  • a receiving unit configured to receive, by the server, a trigger message that is generated by using a default random number and conforms to a data synchronization protocol or a device management protocol specification;
  • a generating unit configured to: after the trigger message is received, first use the server random number to authenticate the trigger message, and after the authentication fails, use the default random number to authenticate the trigger message, and after the authentication is passed, use the terminal random number
  • a generation session request is sent to the server to cause the server to authenticate the terminal using the terminal random number.
  • Another aspect of the embodiments of the present invention provides a method for performing authentication using a data synchronization protocol or a device management protocol, where the method includes:
  • the terminal receives a trigger message sent by the server
  • the terminal After receiving the trigger message, the terminal extracts the authentication information carried by the terminal to authenticate the server;
  • the terminal uses the server and the terminal to share the random number to generate a session request, and sends the session request to The server;
  • the server can authenticate the terminal by using the shared random number after receiving the session request
  • the terminal After receiving the authentication information response message generated by using the shared random number, the terminal authenticates the server by using the shared random number.
  • the server and the terminal use the shared nonce in the session process, and replace the authentication between the terminal and the server instead of the prior art s-nonce and c-nonce, thereby effectively reducing the burden on the system.
  • Embodiment 3 is a flowchart of Embodiment 1 of a method for performing authentication according to an embodiment of the present invention
  • FIG. 4 is a structural diagram of an embodiment of a message format after adding a nonce value
  • FIG. 5 is a flowchart of Embodiment 1 of a method for performing authentication provided by an embodiment of the present invention when an error occurs in an s_nonce;
  • Embodiment 6 is a flowchart of Embodiment 2 of a method for performing authentication according to an embodiment of the present invention
  • FIG. 7 is a flowchart of Embodiment 4 of a method for performing authentication according to an embodiment of the present invention
  • FIG. 9 is a flowchart of Embodiment 6 of a method for performing authentication according to an embodiment of the present invention
  • FIG. 10 is a flowchart for performing authentication according to an embodiment of the present invention. Method for carrying out a new s-nonce state reply message format embodiment diagram in Embodiment 7 of the method;
  • FIG. 14 is a structural diagram of Embodiment 1 of a system for performing authentication according to an embodiment of the present invention.
  • FIG. 15 is a structural diagram of Embodiment 1 of a terminal according to an embodiment of the present disclosure.
  • 16 is a structural diagram of a second embodiment of a terminal according to an embodiment of the present invention.
  • FIG. 17 is a structural diagram of Embodiment 2 of a system for performing authentication according to an embodiment of the present invention. detailed description
  • Embodiments of the present invention provide a method, system, server, and terminal for authenticating using a data synchronization protocol or a device management protocol, and effectively optimizing an authentication process between a terminal and a server using the DS and DM protocols.
  • the authentication of the messages in the session mentioned in the present invention applies the application layer security mechanism.
  • the server In the first embodiment of the method for performing authentication provided by the embodiment of the present invention, the server generates a nonce for the Trigger message, which is different from s_nonce and c_nonce for the Trigger message, and the nonce may be called a Trigger message nonce, and the server uses The nonce generates authentication information, and sends the new nonce and authentication information to the terminal along with the Trigger message, and the terminal authenticates the Trigger message with the new nonce.
  • the first embodiment of the method for performing authentication provided by the embodiment of the present invention is as shown in FIG. 3:
  • Step 301 The server sends a Trigger message to the terminal, where the message carries the Trigger message nonce.
  • the server Before sending, the server becomes a Trigger message nonce, and uses the nonce to generate a Digest, and then uses the Digest to generate a Trigger message.
  • the server takes the system time Ts of the device as the Trigger message nonce, and carries the system time Ts, which is the nonce of the Trigger message, in the Trigger message, so that the terminal can compare the local after receiving the Trigger message.
  • the difference between the time Tc and the system time Ts determines the validity of the nonce. For nonce, its validity is often referred to as the freshness of the nonce, fresh is valid, otherwise it is invalid.
  • the terminal calculates the time difference
  • the threshold Diff is usually configured in the terminal and can be an empirical value determined according to the network conditions. This is because the mobile network itself is unstable and is prone to delay in the transmission of Trigger messages. If the threshold is set too small, it is easy to invalidate the nonce value of the Trigger message. If the threshold is set to a large value, if a malicious server intercepts the Trigger message. , and repeatedly send the message to the terminal, as long as the time difference
  • the second type when the server generates the Trigger message, first generates a session identifier (SessionID) for the target-triggered message, and the session identifier may be generated according to a certain rule, so that the previously used session can be derived from the current session identifier.
  • the identifier is then used as the Trigger message nonce, and the nonce is used to generate the Digest, and the Digest is used to generate the Trigger message.
  • the terminal After receiving the Trigger message, the terminal extracts the session identifier to be triggered by the Trigger message, and uses the SessionID, the server identifier, the server password, and other fields of the Trigger message to generate a Digest to authenticate the validity of the message, and initiates the authentication after the authentication is passed.
  • a session request requests the session identified by the session ID.
  • the server extracts the session identifier in the session request message to identify the session.
  • the terminal may infer the freshness of the session identifier by using an encoding rule of the session identifier, or save the used session identifier in the terminal, and set the session identifier of the Trigger message with The saved session ID is compared to determine its freshness.
  • the session identifier in the method may also be replaced by a Trigger message identifier (NotificationID), and the trigger message identifier is used to associate the trigger message processing result of the terminal reply with the trigger message.
  • NotificationID Trigger message identifier
  • the server when the server generates the Trigger message, it numbers each Trigger message, takes the number as a dedicated Trigger message nonce, and uses the nonce to generate a Digest, and then uses the Digest to generate a Trigger message.
  • the numbering method can be either an accumulation method or a decrement method.
  • the terminal compares the nonce carried by it with the last saved nonce value. When the cumulative number is used, if the new nonce value is larger, the terminal considers the nonce value to be valid. The nonce value is invalid; when the decrement mode number is used, if the new nonce value is small, the nonce value is considered valid, otherwise the nonce value is considered invalid.
  • the terminal After the terminal determines that the new nonce value is valid and the authentication server identity is valid, the terminal saves the new nonce value for comparison with the next need to determine the Trigger message nonce value.
  • the post-message may arrive at the terminal first.
  • the server sends Trigger messages for different sessions, and the order of arrival to the terminal may change, causing the terminal to determine the valid message as invalid.
  • the server sends three Trigger messages for three different sessions.
  • the Trigger messages used by the three Trigger messages are: 30, 31, 32.
  • the terminal first receives a nonce of 32.
  • the Trigger message the terminal determines that the message is valid, and records the nonce.
  • the message is determined to be invalid because it is smaller than the recorded value.
  • the embodiment of the present invention proposes three solutions:
  • Manner 1 The terminal saves all or recently received Trigger messages nonce, and compares the Trigger message nonce that is determined to be invalid with the saved value. If there is no identical, the value is re-determined and the value is saved.
  • Manner 2 When the manner of the nonce number of the Trigger message is the cumulative mode, the terminal saves the received maximum value, and all or part of the value that is less than the current maximum value and has not been received, and the Trigger message nonnce that is determined to be invalid is invalid. Compared with the saved value, if it is not the same, it is re-determined that the value is valid, and the value is saved; when the manner of the nong number of the Trigger message is decremented, the terminal retains the minimum value received, and is greater than the current minimum. The value of all or part of the value that has not been received is compared with the retained value of the Trigger message nonce that is judged to be invalid. If it is not the same, the value is re-determined and the value is saved.
  • the terminal records the maximum.
  • the value "7”, and the value "3" and “6” that are less than 7 and not received if the value of the nonceger message nonce received by the terminal is "6", it is first compared with the maximum value "7". If it is less than "7", it is invalid value, then it is compared with "3" and "6". As a result, the same value exists, so it can be judged that the Trigger message nonce is valid, and the terminal deletes the "6" of its record.
  • the method is similar to the accumulation, and the description will not be repeated here.
  • the Trigger message nonce value can be carried in the header or message body of the Trigger message. Take the message header as an example.
  • the message format implementation after adding the nonce value is as shown in Figure 4, including: Digest, trigger-hdr, and trigger-body.
  • the trigger-hdr includes: version, user interaction mode (ui-mode), session initiator (initiator), random number (nonce), reserved field (future-use), session identifier (sessionid), server identifier. Fields such as length-identifier, server-identifier, etc.
  • the embodiment of the present invention further provides two methods for generating a Digest by using a Trigger message nonce:
  • the trigger field is the trigger-hdr and trigger-body of the Trigger message.
  • the terminal After receiving the Trigger message and determining that the Trigger message nonce is carried in the Trigger message, the terminal searches for the password corresponding to the server in the terminal management tree, and uses the searched password and the server-identifier, nonce, and trigger in the Trigger message to generate the Digest. If the Digest generated by the terminal is the same as the Digest carried in the message, the authentication is passed, otherwise the authentication fails.
  • the Trigger message nonce Since the Trigger message nonce is carried in the message header or the message body, the nonce becomes part of the trigger-hdr and trigger-body fields of the Trigger message. Therefore, the Digest can only use the trigger-hdr and trigger-body fields of the Trigger message. , Digest uses the formula to Expressed as:
  • the server-identifier field is the server ID
  • the password field is the server password
  • the trigger field is the trigger-hdr and trigger-body of the Trigger message.
  • the terminal After receiving the Trigger message and determining that the Trigger message nonce carried by the Trigger message is valid, the terminal searches for the password corresponding to the server in the terminal management tree, generates a Digest using the searched password, and the server-identifier and trigger in the Trigger message, and compares the terminal. Whether the generated Digest is the same as the Digest carried in the message, if the authentication is the same, the authentication fails.
  • Step 302 The terminal determines that the information is valid, and after the information is authenticated, sends a session request message to the server.
  • the terminal After receiving the Trigger message, the terminal first determines whether the Trigger message nonce carried in the Trigger message is valid. The method for determining is as described above. If it is valid, the password corresponding to the server is searched in the terminal management tree, and the used password and the Trigger message are used. The server-identifier and the trigger generate the Digest to authenticate the Trigger message. For the detailed authentication method, refer to the description in step 301. According to different methods for generating Digest, the method for generating Digest authentication by the terminal is different.
  • a session request message is sent to the server to initiate a session.
  • the session request message carries: SessionID, an Authenticate containing a Digest generated by c-nonce
  • the terminal and the server formally establish a session connection.
  • Step 303 The server returns a response message including an authentication result and an authentication request. A response message containing the authentication result and the authentication request.
  • the response message carries: a server-to-terminal identity authentication result, a SessionID, and an Authenticate containing a Digest generated using s-nonce.
  • Step 304 The terminal returns a message including the authentication result to the server.
  • the terminal authenticates the server according to the Authenticate sent by the server, and then returns a message containing the authentication result to the server.
  • the message carries: the identity authentication result of the terminal to the server, and other related messages.
  • Method 1 The server updates the account password of the terminal at intervals, and the server and the terminal automatically reset the nonce count value when the server updates the account password of the terminal.
  • Method 2 When the value of the nonce needs to be adjusted, for example, the predetermined time is up, the count reaches a predetermined value, and the server issues a command to directly reset the nonce value, and the command may be an alert command, for example:
  • the server After the server adjusts the value of the nonce, it sends a command to change the account password of the terminal to prevent the malicious server from intercepting the message and then attacking.
  • Method 3 The server can directly operate the terminal management tree of the terminal, so the server can add a node to the account information in the terminal management tree to save the nonce value received and retained by the terminal.
  • the node can be:
  • the server After the server adjusts the value of the nonce, it sends a command to change the account password of the terminal to prevent the malicious server from intercepting the message and then attacking.
  • Method 4 When the value of the nonce needs to be adjusted, for example, the predetermined time is up, the count reaches a predetermined value, the terminal sends a reset request to the server, and after receiving the confirmation from the server, the two parties adjust the nonce. After the adjustment is completed, the server updates the terminal's account password at the terminal to prevent the malicious server from intercepting the message and then attacking. S—nonce and c—nonce for the nonce used by the Trigger message. Each time a new session is initiated, the server generates a nonce dedicated to the Trigger message, which is used to trigger the session. The terminal uses the nonce to authenticate the Trigger message, even if The s_nonce saved by the server is wrong. The terminal can still initiate a session. If an error occurs in s_nonce or c-nonce, the s nonce or c nonce can be updated interactively to make the authentication redundant.
  • the s-nonce error is taken as an example.
  • the first embodiment of the method for performing authentication provided by the embodiment of the present invention is as shown in FIG. 5:
  • Step 501 The server sends a Trigger message to the terminal, where the message carries the Trigger message nonce.
  • the server Before sending, the server becomes a Trigger message nonce, and uses the nonce to generate a Digest, and then uses the Digest to generate a Trigger message.
  • Step 502 The terminal determines that the Trigger message nonce carried by the Trigger message is valid, and sends a session request message to the server after the information is authenticated.
  • the terminal After receiving the Trigger message, the terminal first determines whether the Trigger message nonce carried in the Trigger message is valid. For the determination method, refer to the description above. If it is valid, look up the password corresponding to the server in the terminal management tree, and use the searched password and the Trigger message. The server-identifier and the trigger generate the Digest to authenticate the Trigger message. For the detailed authentication method, refer to the description in step 301. According to different methods for generating Digest, the method for generating Digest authentication by the terminal is different.
  • a session request message is sent to the server to initiate a session.
  • the session request message carries: SessionID, Authenticate containing Digest generated by c-nonce From this step, the terminal and the server formally establish a session connection.
  • Step 503 The server returns a response message including an authentication result and an authentication request. A response message containing the authentication result and the authentication request.
  • the response message carries: a server-to-terminal identity authentication result, a SessionID, and an Authenticate containing a Digest generated using s-nonce.
  • Step 504 The terminal authenticates the server by using the s_nonce saved by the terminal, and the authentication fails.
  • Step 505 The terminal sends a challenge and an s_nonce update message to the server.
  • Step 506 The server generates the authentication information by using the new s_nonce and resends the authentication request to the terminal. After receiving the update message, the server updates its saved s_nonce according to the instructions of the terminal, and generates a new authentication request by using the updated s_nonce, and sends the update result and the new authentication request to the server.
  • Step 507 The terminal returns a message including the authentication result to the server.
  • the terminal authenticates the server according to the updated s_nonce generated by the server, and then returns a message containing the authentication result to the server.
  • the message carries: the identity authentication result of the terminal to the server, and other related messages.
  • the server each time a new session is initiated, the server generates a nonce dedicated to the Trigger message, which is used to trigger the session.
  • a nonce dedicated to the Trigger message can be generated only when the server considers the s-nonce error to trigger the session.
  • Step 601 The server sends a Trigger message to the terminal, where the message carries s_nonce.
  • Step 603 The server sends a new Trigger message to the terminal, where the message carries a Trigger message nonce.
  • the server Before sending, the server becomes a Trigger message nonce, and uses the nonce to generate a Digest, and then uses the Digest to generate a Trigger message.
  • Step 604 The terminal determines that the Trigger message nonce carried in the Trigger message is valid, and the After the Trigger message is authenticated, a session request message is sent to the server.
  • the terminal After receiving the Trigger message, the terminal can determine whether to use s_nonce or Trigger message nonce for authentication by determining whether the Trigger message uses the Trigger message nonce.
  • the method of determining whether the Trigger message has a nonce field to determine whether the Trigger message uses the Trigger message nonce that is, when the nonce field is included, the Trigger message uses the Trigger message nonce; or the Trigger message can be used to determine the version field information of the Trigger message.
  • the Trigger message can be used to determine whether the Trigger message uses the Trigger message nonce, because the version of the message can know whether the message uses the Trigger message nonce.
  • the terminal After receiving the Trigger message, the terminal first determines whether the Trigger message nonce carried in the Trigger message is valid. The method for determining is as described above. If it is valid, the password corresponding to the server is searched in the terminal management tree, and the used password and the Trigger message are used. The server-identifier and the trigger generate the Digest to authenticate the Trigger message. For the detailed authentication method, refer to the description in step 301. According to different methods for generating Digest, the method for generating Digest authentication by the terminal is different.
  • a session request message is sent to the server to initiate a session.
  • the session request message carries: SessionID, an Authenticate containing a Digest generated by c-nonce
  • the terminal and the server formally establish a session connection.
  • Step 605 The server returns a response message including an authentication result and an authentication request.
  • This step is basically similar to step 503 and will not be described in detail herein.
  • Step 606 The terminal authenticates the server by using the s_nonce saved by the terminal, and the authentication fails.
  • Step 607 The terminal sends a message including a challenge and a new s_nonce to the server.
  • Step 608 The server returns an update result and a new authentication request to the terminal.
  • This step is basically similar to step 506 and will not be described in detail herein.
  • Step 609 The terminal returns a message including the authentication result to the server.
  • This step is basically similar to step 507 and will not be described in detail herein.
  • the terminal may determine Whether the Trigger message uses the nonce of the Trigger message to determine whether it needs to update s—nonce.
  • the s-nonce update is directly performed, so that the server can directly use the updated s— Nonce performs authentication in the session.
  • the authentication fails, it is no longer necessary to use the default nonce to complete the authentication, which improves the security of the system.
  • the third embodiment of the method for performing authentication provided by the embodiment of the present invention, after updating s-nonce and c-nonce on the basis of the prior art, correspondingly updating the server password and the terminal password, and updating the server password can make use of
  • the default nonce generated server has different Digests, which can prevent message replay attacks on the terminal.
  • Updating the terminal password can make the terminal generated by the default nonce different in Digest, which can prevent message replay attacks on the server and improve the system. safety.
  • Step 701 The terminal receives a Trigger message for triggering the session, and authenticates the same.
  • Step 702 The terminal fails to authenticate the Trigger message, and re-authenticates by using a default nonce value.
  • Step 703 The terminal sends a session request message generated by using the default nonce to the server, if the default nonce authentication is passed, the terminal sends a session request message to the server indicated by the Trigger message, and carries the message in the message when the session uses the application layer security.
  • the authentication information generated by the default nonce proceeds to step 704. If the default nonce authentication fails, the terminal ignores the Trigger message, no session is initiated, and the process ends.
  • Step 704 The server authenticates the session request message sent by the terminal.
  • the server authenticates in two ways, as follows:
  • Method 1 The server first uses c-nonce to generate authentication information for authentication. If the authentication passes, it is processed according to the prior art method. If the authentication fails, the authentication information is re-authenticated using the default nonce. If the authentication succeeds, the server authentication request is generated by using the default nonce, and the process proceeds to step 705.
  • Method 2 The server uses the application layer security mechanism in the session, and the server sends a Trigger message generated by using the default nonce to the terminal, and the Trigger message is a Trigger message that triggers the session request message, and the default nonce pair is used.
  • the session request message is authenticated, and after the authentication is passed, the process proceeds to step 705.
  • the method for determining whether a session request message is triggered by a Trigger message is as follows: Each session request message has a unique session identifier, and compares the session identifier carried by the session request message with the session identifier carried by the Trigger message. If it is the same, it means that the session is triggered by the Trigger message.
  • Trigger message Determining whether the server sends a Trigger message generated by using the default nonce to the terminal, and the Trigger message is a Trigger message that triggers the session request message, and may occur after the session request message is authenticated by using the default nonce, after the authentication is passed. The judgment is made, and the judgment proceeds to step 705.
  • this step is that if the server does not send the Trigger message generated by the default nonce to trigger the session to the terminal, but receives the session request message sent by the terminal using the default nonce, the message is not a A normal and secure message has a high probability of being a spoofed message sent by a malicious third party and can be discarded. Therefore, after using this step, the security of the system can be improved.
  • Step 705 The server returns a response message to the terminal.
  • the server returns a response message including the authentication result, the authentication request, and the c-nonce update command to the terminal.
  • Step 706 A response message sent by the terminal authentication server.
  • the terminal uses the default nonce authentication server.
  • the specific authentication method is as follows: The terminal first uses s_nonce to generate authentication information for authentication. If the authentication succeeds, the terminal processes it according to the prior art method. If the authentication fails, the authentication information is re-authenticated using the default nonce. After the authentication is passed and the c-nonce is updated, the process proceeds to step 707.
  • this step may also use the application layer security mechanism in the session, and the terminal sends a session request message generated by using the default nonce to the server, the terminal uses the default nonce to authenticate the message, and the authentication passes and updates c-nonce and then proceeds to the step. 707.
  • this step it is determined whether the terminal sends a session request message generated by using the default nonce to the server. After the authentication is performed by using the default nonce, the terminal may perform the judgment after the authentication is passed, and the determination proceeds to step 707.
  • Step 707 The terminal returns a response message to the server.
  • the terminal returns to the server the authentication result, the c-nonce update result, and the s-nonce update command. Reply message.
  • Step 708 The server returns an s_nonce update result to the terminal.
  • the session identifier may be used as a nonce or the Trigger message identifier may be used as a nonce instead of the default nonce, so that a constant known nonce may be avoided, thereby achieving better security. High system security.
  • the fifth embodiment of the method for performing authentication provided by the embodiment of the present invention is as shown in FIG. 8:
  • Step 801 The terminal learns that the s_nonce needs to be updated.
  • the terminal determines that s_nonce has expired, or finds that the s_nonce saved by the server is inconsistent with the terminal's storage, it can be informed that s-nonce needs to be updated.
  • the method for the terminal to discover that the s_nonce saved by the server is inconsistent with the terminal may be: After receiving the Trigger message, the terminal uses the saved s_nonce to authenticate the Trigger message. When the authentication fails for some reason, the terminal uses the terminal. The province's nonce value or session identifier is re-authenticated as a nonce or a Trigger message ID is generated as a nonce.
  • the s_nonce error used by the server is incorrect, and the s_nonce saved by the server is inconsistent with the terminal.
  • Step 802 The terminal sends a session request message that includes the update information to the server.
  • the terminal When the terminal knows that it needs to update s nonce, it generates a new s nonce and carries the s nonce Sending to the server in the session request message requests the initiation of the session and causes the server to update s_nonce.
  • the session request message carries: a SessionID, a newly generated s_nonce, and an Authenticate containing a Digest generated using a c-nonce value.
  • a default nonce value or a session identifier may be used as a nonce or a Digest generated using a Trigger message ID as a nonce.
  • the newly generated s-nonce can be carried in the message header (SyncHdr) or message body (SyncBody) of the session request message (SyncML).
  • the SyncML message carrying s-nonce is:
  • Step 803 The server returns a response message including an authentication result, an update result, and an authentication request.
  • the server authenticates the terminal by using the c-nonce value, and updates the saved s-nonce with the updated s_nonce carried in the session request message; the authentication is passed, and the update is successful, and then used.
  • the updated s_nonce generates an authentication request and returns a response message including the authentication result, the update command, and the authentication request to the terminal.
  • the server first uses c-nonce recognition
  • the session request message is s-nonce updated after the authentication is passed, so as to keep the s nonce saved by the server and the s nonce maintained by the terminal.
  • the response message carries: a server-to-terminal identity authentication result, an s-nonce update result, and an Authenticate containing a Digest generated using the updated s nonce value.
  • Step 804 The terminal returns a message including the authentication result to the server.
  • the terminal uses the updated s-nonce value to authenticate the server. After the authentication is passed, the authentication result is returned to the server.
  • the number of signaling interactions is reduced.
  • Step 901 The server sends a Trigger message to the terminal, where the message carries s_nonce.
  • the server does not receive the session request from the terminal within a certain period of time, it can be considered that the authentication has failed.
  • Step 903 The server sends a Trigger message to the terminal, where the message carries a Trigger message nonce.
  • the server Before sending, the server becomes a Trigger message nonce, and uses the nonce to generate a Digest, and then uses the Digest to generate a Trigger message.
  • Step 904 The terminal finds that it needs to update s—nonce.
  • the terminal After receiving the Trigger message, the terminal determines whether the Trigger message uses the nonce of the Trigger message, determines whether the s_nonce needs to be updated, and finds that the Trigger message uses the nonce dedicated to the Trigger message, and needs to perform the s nonce update.
  • the method of determining whether the Trigger message uses the nonce of the Trigger message may determine whether the Trigger message uses the tunnel message nonce by determining whether there is a nonce field in the Trigger message, that is, when the nonce field is included, the Trigger message uses the Trigger message nonce. Or you can determine whether the Trigger message uses the Trigger message nonce by judging the version field information of the Trigger message. This is because the version field information contains the message that the Trigger message uses the Trigger message nonce.
  • Trigger message is not a nonce of the Trigger message, it means that it is not needed. Perform s-nonce update and go directly to the normal processing flow.
  • Step 905 The terminal sends a session request message that includes the update information to the server.
  • the terminal After receiving the Trigger message, and determining that the Trigger message nonce is used for the Trigger message, the terminal first determines whether the Trigger message nonce carried in the Trigger message is valid. The method for determining is as described above. If it is valid, the terminal management tree searches for the The password corresponding to the server is generated by using the searched password, the server-identifier, and the trigger to generate the Digest, and the Trigger message is authenticated. For the detailed authentication method, refer to the description in step 301, and the method for generating the Digest authentication by the terminal according to different methods for generating the Digest. It will be different.
  • the terminal After the terminal authenticates the Trigger information, the terminal generates a new s_nonce, and carries the s_nonce in the session request message, sends the session request message containing the update information to the server, initiates the session, and causes the server to update the s— Nonce.
  • the session request message carries: a SessionID, an updated s_nonce, and an Authenticate containing a Digest generated using a c-nonce value.
  • the newly generated s_nonce can be carried in the message header (SyncHdr) or the message body (SyncBody) of the session request message.
  • Step 906 The server returns a response message including the authentication result, the update result, and the authentication request.
  • the server authenticates the terminal by using the c-nonce value, and updates the saved s_nonce with the updated s_nonce carried in the session request message; the authentication is passed, and after the update is successful, the update is used.
  • the s_nonce generates an authentication request and returns a response message including the authentication result, the update result, and the authentication request to the terminal.
  • the response message carries: a server-to-terminal identity authentication result, an s-nonce update result, and an Authenticate containing a Digest generated using the updated s-nonce value.
  • Step 907 The terminal returns a message including the authentication result to the server.
  • the terminal uses the updated s-nonce value to authenticate the server. After the authentication is passed, the authentication result is returned to the server.
  • the message carries: authentication results for the server, and other related messages.
  • the terminal may decide not to initiate a session. If the s-nonce expires or is incorrect and needs to be updated, the terminal cannot update s-nonce, and cannot effectively maintain s-nonce. Resolution. After that, when it decides not to initiate a session, it sends a status reply message to the server. When the terminal determines that s_nonce has expired, or the server saves the discrepancy with the terminal, a new s_nonce is generated, and the status is replied.
  • the message carries the new s-nonce, the use of c-nonce, the terminal user name, the password, the reply message body, etc., so that the server can receive the status reply message, and can use the c-nonce, the terminal user name,
  • the Digest calculated by the password, the reply message body, etc. authenticates the information, and after the authentication is passed, the new s-nonce is updated according to the status reply message to update its saved s-nonce.
  • the status reply message format implementation carrying the new s-nonce is as shown in FIG. 10, and includes: Digest, notification-hdr, and notification-body.
  • the notification-hdr includes: version (version), status code (status-code), corresponding notification message identifier (Notification-ID), new random number (Next-nonce), reservation (future-use), session identifier ( Sessionid ), authentication ID length ( length-authname ), authentication ID ( authname ).
  • the NextNonce is the new s-nonce.
  • the s_nonce and the c-nonce are two different values, which are respectively generated by the server and the terminal, and are used by the other party, so that one problem does not affect the other one.
  • the method for performing authentication provided by the embodiment of the present invention is as follows. And nine, in the case of s-nonce problems, provide a separate update s-nonce solution.
  • the situation in which s-nonce has problems includes: The terminal determines that s_nonce has expired, or finds that the s_nonce saved by the server has a problem. For example, the terminal determines that the s_nonce saved by the server is inconsistent with the s-nonce of the terminal, and is out of sync. .
  • the method for determining that the s_nonce saved by the server is inconsistent with the s_nonce of the terminal is not synchronized: the server does not receive the reply information of the terminal within a certain period of time after the s_nonce sends the trigger message; or the terminal discovery server sends the information The default nonce generation in the Trigger message Digest; Or the nonce is not used in the Trigger message sent by the terminal discovery server.
  • the terminal finds a problem in the s-nonce, and initiates a session request after the server identity authentication is passed.
  • the authentication information of the authentication terminal identity in the session request message is generated by using c-nonce or using a basic authentication method, that is, the user name force p
  • the password authentication method further updates the s-nonce.
  • This embodiment provides two methods for updating s-nonce: a method for performing authentication, and a method for performing authentication.
  • the nonce value generation Trigger message is described as an example. The flow is shown in Figure 11:
  • Step 1101 The server sends a Trigger message for triggering the session to the terminal.
  • the default nonce value is used to generate a Trigger message to be sent to the terminal.
  • the Trigger message carries: Digest generated by using the default nonce value.
  • Step 1102 The terminal fails to authenticate the Trigger message, and uses the default value to re-authenticate.
  • the terminal After receiving the Trigger message, the terminal uses the saved s_nonce to generate the Digest to authenticate the Trigger message. When the authentication fails for some reason, the terminal uses the default nonce value to generate the Digest to re-authenticate the Trigger message.
  • the s_nonce error used by the server is incorrect, and the s_nonce saved by the server is inconsistent with the terminal.
  • Step 1103 The terminal sends a session request message that includes the update information to the server.
  • a new s_nonce is generated, and the s_nonce is carried in the session request message, and the session request message containing the update information is sent to the server, the session is initiated, and the server is updated. — nonce.
  • the session request message carries: a SessionID, an updated s_nonce, and an Authenticate containing a Digest generated using a c-nonce value.
  • the session identifier may be used as a nonce or the Trigger message identifier may be used as a nonce instead of the default nonce, so that a constant known nonce may be avoided, thereby achieving better security.
  • Step 1104 The server returns a response message including an authentication result, an update result, and an authentication request.
  • the server authenticates the terminal by using the c-nonce value, and updates the saved s-nonce with the updated s_nonce carried in the session request message; the authentication is passed, and the update is successful, and then used.
  • the updated s_nonce generates an authentication request, and returns a response message including the authentication result, the update result, and the authentication request to the terminal.
  • the response message carries: a server-to-terminal identity authentication result, an s-nonce update result, and an Authenticate containing a Digest generated using the updated s-nonce value.
  • Step 1105 The terminal returns a message containing the authentication result to the server.
  • the terminal uses the updated s-nonce value to authenticate the server. After the authentication is passed, the authentication result is returned to the server.
  • the nonce value generates a Trigger message, but does not carry the update information in the session request as an example. The process is shown in Figure 12:
  • Step 1201 The server sends a Trigger message for triggering the session to the terminal.
  • the default nonce value is used to generate a Trigger message to be sent to the terminal.
  • the Trigger message carries: Digest generated by using the default nonce value.
  • Step 1202 The terminal fails to authenticate the Trigger message, and uses the default nonce to re-authenticate. After receiving the Trigger message, the terminal uses the saved s_nonce to generate the Digest to authenticate the Trigger message. When the authentication fails for some reason, the terminal uses the default nonce value to generate the Digest to re-authenticate the Trigger message.
  • the s_nonce error used by the server is incorrect, and the s_nonce saved by the server is inconsistent with the terminal.
  • Step 1203 After the terminal authenticates the information, the terminal sends a session request message to the server. If the authentication is passed, a session request message is sent to the server to initiate a session.
  • the session request message carries: SessionID, an Authenticate containing a Digest generated by c-nonce
  • the terminal and the server formally establish a session connection.
  • Step 1204 The server returns a response message including an authentication result and an authentication request.
  • the default nonce generates an Authenticate, and then returns a response message containing the authentication result and the authentication request to the terminal.
  • the response message carries: a server-to-terminal identity authentication result, a SessionID, and an Authenticate containing a Digest generated using a default nonce.
  • Step 1205 The terminal returns an update command and an authentication result to the server.
  • the terminal uses the default nonce to authenticate the server. After the authentication is passed, a new s_nonce is generated, and the s-nonce update command is sent, and the authentication result to the server is sent to the server.
  • Step 1206 The server returns the update result to the terminal.
  • the server After receiving the update message, the server updates its saved s_nonce according to the instructions of the terminal, and returns the update result to the terminal.
  • the session identifier may be used as a nonce or the Trigger message identifier may be used as a nonce instead of the default nonce, so that a constant known nonce may be avoided, thereby achieving better security.
  • the server password can be updated.
  • the server uses the default nonce value to generate a Trigger message, but does not carry the default nonce in the session as an example, and the specific method is described as follows:
  • the Trigger message carries the following: The value either identifies the session as a nonce or identifies the Trigger message as a nonce generated Digest, TriggerInfo, and other related messages.
  • the terminal After receiving the Trigger message, the terminal uses the saved s_nonce to generate the Digest to authenticate the Trigger message. When the authentication fails for some reason, the terminal uses the default nonce value or uses the session identifier as the nonce or 4 bar Trigger message identifier. The nonce generates a Digest to re-authenticate the Trigger message. If the authentication succeeds, the session request message is sent to the server to initiate a session.
  • the session request message carries: a SessionID, an Authenticate containing a Digest generated by using c-nonce.
  • the server uses c-none to authenticate the session request message. After the authentication fails, a challenge is initiated to update c-nonce and re-authentication is required. After the authentication is passed, the server sends the message.
  • s The authentication request generated by nonce, the terminal also uses s—nonce for authentication. After the authentication fails, it initiates a challenge to update s—nonce and requires re-authentication. After the authentication is passed, the result is returned.
  • the terminal may carry the updated s_nonce to the server in the session request message, and the authentication request sent by the server uses the new s_nonce.
  • s-nonce is updated when s_nonce has problems, and c-nonce is not updated, even if the system uses the default nonce or the session identifier as a nonce or 4 bar Trigger message when processing s-nonce errors.
  • the identifier is authenticated as a nonce, but since it is not required to update c-nous, the terminal can use c-nous to generate a session request, reducing the number of times the default nonce or 4 bar session identifier is used as the nonce or the Trigger message identifier is used as the nonce. Security has been improved.
  • the nonce can be generated by the server or generated by the terminal. The following will be generated by the server.
  • Method 1 The nonce value is updated by the server.
  • the server sends an update random number command (NextNonce), and carries a new none in the NextNonce command.
  • NextNonce an update random number command
  • the terminal After receiving the NextNonce command, the terminal updates its saved nonce value with the new nonce carried in the NextNonce command.
  • the update command may be carried in the authentication message, that is, the update command and the authentication information of the server are carried in the message; or other management messages, that is, the authentication information of the server is not carried in the message.
  • the terminal If the update command is carried in the authentication message, after receiving the message, the terminal first updates the nonce according to the NextNonce command, and then uses the updated nonce to generate the Digest to authenticate the information. However, if there is another malicious server intercepting the message, the terminal can be replayed at any time. To prevent this from happening, when the NextNonce command is carried in the authentication message, the Digest generated by the nonce before the update is used. After receiving the message, the terminal uses the Digest generated by the nonce before the update to authenticate.
  • the nonce value saved by itself is updated; if the nonce update command is carried in other management messages, since the new nonce and the authentication information are separately sent to the other party in two different messages, there is no heavy weight. Put the risk of attack.
  • Step 1301 The server sends a Trigger message for triggering the session to the terminal.
  • the trigger message carries: Digest, TriggerInfo generated by using the shared nonce.
  • the shared nonce is generated for the server and used by the server and the terminal.
  • the shared nonce in this step may also be a trigger message nonce, or a default nonce.
  • the server may also use a server ID and password to generate a Trigger message for triggering a session without using a nonce.
  • the Trigger message is also generated directly using the server ID and password for authentication.
  • Step 1302 The terminal sends a session request message to the server.
  • the terminal After receiving the Trigger message, the terminal uses the saved s_nonce to generate the Digest to authenticate the Trigger message. After the authentication is passed, the session request message is sent to the server to initiate the session.
  • the session request message carries: a SessionID, an Authenticate containing a Digest generated using a shared nonce.
  • the terminal and the server formally establish a session connection.
  • Step 1303 The server returns a response message including the authentication result and the authentication request, and carries a NextNonce command in the response message.
  • the server authenticates the terminal according to the Authenticate sent by the terminal, passes the authentication, and finds that the shared nonce needs to be updated, generates a new shared nonce, and then returns a response message including the authentication result and the authentication request to the terminal, and carries the response message in the response message.
  • NextNonce command The server authenticates the terminal according to the Authenticate sent by the terminal, passes the authentication, and finds that the shared nonce needs to be updated, generates a new shared nonce, and then returns a response message including the authentication result and the authentication request to the terminal, and carries the response message in the response message. NextNonce command.
  • the response message carries: the server-to-terminal identity authentication result, the SessionID, the Authenticate containing the Digest generated using the pre-update nonce, and the NextNonce command containing the new nonce.
  • Step 1304 After receiving the response message, the terminal authenticates the message by using the nonce before the update.
  • Step 1305 After the authentication is passed, the terminal updates the shared nonce saved by itself by using the new nonce carried by the NextNonce command according to the instruction of the NextNonce command.
  • Step 1306 The terminal returns a message including the authentication result and the update result to the server.
  • the message carries: the identity authentication result of the terminal to the server, the update result of the shared nonce, and other related messages.
  • the server may have reached the effective time limit for the terminal, and therefore, in order to maintain the sharing, the terminal requests the server to update the shared nonce technical solution.
  • the terminal can use the Alert command in the DM command to request the server to update the shared nonce.
  • an Alert type is added to indicate that the request server updates the nonce.
  • the terminal When the terminal considers that the shared nonce needs to be updated, the terminal sends a common nonce update request to the server through the Alert command.
  • the message may be carried in the authentication message or other management message.
  • the server After receiving the message, the server determines whether to update according to the specific situation.
  • the Alert type can be defined as: org. openmobilealliance. extNonce.
  • the message instance of the Alert type can be:
  • the method of updating the nonce value by the terminal is similar to the method of updating the nonce value by the server, and details are not described herein again.
  • Method 2 The nonce update is performed jointly by the server and the terminal.
  • the server determines that the shared nonce needs to be updated, a new nonce is generated for updating, and the terminal may also generate a new nonce to update when the shared nonce needs to be updated.
  • the method of updating the nonce can be: Performed by the NextNonce command, the example is as follows: ⁇ Chal>
  • the NextNonce command can be carried in the message during the session.
  • the terminal can carry the NextNonce command in the session request, send it to the server, request the server to update the shared nonce, or use other messages to send the NextNonce command.
  • the server performs a common nonce update or the terminal performs a common nonce update
  • the peer updates the nonce after receiving the message, and then generates the Digest using the updated nonce.
  • the authentication will pass.
  • the terminal can be replayed at any time.
  • the NextNonce command is carried in the authentication message
  • the information can be authenticated by using the nonce before the update.
  • the nonce value saved by the NextNonce command is updated. If the other management message is used to carry the nonce update command, since the new nonce and the authentication information are separately sent to the other party in two different messages, there is no risk of attack.
  • the device can repeatedly send the message to the server or the terminal to perform a replay attack.
  • the server or the terminal will not recognize it, and it is considered as valid information and performs corresponding operations. In order to prevent this, the device can be used.
  • the nonce before the update generates the Digest, so that after receiving the message, the server first calculates the Digest using the nonce before the update to authenticate the message sender, that is, the terminal, and after the authentication is passed, updates the nonce value saved by itself according to the NextNonce command. The burden.
  • the embodiment of the system for performing authentication according to the embodiment of the present invention is as shown in FIG. 14 , and includes: a server 1410, configured to generate a trigger message by using a trigger message random number, and send the trigger message generated by using the trigger message random number;
  • the terminal 1420 is configured to receive the trigger message generated by using the random number of the trigger message, and use the trigger message random number to authenticate the trigger message generated by using the random number of the trigger message, and authenticate the random number generated by using the trigger message. The validity of the trigger message.
  • the server 1410 further includes:
  • a first generating unit 1412 configured to generate a trigger message by using a trigger message random number
  • a sending unit 1411 configured to send the trigger message generated by using the trigger message random number
  • the second generating unit 1417 is configured to generate a trigger message by using a server random number, and send the trigger message generated by using the server random number to the Terminal
  • the determining unit 1413 is configured to: when determining that the trigger message authentication generated by the terminal to the use server random number fails, the first generating unit 1412 is configured to generate a trigger message by using a trigger message random number;
  • the time unit 1414 is configured to: when the first generating unit 1412 generates a trigger message by using a trigger message random number, take a system time of the server, and carry the system time in the trigger generated by using the trigger message random number In the message;
  • a coding unit 1415 configured to number, by using the trigger message generated by the first generation unit 1412, a trigger message, using the number as the trigger message random number;
  • the random number resetting unit 1416 is configured to adjust the trigger message random number generated by the encoding unit 1415 as needed.
  • the session identifier to random number unit 1418 is configured to identify the session identifier of the session triggered by the trigger message. To trigger a random number of the message, when the terminal receives the trigger message, the terminal authenticates the trigger message by using the trigger message random number, and initiates a session request to request the session identifier identified session after the authentication is passed.
  • the coding unit 1415 further includes:
  • the accumulating coding unit 14151 is configured to use the accumulating manner to number the trigger messages generated by using the trigger message random number;
  • the decrement coding unit 14152 is configured to number the trigger messages generated by using the trigger message random number in a decrement manner.
  • the terminal 1420 further includes:
  • the receiving unit 1421 is configured to receive the trigger message generated by using the trigger message random number
  • the first authenticating unit 1422 is configured to perform, by using the trigger message random number, the trigger message generated by using the trigger message random number to authenticate, and authenticate The validity of the trigger message generated by using the trigger message random number.
  • the second authentication unit 1425 is configured to: when the trigger message is received, use the server random number to authenticate the trigger message, and use the trigger message random number to perform re-authentication after the authentication fails.
  • the first valid determining unit 1423 is configured to: when the receiving unit 1421 receives the trigger message generated by using the random number of the trigger message, take the local time of the terminal, and compare the local time with the system time difference. Comparing the absolute value with the preset value, when the value is less than the preset value, determining that the trigger message random number is a valid value, and controlling the first authentication unit 1422 to use the trigger message random number pair The trigger message generated by using the trigger message random number is used for authentication.
  • the second valid determining unit 1424 is configured to receive, by the receiving unit 1421, the trigger message generated by using the random number of the trigger message, and determine that the random number of the trigger message carried by the trigger message is valid according to the random number of the trigger message saved by the receiving unit 1421. And storing the trigger message random number carried in the trigger message, and controlling the first authentication unit 1422 to use the trigger message random number to authenticate the trigger message generated by using the trigger message random number.
  • the session identifier forwarding random number unit 1428 is configured to use the session identifier of the session triggered by the trigger message as the trigger message random number, and use the trigger message random number to authenticate the trigger message, and after the authentication is passed A session request is initiated to request a session identified by the session identifier.
  • the second valid determining unit 1424 includes:
  • the first coding determining unit 14241 is configured to compare the random number of the trigger message saved by the terminal with the random number of the trigger message carried by the trigger message, where the random number of the trigger message carried in the trigger message is greater than the maximum saved When the random number of the trigger message is received, or when the random number of the received trigger message stored in the terminal does not include the random number of the trigger message carried in the trigger message, or the value that is not received in the terminal is included in the value When the trigger message random number carried in the message is triggered, it is determined that the trigger message random number carried in the trigger message is valid.
  • the second encoding determining unit 14242 is configured to compare the random number of the trigger message saved by the terminal with the random number of the trigger message carried by the trigger message, where the random number of the trigger message carried in the trigger message is smaller than the minimum saved When the random number of the trigger message is triggered, or when the random number of the triggered trigger message that is stored in the saved message does not include the random number of the trigger message carried in the trigger message, or the value that is not received in the terminal is included in the value When the random number of the trigger message carried in the trigger message is described, it is determined that the random number of the trigger message carried in the trigger message is valid.
  • Embodiment 1 of the system for performing authentication For the specific operation mode of Embodiment 1 of the system for performing authentication provided by the embodiment of the present invention, refer to the above.
  • the default nonce is used to complete the authentication, which improves the security of the system.
  • the first embodiment of the server provided by the embodiment of the present invention is substantially the same as the server in the first embodiment of the system for performing authentication according to the embodiment of the present invention, and the description is not repeated herein.
  • the structure of the terminal embodiment provided by the embodiment of the present invention is as shown in FIG. 15 and includes:
  • the receiving unit 1501 is configured to receive a trigger message sent by the server.
  • the first generating unit 1502 is configured to: after receiving the trigger message, determine that the server random number needs to be updated, generate a new server random number, and carry the new server random number in the session request, and send it to the location
  • the server is configured to enable the server to update the server random number saved by itself using the new server random number when receiving the session request carrying the new server random number.
  • the second generating unit 1503 is configured to: after receiving the trigger message, decide not to initiate a session, determine that the server random number needs to be updated, generate a new server random number, and generate the new server random number Carrying in the status reply message, sending to the server, so that the server can update the server saved by using the new server random number when receiving the status reply message carrying the new server random number random number.
  • the update request is carried in the session request message, which can reduce the number of signaling interactions, effectively reduce the load of the system, and can effectively reduce the load of the system, and can be used in the embodiment of the present invention. Reduce the number of times the default nonce is used to complete the authentication, which improves the security of the system.
  • the second embodiment of the terminal provided by the embodiment of the present invention has a structure as shown in FIG. 16:
  • Terminal 1600 includes:
  • the receiving unit 1601 is configured to receive a trigger message sent by the server.
  • the generating unit 1602 is configured to: after receiving the trigger message, first use the server random number to authenticate the trigger message, and after the authentication fails, use the default random number to authenticate the trigger message, and after the authentication is passed, use the terminal random number to generate The session request is sent to the server so that the server authenticates the terminal using the terminal random number.
  • the password modification unit 1603 is configured to modify the server password and the terminal password after completing the server random number update using the new server random number.
  • the terminal when s-nonce needs to be updated, only s-nonce is updated, and c-nonce is not updated, even if the system uses the default nonce when processing s-nonce errors. Authentication, but since it is not necessary to update c-nonce, the terminal can use c-nonce to generate session requests, reducing the number of times the default nonce is used, and the security of the system is improved.
  • the second embodiment of the system for performing authentication according to the embodiment of the present invention is as shown in FIG. 17, and includes: a server 1710, and a terminal 1720.
  • the server 1710 further includes:
  • the triggering unit 1711 is configured to generate a trigger message by using a server and a terminal to share a random number, and send the trigger message to the terminal, so that the terminal uses the shared random number pair after receiving the trigger message. Trigger a message for authentication;
  • the receiving unit 1712 is configured to receive, by the receiving terminal, a session request generated by using the shared random number; an authentication unit 1713, configured to authenticate the session request by using the shared random number; and a generating unit 1714, configured to: After the session request is authenticated, the response message is generated by using the shared random number, and sent to the terminal, so that after receiving the response message, the terminal authenticates the response message by using the shared random number. .
  • the updating unit 1715 is configured to generate the shared random number, generate a new shared random number when the shared random number needs to be updated, and send an updated random number message including the new shared random number to the terminal, And causing the terminal to update the shared random number by using the new shared random number when receiving the update random number message.
  • the requesting unit 1716 is configured to: when it is determined that the shared random number needs to be updated, send a request to update the random number message to the terminal, so that the terminal sends the request to update the random number message, and after determining to update, generate The new shared random number, and sending an updated random number message including the new shared random number.
  • the terminal 1720 further includes:
  • the receiving unit 1721 is configured to receive, by using a server, a trigger message generated by the server and the terminal sharing a random number;
  • the first authentication unit 1722 is configured to: after receiving the trigger message, use the shared random number to authenticate the trigger message;
  • a generating unit 1723 configured to generate a session request by using the shared random number after the authentication is passed, and send the session request to the server, so that the server may use the shared random number pair after receiving the session request
  • the session request is authenticated, and the validity of the session request is authenticated;
  • the second authentication unit 1724 is configured to authenticate the response message by using the shared random number after receiving the response message generated by the server using the shared random number.
  • the updating unit 1725 is configured to generate the shared random number, generate a new shared random number when the shared random number needs to be updated, and send an updated random number message including the new shared random number to the server, So that the server updates the shared random number using the new shared random number when receiving the update random number message.
  • the requesting unit 1726 is configured to send a request update when it is determined that the shared random number needs to be updated. Sending a random number message to the server, so that the server updates the random number message after receiving the request, and after determining the update, generating the new shared random number, and sending an update including the new shared random number Random number message.
  • the server embodiment 2 provided by the embodiment of the present invention and the terminal embodiment 3 provided by the embodiment of the present invention are basically the same as the server and the terminal described in the system embodiment of the present invention. Repeat the description.
  • the medium can be a read only memory, a magnetic disk or a compact disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Description

进行认证的方法、 系统、 服务器及终端
本申请要求于 2007 年 11 月 8 日提交中国专利局、 申请号为 200710170309.5、发明名称为"进行认证的方法、系统、服务器及终端 "、及 2007 年 11月 27 日提交中国专利局、 申请号为 200710195462.3、 发明名称为"进行 认证的方法、 系统、 服务器及终端"的中国专利申请的优先权, 其全部内容通 过引用结合在本申请中。
技术领域
本发明涉及通信技术领域, 尤其涉及一种使用数据同步 (DS , Data Synchronization )协议和设备管理 ( DM, Device Management )协议进行认证 的方法、 系统、 服务器及终端。
背景技术
同步标记语言 ( SyncML, Synchronization Mark-up Language )是为了实现 多个平台及网络之间个人信息及企业内数据的同步而开发出的协议,其定义了 参与操作的实体之间使用的一系列操作,同时定义了承载这些操作的一套消息 格式。 基于 SyncML, 开放行动通讯联盟( OMA, Open Mobile Alliance )开发 了 DS和 DM协议。
其中, DS可以在多个平台及网络之间实现个人信息及企业内数据的同步。 DS通常应用于移动设备或应用服务器、 与网络服务器之间的数据同步, 或两 台 PC之间的数据同步。
DM是一种通过空中下载技术(OTA, Over The Air )将管理指令数据从 网络侧下载到终端设备上,并由终端设备自动运行,进而完成终端软硬件升级、 配置、诊断等的低成本远程管理解决方案, 同时 DM还可以将运营商需要的业 务信息和终端设备的功能信息等从终端设备传递到服务器侧,以支持其它业务 的开展。
在 DS和 DM协议中使用了相似的安全认证机制,来实现对服务器( Server ) 及终端 (Client ) 身份的有效认证, 其认证流程如图 1所示:
步骤 101、 服务器发送用于触发会话的触发(Trigger ) 消息至终端。
该触发消息中携带有:使用服务器随机数( s— nonce )生成的摘要(Digest ), 和触发信息 ( Triggerlnfo )。 该触发消息可以由 SMS或其它 Push消息承载。 s— nonce为终端生成的随机数( nonce ) , 供服务器使用。
步骤 102、 终端发送会话请求消息至服务器。
终端收到 Trigger消息后,使用保存的 s— nonce生成 Digest信息对该 Trigger 消息进行认证, 认证通过, 则发送会话请求消息至服务器, 发起会话。
该会话请求消息中携带有: 会话标识 ( SessionID )、 和终端的认证信息 ( Authenticate ), 该认证信息为使用终端随机数 ( c nonce )生成的 Digest。
c— nonce为服务器生成的 nonce, 供终端使用。
从本步骤开始终端与服务器正式建立会话连接。
步骤 103、 服务器返回包含认证结果和认证请求的应答消息。 包含认证结果和服务器认证请求的应答消息。
该应答消息携带有: 服务器对终端的身份认证结果、 SessionID、服务器的 Authenticate , 该 Authenticate为使用 s— nonce生成的 Digest。
步骤 104、 终端返回包含认证结果的消息至服务器。
终端根据服务器发送来的 Authenticate对服务器进行认证, 然后向服务器 返回包含认证结果的消息。
该消息携带有: 终端对服务器的身份认证结果、 及其他相关信息。
如果服务器对终端的身份认证失败、或终端对服务器的身份认证失败, 例 如密码错误、 或 nonce值错误, 则服务器或者终端可以直接向对方发起质询 ( challenge )请求重新认证。
当服务器获知其在 Trigger消息中使用的 s— nonce错误时, 例如服务器发 出的多次的 Trigger消息都没有得到终端的正常回应, 则服务器可以认为其使 用的 s— nonce错误, 则使用一个值为 0x00000000的缺省 nonce生成 Trigger消 息的 Digest, 终端在使用 s— nonce生成的 Digest对 Trigger消息进行认证失败 后使用缺省 nonce生成 Digest对该 Trigger消息再进行认证, 如果认证通过则 使用缺省 nonce进行服务器和终端的身份认证, 随后对 s— nonce和 c— nonce进 行重新更新, 更新流程如图 2所示:
步骤 201、 服务器发送用于触发会话的 Trigger消息至终端。
服务器判断其之前使用的 s— nonce错误后,使用缺省 nonce值生成 Trigger 消息发送到终端, 该 Trigger消息中携带有: 使用缺省 nonce值生成的 Digest、 和 TriggerInfo。
步骤 202、 终端对该 Trigger消息认证失败, 使用缺省 nonce值重新认证。 终端收到 Trigger消息后,使用保存的 s— nonce对该 Trigger消息进行认证, 当由于某种原因认证失败时, 终端使用缺省 nonce值对该 Trigger消息重新进 行认证。
若认证通过, 说明服务器之前使用的 s— nonce错误, 终端向服务器发送会 话请求消息。
步骤 203、 终端发送会话请求消息至服务器。
终端使用缺省 nonce值认证通过后, 发送会话请求消息至服务器, 发起会 话。
该会话请求消息中携带有: SessionID、 使用缺省 nonce值生成的 Digest。 步骤 204、 服务器返回包含认证结果、 认证请求和 c— nonce更新命令的应 答消息。
服务器使用缺省 nonce值对终端进行认证,然后向终端返回包含认证结果 和认证请求的应答消息。
该应答消息携带有: 服务器对终端的身份认证结果、 c— nonce更新命令、 及使用缺省 nonce值生成的 Digest。
步骤 205、 终端返回包含认证结果及 s— nonce更新命令的消息至服务器。 终端使用缺省 nonce值对服务器进行认证, 认证通过更新 c— nonce, 然后 向服务器返回包含认证结果及 s— nonce更新命令的消息。
步骤 206、 服务器返回 s— nonce更新结果至终端。
在对现有技术的研究和实践过程中, 发明人发现现有技术存在以下问题: 在处理 s— nonce错误时使用缺省 nonce进 4亍认证, 由于缺省 nonce是一个 公开的固定不变的值, 恶意服务器在截获使用缺省 nonce的消息后, 可以重复 发送该消息攻击服务器或终端。
现有技术中的一个会话当中使用了两个 nonce: s— nonce和 c— nonce, 其分 别由终端、 服务器生成并更新, 终端、 服务器的管理负担较重。
发明内容 本发明实施例提供一种使用数据同步协议或设备管理协议进行认证的方 法、 系统、 服务器及终端, 能够对使用 DS和 DM协议的终端和服务器之间的 认证过程进行有效优化。
本发明实施例一方面,提供了一种使用数据同步协议或设备管理协议进行 认证的方法, 所述方法包括:
服务器使用触发消息随机数生成触发消息 ,并将所述使用触发消息随机数 生成的触发消息发送到终端; 以使所述终端可以提取所述触发消息随机数,在 确认所述触发消息随机数有效时,使用所述触发消息随机数生成摘要对所述使 用触发消息随机数生成的触发消息进行认证,在认证通过后, 向所述触发消息 指示的服务器发起会话请求, 所述会话请求中携带会话标识。
另一方面, 提供了一种使用数据同步协议或设备管理协议进行认证的方 法, 所述方法包括:
终端获知需要更新服务器随机数;
生成新的服务器随机数 ,并将所述新的服务器随机数携带在会话请求消息 中,发送到所述服务器, 以使所述服务器可以在收到所述携带有新的服务器随 机数的会话请求消息时,使用所述新的服务器随机数更新自身保存的服务器随 机数。
另一方面, 提供了一种使用数据同步协议或设备管理协议进行认证的方 法, 所述方法包括:
终端接收服务器发送的使用缺省随机数生成的触发消息;
所述终端在收到所述触发消息后,首先使用服务器随机数认证所述触发消 息, 在认证失败后再使用缺省随机数认证触发消息, 在认证通过后, 使用缺省 随机数生成会话请求消息请求会话,在会话中发送新的服务器随机数到所述服 务器,使所述服务器更新服务器随机数, 并接收服务器发送的使用缺省随机数 生成的认证信息以认证服务器身份,并接收服务器发送的更新终端随机数的命 令以更新终端随机数;
并在更新所述服务器随机数和终端随机数后更新服务器密码和终端密码。 另一方面, 提供了一种使用数据同步协议或设备管理协议进行认证的方 法, 所述方法包括: 终端向服务器发送使用缺省随机数生成的会话请求消息,以使所述服务器 在收到所述会话请求消息后,在确定需要使用缺省随机数进行认证时,使用缺 省随机数对所述会话请求消息进行认证, 并在认证通过时, 向所述终端返回包 含认证结果、 用缺省随机数生成的认证请求和终端随机数更新命令的应答消 息;
终端接收所述应答消息, 在确定需要使用缺省随机数进行认证时,使用缺 省随机数对所述应答消息进行认证, 并在认证通过时, 向所述服务器返回包含 认证结果和服务器随机数更新命令的应答消息。
另一方面, 提供了一种使用数据同步协议或设备管理协议进行认证的方 法, 所述方法包括:
终端接收服务器发送的使用缺省随机数或会话标识或触发消息标识生成 的触发消息;
所述终端在收到所述触发消息后,首先使用服务器随机数认证所述触发消 息, 在认证失败后再使用缺省随机数或会话标识或触发消息标识认证触发消 息, 在认证通过后, 使用终端随机数生成会话请求消息发送到服务器, 以使所 述服务器使用终端随机数认证终端。
另一方面, 提供了一种使用数据同步协议或设备管理协议进行认证的系 统, 所述系统包括:
服务器, 用于使用触发消息随机数生成触发消息, 并发送所述使用触发消 息随机数生成的触发消息;
终端, 用于接收所述使用触发消息随机数生成的触发消息,提取所述触发 消息随机数,在确认所述触发消息随机数有效时,使用所述触发消息随机数生 成摘要对所述使用触发消息随机数生成的触发消息进行认证, 在认证通过后, 向所述触发消息指示的服务器发起会话请求。
另一方面, 提供了一种服务器, 所述服务器包括:
第一生成单元,用于使用触发消息随机数生成符合数据同步协议或设备管 理协议规范的触发消息;
发送单元, 用于发送所述使用触发消息随机数生成的触发消息到终端, 以 使所述终端可以提取所述触发消息随机数, 在确认所述触发消息随机数有效 时,使用所述触发消息随机数对所述使用触发消息随机数生成的触发消息进行 认证, 在认证通过后, 向所述触发消息指示的服务器发起会话请求。
另一方面, 提供了一种终端, 所述终端包括:
接收单元,用于接收所述服务器使用触发消息随机数生成的符合数据同步 协议或设备管理协议规范的触发消息;
第一认证单元, 用于提取所述触发消息随机数,在确认所述触发消息随机 数有效时,使用所述触发消息随机数生成摘要对所述使用触发消息随机数生成 的触发消息进行认证,在认证通过后, 向所述触发消息指示的服务器发起会话 请求。
另一方面, 提供了一种终端, 所述终端包括:
获知单元, 用于获知需要更新服务器随机数;
第一生成单元, 用于生成新的服务器随机数, 并将所述新的服务器随机数 携带在会话请求消息中,发送到所述服务器, 以使所述服务器可以在收到所述 携带有新的服务器随机数的会话请求时,使用所述新的服务器随机数更新自身 保存的服务器随机数。
另一方面, 提供了一种终端, 所述终端包括:
接收单元,用于接收服务器发送的使用缺省随机数生成的符合数据同步协 议或设备管理协议规范的触发消息;
生成单元, 用于在收到所述触发消息后, 首先使用服务器随机数认证所述 触发消息,在认证失败后再使用缺省随机数认证所述触发消息,在认证通过后, 使用终端随机数生成会话请求发送到服务器,以使所述服务器使用终端随机数 认证终端。
通过应用以上的技术方案, 可以有效提高系统的安全性。
本发明实施例另一方面,提供了一种使用数据同步协议或设备管理协议进 行认证的方法, 所述方法包括:
终端接收服务器发送的触发消息;
所述终端在收到所述触发消息后,提取其携带的认证信息对所述服务器进 行认证;
认证通过后, 终端使用服务器及终端共用随机数生成会话请求, 并发送到 所述服务器;
以使所述服务器可以在收到所述会话请求后,使用所述共用随机数对所述 终端进行认证;
所述终端在收到所述服务器携带有使用所述共用随机数生成的认证信息 应答消息后, 使用所述共用随机数对所述服务器进行认证。
通过应用以上技术方案, 服务器和终端在会话过程中使用共用的 nonce, 替代现有技术的 s— nonce和 c— nonce完成终端和服务器之间的认证, 有效减轻 了系统的负担。
附图说明
图 1是现有技术的认证方法流程图;
图 2是现有技术在用缺省 nonce认证并更新 s— nonce和 c— nonce时的流程 图;
图 3是本发明实施例提供的进行认证的方法实施例一流程图;
图 4是加入 nonce值后的消息格式实施例结构图;
图 5是 s— nonce发生错误时本发明实施例提供的进行认证的方法实施例一 流程图;
图 6是本发明实施例提供的进行认证的方法实施例二流程图;
图 7是本发明实施例提供的进行认证的方法实施例四流程图; 图 9是本发明实施例提供的进行认证的方法实施例六的流程图; 图 10 是本发明实施例提供的进行认证的方法实施例七中携带新的 s— nonce的状态回复消息格式实施例结构图;
图 14是本发明实施例提供的进行认证的系统实施例一结构图;
图 15是本发明实施例提供的终端实施例一结构图;
图 16是本发明实施例提供的终端实施例二结构图;
图 17是本发明实施例提供的进行认证的系统实施例二结构图。 具体实施方式
本发明实施例提供了一种使用数据同步协议或设备管理协议进行认证的 方法、 系统、 服务器及终端, 有效优化了使用 DS和 DM协议的终端和服务器 之间的认证过程。
本发明中提到的会话中消息的认证均应用的是应用层安全机制。
本发明实施例提供的进行认证的方法实施例一中, 服务器为 Trigger消息 生成一个不同于 s— nonce和 c— nonce的供 Trigger消息使用的 nonce, 该 nonce 可以被称作 Trigger消息 nonce,服务器使用该 nonce生成认证信息, 并将该新 的 nonce及认证信息随 Trigger 消息发送到终端, 终端使用新的 nonce对该 Trigger消息进行认证。
本发明实施例提供的进行认证的方法实施例一流程如图 3所示:
步骤 301、 服务器发送 Trigger消息至终端, 该消息中携带有 Trigger消息 nonce。
发送前, 服务器先生成 Trigger消息 nonce, 并使用该 nonce生成 Digest, 再使用该 Digest生成 Trigger消息。
本实施例提供的使用 Trigger消息 nonce的方法可以有三种:
第一种、 服务器在生成 Trigger消息时取自身的系统时间 Ts作为 Trigger 消息 nonce,并把作为 Trigger消息 nonce的系统时间 Ts携带在 Trigger消息中 , 使终端在收到 Trigger消息后可以通过比对本地时间 Tc与系统时间 Ts的差值 来确定 nonce的有效性。 对于 nonce而言, 其有效性通常被称为该 nonce的新 鲜性( freshness ), 新鲜即为有效, 否则为无效。
终端在收到 Trigger消息时, 计算系统时间 Ts与终端本地时间 Tc的时间 差值 |Ts-Tc| , 若时间差值 |Ts-Tc|小于预设的阔值 Diff, 则该 Trigger消息 nonce 为有效值, 否则, 该 Trigger消息 nonce为无效值。
阔值 Diff 通常配置在终端, 可以是根据网络情况确定的经验值。 这是因 为移动网络本身并不稳定, 容易造成 Trigger消息的传输延迟, 如果阔值设置 太小, 则容易使得 Trigger消息的 nonce值无效; 如果阔值设置较大, 若有恶 意服务器截获了 Trigger消息, 并不断重复发送该消息到终端, 只要时间差值 |Ts-Tc|在阔值范围内的, 都会被终端认为是有效信息, 并进行相应处理, 随着 阔值的增大, 系统被攻击的机会也在增大。
第二种、 服务器在生成 Trigger消息时, 先为目标触发的消息生成会话标 识( SessionID ), 该会话标识的生成可以遵循一定的规则, 以使得可以从当前 的会话标识推导出以前已经使用的会话标识, 然后把该会话标识作为 Trigger 消息 nonce, 并使用该 nonce生成 Digest, 再使用该 Digest生成 Trigger消息。
终端收到该 Trigger消息后从中提取该 Trigger消息要触发的会话标识,并 使用该 SessionID、 服务器标识、 服务器密码及 Trigger消息的其它字段共同生 成 Digest以认证消息的合法性,并在认证通过后发起会话请求以请求该会话标 识所标识的会话。 服务器提取会话请求消息中的会话标识以识别会话。
进一步, 上述终端在提取该 Trigger消息要触发的会话标识后, 可以通过 会话标识的编码规则推断该会话标识的新鲜性,或者在终端保存使用过的会话 标识,并将该 Trigger消息的会话标识与保存的会话标识比较以确定其新鲜性。
该方法中的会话标识也可以使用 Trigger消息标识( NotificationID )代替, 该触发消息标识用于将终端回复的触发消息处理结果与该触发消息进行关联。
第三种、 服务器在生成 Trigger消息时, 对每个 Trigger消息进行编号, 取 该编号作为专用的 Trigger消息 nonce, 并使用该 nonce生成 Digest, 再使用该 Digest生成 Trigger消息。
编号的方式可以是累加的方式,也可以是递减的方式。终端在收到 Trigger 消息时, 将其携带的 nonce与上次保存的 nonce数值进行比较, 在使用累加方 式编号时, 如果新的 nonce值较大, 则认为该 nonce值是有效的, 否则认为该 nonce值是无效的; 在使用递减方式编号时, 如果新的 nonce值较小, 则认为 该 nonce值是有效的, 否则认为该 nonce值是无效的。
终端在判断新的 nonce 值有效并认证服务器身份合法后, 保存该新的 nonce值, 用于与下一需判断 Trigger消息 nonce值进行比较。
使用本方法时, 若有恶意服务器截获了 Trigger消息, 并不断重复发送该 消息到终端, 对终端进行重放攻击, 由于该 Trigger消息使用的 nonce值已被 记录, 所有恶意消息都会被判定为无效消息, 因此本发明实施例可以有效的防 止恶意服务器的攻击。
进一步, 由于移动网络的不稳定性, 可能会造成后发的消息先到达终端, 服务器先后为不同会话发出的 Trigger消息, 到达终端的顺序有可能会发生变 化, 造成终端将有效消息判定为无效消息。
例如, 服务器先后为 3个不同会话发出 3个 Trigger消息, 3个 Trigger消 息使用的 Trigger消息 nonce分别为: 30、 31、 32 , 但是由于移动网络的不稳 定性, 终端最先收到了 nonce为 32的 Trigger消息, 终端判定该消息有效, 并 记录下了该 nonce,另外两个 Trigger消息到达终端与终端的记录比较时 ,就会 由于比记录的值小被判定为无效消息。
为此, 本发明实施例提出了三种解决方式:
方式一、终端保存全部或最近收到的 Trigger消息 nonce,将判断为无效的 Trigger消息 nonce与保存的值相比较,如果没有相同的,则重新判定该值有效, 并保存该值。
在存储空间有限时, 可以设定保存空间, 在保存的 nonce数量到达上限时 将保存的最小 nonce值删除。
方式二、 在 Trigger消息 nonce编号的方式是累加的方式时, 终端保存接 收到的最大的值、及小于当前最大值且未收到过的全部或部分的值,将判断为 无效的 Trigger消息 nonce与保存的值相比较, 如果没相同的, 则重新判定该 值有效, 并保存该值; 在 Trigger消息 nonce编号的方式是递减的方式时, 终 端保留接收到的最小的值、 及大于当前最小值且未收到过的全部或部分的值, 将判断为无效的 Trigger消息 nonce与保留的值相比较, 如果没相同的, 则重 新判定该值有效, 并保存该值。
例如初始值为 "1",编号方式为累加时,终端顺序收到的 Trigger消息 nonce 的值为 "Γ,"2,,"4,,"5,,"7,,, 则终端记录下最大值 "7", 及小于 7 且未收到的值 "3""6", 若终端收到的 Trigger消息 nonce的值为 "6", 则首先将其与最大值 "7" 相比较, 结果是小于" 7", 为无效值, 则再与 "3""6"比较, 结果是存在相同的 值, 因此可以判断该 Trigger消息 nonce有效, 终端将其记录的" 6"删除。 在编 号方式为递减时, 方法与累加相似, 在此不再重复描述。
方式三、 在 Trigger消息 nonce编号的方式是累加的方式时, 保存最大的 nonce值, 所有 nonce小于该 nonce的 Trigger消息均认为是无效的消息; 在 Trigger消息 nonce编号的方式是递减的方式时, 保存最小的 nonce值, 所有 nonce大于该 nonce的 Trigger消息均认为是无效的消息;服务器在一定时间内 没有接到终端的响应消息, 则按照编号规则生成新的 nonce, 重新发送 Trigger 消息携带此新的 nonce。
以上为本发明实施例提供的使用 Trigger消息 nonce的方法的描述。
若使用系统时间或 Trigger 消息编号作为 Trigger 消息的 nonce 时 , 该 Trigger消息 nonce值可以携带在 Trigger消息的消息头或消息体中。 以消息头 中携带为例, 加 nonce 值后的消息格式实施例如图 4 所示, 包括: 摘要 ( Digest )、 触发消息头 ( trigger-hdr )、 触发消息体 ( trigger-body )„
其中, trigger-hdr包括: 版本(version ), 用户交互模式( ui-mode )、 会话 发起方( initiator )、随机数( nonce )、保留字段( future-use )、会话标识( sessionid )、 服务器标识符长度(length-identifier ), 服务器标识符 (server-identifier )等字 段。
同时, 本发明实施例还提供了两种使用 Trigger消息 nonce生成 Digest的 方法:
方法一、 设定: H=MD5 哈希函数(hashing function ), b64 = Base64编码 函数, 则 Digest使用公式可以表述为:
Digest: H(B64(H(server-identifier:password)):nonce:B64(H(trigger))) 其中, server-identifier字段 为服务器标识, password字段为服务器的密 码, nonce字段为 Trigger消息随机数 (即: 前述系统时间 Ts或者会话标识或 者 Trigger消息编号 ), trigger字段为 Trigger消息的 trigger-hdr与 trigger-body。
终端收到 Trigger消息并判断该 Trigger消息携带的 Trigger消息 nonce有 效后,在终端管理树上查找该服务器对应的密码,使用查找的密码、及 Trigger 消息中的 server-identifier、 nonce、 trigger生成 Digest, 比较终端生成的 Digest 与消息中携带的 Digest是否相同, 相同则认证通过, 否则认证失败。
方法二、 设定: H=MD5 哈希函数(hashing function ), b64 = Base64编码 函数。
由于 Trigger消息 nonce是携带在消息头或消息体中的, nonce就成为了 Trigger消息的 trigger-hdr与 trigger-body字段的一部分, 因此计算 Digest可以 只使用 Trigger消息的 trigger-hdr与 trigger-body字段,则 Digest使用公式可以 表述为:
Digest = H(B64(H(server-identifier:password)):B64(H(trigger)))
其中, server-identifier 字段为服务器标识, password字段为服务器的密码, trigger字段为 Trigger消息的 trigger-hdr与 trigger-body。
终端收到 Trigger消息并判断该 Trigger消息携带的 Trigger消息 nonce有 效后,在终端管理树上查找该服务器对应的密码,使用查找的密码、及 Trigger 消息中的 server-identifier、 trigger生成 Digest , 比较终端生成的 Digest与消息 中携带的 Digest是否相同, 相同则认证通过, 否则认证失败。
步骤 302、 终端判断该信息有效, 且对该信息认证通过后, 发送会话请求 消息至服务器。
终端收到 Trigger消息后, 首先判断该 Trigger消息携带的 Trigger消息 nonce是否有效, 判断方法见上文描述, 若有效则在终端管理树上查找该服务 器对应的密码, 使用查找的密码、 及 Trigger消息中的 server-identifier、 trigger 生成 Digest, 对该 Trigger消息进行认证, 详细认证方法可参考步骤 301 中的 描述, 根据不同的生成 Digest的方法, 终端生成 Digest认证的方法也会不同。
若认证通过, 则发送会话请求消息至服务器, 发起会话。
该会话请求消息中携带有: SessionID、 包含使用 c— nonce 生成的 Digest 的 Authenticate„
从本步骤开始终端与服务器正式建立会话连接。
步骤 303、 服务器返回包含认证结果和认证请求的应答消息。 包含认证结果和认证请求的应答消息。
该应答消息携带有: 服务器对终端的身份认证结果、 SessionID、 包含使用 s— nonce生成的 Digest的 Authenticate„
步骤 304、 终端返回包含认证结果的消息至服务器。
终端根据服务器发送来的 Authenticate对服务器进行认证, 然后向服务器 返回包含认证结果的消息。
该消息携带有: 终端对服务器的身份认证结果、 及其他相关消息。
进一步, 在使用累加的方式进行 Trigger消息 nonce编号时, 随着 Trigger 消息的增多 , nonce的值会越来越大;在使用递减的方式进行 Trigger消息 nonce 编号时, nonce的值会递减到 "0"; 在这些时候, 可能需要对 nonce进行调整, 例如调整计数起点, 因此本发明实施例提供了在需要时对 nonce的值进行调整 的几种方法:
方法一、服务器每隔一段时间都会更新其在终端的账号密码, 可以在服务 器更新其在终端的账号密码时, 服务器和终端双方自动重置 nonce计数值。
方法二、 在需要对 nonce的值进行调整时, 例如预定的时间到了、 计数达 到预定的值, 服务器下发命令直接重置 nonce值, 该命令可以是警告( Alert ) 命令, 例如:
<Alert>
<CmdID>K/CmdID>
<Data>1227</Data> <!- nonce计数重置 ― >
</Alert>
服务器在对 nonce的值进行调整后,下发命令,更改其在终端的账号密码, 以防止恶意服务器截获消息后进行攻击。
方法三、 由于服务器可以直接对终端的终端管理树进行操作, 因此服务器 可以在终端管理树上的其账号信息中增加一节点,用以保存终端收到并保留的 nonce值, 该节点可以为:
<X>/AppAuth/<X>/SNAAuthCount
然后在需要对 nonce的值进行调整时, 例如预定的时间到了、 计数达到预 定的值, 对该节点下发重置 (Replace )命令进行重置。 命令实例如下:
<Replace>
<CmdID>4</CmdID>
<Item>
<Target>
</Target>
<Data>K/Data>
</Item> </Replace>
服务器在对 nonce的值进行调整后,下发命令,更改其在终端的账号密码, 以防止恶意服务器截获消息后进行攻击。
方法四、 在需要对 nonce的值进行调整时, 例如预定的时间到了、 计数达 到预定的值, 终端向服务器发送重置请求, 在接收到服务器的确认后双方对 nonce进行调整。 在调整完成后服务器更新终端其在终端的账号密码, 以防止 恶意服务器截获消息后进行攻击。 s— nonce和 c— nonce的供 Trigger消息使用的 nonce, 每次发起新的会话, 月良务 器都会生成 Trigger消息专用的 nonce, 用于触发会话, 终端使用该 nonce对 Trigger消息进行认证, 即使服务器保存的 s— nonce是错误的, 终端仍然可以发 起会话, 此时若 s— nonce 或 c— nonce发生了错误, 都可以通过交互方式更新 s nonce或 c nonce , 以冗成认证。
以 s— nonce发生错误为例, 本发明实施例提供的进行认证的方法实施例一 流程如图 5所示:
步骤 501、 服务器发送 Trigger消息至终端, 该消息中携带有 Trigger消息 nonce。
发送前, 服务器先生成 Trigger消息 nonce, 并使用该 nonce生成 Digest, 再使用该 Digest生成 Trigger消息。
步骤 502、 终端判断该 Trigger消息携带的 Trigger消息 nonce有效, 且对 该信息认证通过后, 发送会话请求消息至服务器。
终端收到 Trigger消息后, 首先判断该 Trigger消息携带的 Trigger消息 nonce是否有效, 判断方法见上文描述, 若有效则在终端管理树上查找该服务 器对应的密码, 使用查找的密码、 及 Trigger 消息的 server-identifier、 trigger 生成 Digest, 对该 Trigger消息进行认证, 详细认证方法可参考步骤 301 中的 描述, 根据不同的生成 Digest的方法, 终端生成 Digest认证的方法也会不同。
若认证通过, 则发送会话请求消息至服务器, 发起会话。
该会话请求消息中携带有: SessionID、 包含使用 c— nonce 生成的 Digest 的 Authenticate„ 从本步骤开始终端与服务器正式建立会话连接。
步骤 503、 服务器返回包含认证结果和认证请求的应答消息。 包含认证结果和认证请求的应答消息。
该应答消息携带有: 服务器对终端的身份认证结果、 SessionID、 包含使用 s— nonce生成的 Digest的 Authenticate„
步骤 504、 终端使用自身保存的 s— nonce对服务器进行认证, 认证失败。 步骤 505、 终端发送质询及 s— nonce更新消息至服务器。
步骤 506、服务器使用新的 s— nonce生成认证信息并重发认证请求至终端。 服务器收到更新消息后, 根据终端的指示更新自身保存的 s— nonce, 并使 用更新后的 s— nonce生成新的认证请求, 并将更新结果及新的认证请求发送到 服务器。
步骤 507、 终端返回包含认证结果的消息至服务器。
终端根据服务器发送来的使用更新后的 s— nonce生成新的认证请求对服务 器进行认证, 然后向服务器返回包含认证结果的消息。
该消息携带有: 终端对服务器的身份认证结果、 及其他相关消息。
在本发明实施例提供的进行认证的方法实施例一中, 每次发起新的会话, 服务器都会生成 Trigger消息专用的 nonce,用于触发会话,在本发明实施例提 供的进行认证的方法实施例二中, 则可以只在服务器认为 s— nonce错误时, 生 成 Trigger消息专用的 nonce , 用于触发会话。
本发明实施例提供的进行认证的方法实施例二流程如图 6所示:
步骤 601、 服务器发送 Trigger消息至终端, 该消息中携带有 s— nonce。 步骤 602、 服务器发现认证失败。
在一定时间内服务器没有收到终端返回的消息, 可以认为是认证失败了。 步骤 603、 服务器发送新的 Trigger消息至终端, 该消息中携带有 Trigger 消息 nonce。
发送前, 服务器先生成 Trigger消息 nonce, 并使用该 nonce生成 Digest, 再使用该 Digest生成 Trigger消息。
步骤 604、 终端判断 Trigger消息携带的 Trigger消息 nonce有效, 且对该 Trigger消息认证通过后, 发送会话请求消息至服务器。
终端收到 Trigger消息后, 可以通过判断 Trigger消息是否使用了 Trigger 消息 nonce, 来决定使用 s— nonce还是使用 Trigger消息 nonce进行认证。
判断的方法, 可以是通过判断 Trigger 消息中是否有 nonce 字段来判断 Trigger消息是否使用了 Trigger消息 nonce , 即含有 nonce字段时说明 Trigger 消息使用了 Trigger消息 nonce;或者可以通过判断 Trigger消息的 version字段 信息来判断 Trigger消息是否使用了 Trigger 消息 nonce, 这是因为从消息的 version可以获知该消息是否使用了 Trigger消息 nonce。
终端收到 Trigger消息后, 首先判断该 Trigger消息携带的 Trigger消息 nonce是否有效, 判断方法见上文描述, 若有效则在终端管理树上查找该服务 器对应的密码, 使用查找的密码、 及 Trigger消息中的 server-identifier、 trigger 生成 Digest, 对该 Trigger消息进行认证, 详细认证方法可参考步骤 301 中的 描述, 根据不同的生成 Digest的方法, 终端生成 Digest认证的方法也会不同。
若认证通过, 则发送会话请求消息至服务器, 发起会话。
该会话请求消息中携带有: SessionID、 包含使用 c— nonce 生成的 Digest 的 Authenticate„
从本步骤开始终端与服务器正式建立会话连接。
步骤 605、 服务器返回包含认证结果和认证请求的应答消息。
本步骤与步骤 503基本类似, 在此不再详细描述。
步骤 606、 终端使用自身保存的 s— nonce对服务器进行认证, 认证失败。 步骤 607、 终端发送包含质询及新的 s— nonce的消息至服务器。
步骤 608、 服务器返回更新结果及新的认证请求至终端。
本步骤与步骤 506基本类似, 在此不再详细描述。
步骤 609、 终端返回包含认证结果的消息至服务器。
本步骤与步骤 507基本类似, 在此不再详细描述。
在本发明实施例提供的进行认证的方法实施例二中, 在服务器认为 s— nonce错误时, 生成 Trigger消息专用的 nonce, 用于触发会话, 终端依然按 照本发明实施例提供的进行认证的方法实施例一的方式对该 Trigger消息进行 处理。在本发明实施例提供的进行认证的方法实施例三中, 终端可以通过判断 该 Trigger 消息是否使用了 Trigger 消息专用的 nonce , 确定是否需要更新 s— nonce, 在该 Trigger 消息使用了 Trigger 消息专用的 nonce 时, 直接进行 s— nonce更新, 使服务器可以直接使用更新后的 s— nonce进行会话中的认证。 在认证失败时, 将不再需要使用缺省 nonce完成认证, 提高了系统的安全性。
同时, 本发明实施例提供的进行认证的方法实施例三,在现有技术的基础 上, 更新过 s— nonce和 c— nonce后, 相应的更新服务器密码和终端密码, 更新 服务器密码可以使得使用缺省 nonce生成的服务器的 Digest不同,可以防止对 终端的消息重放攻击, 更新终端密码可以使得使用缺省 nonce 生成的终端的 Digest不同, 可以防止对服务器的消息重放攻击, 可以提高系统的安全性。
进一步, 本发明实施例提供的进行认证的方法实施例四, 在现有技术的基 础上, 强化步骤之间的关联, 以前一步骤作为后一步骤的认证基础, 以提高系 统的安全性, 其流程如图 7所示:
步骤 701、 终端接收到用于触发会话的 Trigger消息, 并对其进行认证。 步骤 702、 终端对该 Trigger消息认证失败, 使用缺省 nonce值重新认证。 步骤 703、 终端向服务器发送使用缺省 nonce生成的会话请求消息 若用缺省 nonce认证通过, 则终端向 Trigger消息指示的服务器发送会话 请求消息,在会话使用应用层安全时在该消息中携带使用缺省 nonce生成的认 证信息,进入步骤 704。若用缺省 nonce认证失败,则终端忽略该 Trigger消息, 无会话发起, 流程结束。
步骤 704、 服务器认证终端发送的会话请求消息。
服务器通过两种方式进行认证, 分述如下:
方法一、服务器首先使用 c— nonce生成认证信息进行认证,如果认证通过, 则按现有技术方法正常处理。 如果认证失败, 则使用缺省 nonce生成认证信息 重新认证,若认证通过则使用缺省 nonce生成服务器认证请求,进入步骤 705。
方法二、服务器在确定会话使用了应用层安全机制,且该服务器发送过使 用缺省 nonce生成的 Trigger消息给终端,且该 Trigger消息为触发该会话请求 消息的 Trigger消息时, 使用缺省 nonce对该会话请求消息进行认证, 认证通 过后进入步骤 705。 判断某会话请求消息是否是被某 Trigger消息触发的方法为: 每个会话请 求消息会有一个唯一的会话标识,比较该会话请求消息所携带的会话标识和该 Trigger消息所携带的会话标识是否相同, 若相同则表示该会话是由该 Trigger 消息触发。
判断服务器是否发送过使用缺省 nonce生成的 Trigger消息给终端, 且该 Trigger消息为触发该会话请求消息的 Trigger消息,可以发生在使用缺省 nonce 对该会话请求消息进行认证之后,在认证通过后进行判断, 判断通过进入步骤 705。
本步骤的意义在于,若服务器未发送过使用缺省 nonce生成的用以触发该 会话的 Trigger消息给终端, 却收到了终端发送的使用缺省 nonce生成的会话 请求消息, 则说明该消息不是一个正常安全的消息,有很大几率是恶意第三方 发送的欺骗性消息, 可以丟弃处理, 因此, 釆用本步骤后, 可以提高系统的安 全性。
步骤 705、 服务器向终端返回应答消息。
服务器向终端返回包含认证结果、认证请求和 c— nonce更新命令的应答消 息。
步骤 706、 终端认证服务器发送的应答消息。
在会话使用了应用层安全机制时, 终端使用缺省 nonce认证服务器, 具体 认证方法为: 终端首先使用 s— nonce生成认证信息进行认证, 如果认证通过, 则按现有技术方法正常处理。 如果认证失败, 则使用缺省 nonce生成认证信息 重新认证, 认证通过并更新 c— nonce后进入步骤 707。
进一步, 本步骤也可以在会话使用应用层安全机制,且终端发送过使用缺 省 nonce生成的会话请求消息给服务器时, 终端使用缺省 nonce认证该消息, 认证通过并更新 c— nonce后进入步骤 707。
该步骤中判断终端是否发送过使用缺省 nonce 生成的会话请求消息给服 务器, 可以发生在使用缺省 nonce对该消息进行认证之后, 在认证通过后进行 判断, 判断通过进入步骤 707。
步骤 707、 终端向服务器返回应答消息。
终端向服务器返回包含认证结果、 c— nonce更新结果及 s— nonce更新命令 的应答消息。
步骤 708、 服务器返回 s— nonce更新结果至终端。
在完成上述步骤后, 为了防止重放攻击, 可以选择更新服务器密码, 或者 同时更新服务器密码及终端密码。
进一步, 上述步骤中可以把会话标识作为 nonce或者把 Trigger消息标识 作为 nonce代替缺省 nonce, 可以避免使用一个不变的公知的 nonce, 进而达 到更好的安全性。 高系统的安全性。
现有技术中, 在 s— nonce错误需要更新时, 需要进行 4次交互命令才能完 成更新, 如图 2的步骤 203到步骤 204 , 由于在更新完成前, 都需要使用缺省 nonce, 安全风险较大, 消息在移动网络中的交互次数过多, 也加大了网络负 担。 请求消息中携带新的 s— nonce的技术方案,这样服务器就可以直接进行 s— nonce 更新, 并使用新的 s— nonce进行认证, 既减少了信令交互的次数, 也减少了使 用缺省 nonce的次数, 增加了系统的安全性, 也减轻了网络负担。
本发明实施例提供的进行认证的方法实施例五流程如图 8所示:
步骤 801、 终端获知需要更新 s— nonce。
终端判断出 s— nonce已经过期, 或者发现服务器保存的 s— nonce与终端保 存的不一致时, 可以获知需要更新 s— nonce。
终端发现服务器保存的 s— nonce与终端保存的不一致的方法可以为: 终端收到 Trigger消息后,使用保存的 s— nonce对该 Trigger消息进行认证, 当由于某种原因认证失败时, 终端使用缺省 nonce值或者会话标识作为 nonce 或者使用 Trigger消息 ID作为 nonce生成 Digest对该 Trigger消息重新认证。
若认证通过, 则说明服务器之前使用的 s— nonce 错误, 服务器保存的 s— nonce与终端保存的不一致。
步骤 802、 终端发送包含更新信息的会话请求消息至服务器。
终端在获知需要更新 s nonce时,生成新的 s nonce,并将该 s nonce携带 在会话请求消息中发送至服务器请求发起会话, 并使服务器更新 s— nonce。 该会话请求消息中携带有: SessionID、新生成的 s— nonce、包含使用 c— nonce 值生成的 Digest的 Authenticate。 此会话请求消息中, 也可以使用缺省 nonce 值或者会话标识作为 nonce或者使用 Trigger消息 ID作为 nonce生成的 Digest。
新生成的 s— nonce可以携带在会话请求消息( SyncML )的消息头( SyncHdr ) 或消息体 ( SyncBody )„
以下以携带在消息头中为例说明携带方法。
为了携带 s— nonce, 对消息头的定义进行如下修改:
SyncHdr (VerDTD, VerProto, SessionID, MsgID, Target, Source, RespURI?, NoResp?, Cred? , Chal?, Meta?)>
则携带 s— nonce的 SyncML消息为:
<SyncML xmlns='SYNCML:SYNCMLl .2'>
<SyncHdr>
<Chal>
<Meta>
<NextNonce xmlns= ' syncml: metinf ' >LG3 iZQhhdmKNHg==</NextNonce>
</Meta>
</Chal>
</SyncHdr>
<SyncBody>
</SyncBody>
</SyncML>
步骤 803、服务器返回包含认证结果、 更新结果、及认证请求的应答消息。 服务器收到该会话请求消息后, 使用 c— nonce值对终端进行认证, 并使用 该会话请求消息携带的更新后的 s— nonce更新其保存的 s— nonce; 认证通过, 更新成功后, 再使用更新过的 s— nonce生成认证请求, 并向终端返回包含认证 结果、 更新命令及认证请求的应答消息。 优选的, 服务器首先使用 c— nonce认 证会话请求消息, 在认证通过后进行 s— nonce 更新, 以保持服务器保存的 s nonce和终端保持的 s nonce同步。
该应答消息携带有: 服务器对终端的身份认证结果、 s— nonce更新结果、 及包含使用更新后 s nonce值生成的 Digest的 Authenticate
步骤 804、 终端返回包含认证结果的消息至服务器。
终端使用更新后 s— nonce值对服务器进行认证, 认证通过后, 向服务器返 回认证结果。 明实施例提供的进行认证的方法实施例二中, 以减少信令交互的次数。
本发明实施例提供的进行认证的方法实施例六的流程图如图 9所示: 步骤 901、 服务器发送 Trigger消息至终端, 该消息中携带有 s— nonce。 步骤 902、 服务器发现认证失败。
例如,在一定时间内服务器没有收到终端的会话请求, 则可以认为是认证 失败了。
步骤 903、 服务器发送 Trigger消息至终端, 该消息中携带有 Trigger消息 nonce。
发送前, 服务器先生成 Trigger消息 nonce, 并使用该 nonce生成 Digest, 再使用该 Digest生成 Trigger消息。
步骤 904、 终端发现需要更新 s— nonce。
终端收到该 Trigger消息后, 判断该 Trigger消息是否使用了 Trigger消息 专用的 nonce,确定是否需要更新 s— nonce,发现在该 Trigger消息使用了 Trigger 消息专用的 nonce , 需要进行 s nonce更新。
判断该 Trigger消息是否使用了 Trigger消息专用的 nonce的方法,可以是 通过判断 Trigger 消息中是否有 nonce 字段来判断 Trigger 消息是否使用了 Trigger消息 nonce, 即含有 nonce字段时说明 Trigger消息使用了 Trigger消息 nonce; 或者可以通过判断 Trigger消息的 version字段信息来判断 Trigger消息 是否使用了 Trigger消息 nonce, 这是因为 version字段信息中包含有 Trigger 消息是否使用了 Trigger消息 nonce的消息。
若发现在该 Trigger消息使用的不是 Trigger消息 nonce时, 则说明不需要 进行 s— nonce更新, 直接进入普通处理流程即可。
步骤 905、 终端发送包含更新信息的会话请求消息至服务器。
终端收到 Trigger消息, 且确定其使用了 Trigger消息专用的 Trigger消息 nonce后, 首先判断该 Trigger消息携带的 Trigger消息 nonce是否有效, 判断 方法见上文描述, 若有效则在终端管理树上查找该服务器对应的密码,使用查 找的密码、 server-identifier、 trigger生成 Digest, 对该 Trigger消息进行认证, 详细认证方法可参考步骤 301中的描述,根据不同的生成 Digest的方法,终端 生成 Digest认证的方法也会不同。
终端对该 Trigger信息认证通过后, 生成新的 s— nonce, 并将该 s— nonce携 带在会话请求消息中,作为包含更新信息的会话请求消息发送至服务器,发起 会话, 并使服务器更新 s— nonce。
该会话请求消息中携带有: SessionID、更新后的 s— nonce、包含使用 c— nonce 值生成的 Digest的 Authenticate。
其中, 新生成的 s— nonce可以携带在会话请求消息的消息头 (SyncHdr ) 或消息体 ( SyncBody )„
步骤 906、服务器返回包含认证结果、 更新结果、及认证请求的应答消息。 服务器收到该会话请求消息后, 使用 c— nonce值对终端进行认证, 并使用 该会话请求消息携带的更新后的 s— nonce更新其保存的 s— nonce; 认证通过, 更新成功后, 使用更新过的 s— nonce生成认证请求, 并向终端返回包含认证结 果、 更新结果、 及认证请求的应答消息。
该应答消息携带有: 服务器对终端的身份认证结果、 s— nonce更新结果、 及包含使用更新后 s— nonce值生成的 Digest的 Authenticate
步骤 907、 终端返回包含认证结果的消息至服务器。
终端使用更新后 s— nonce值对服务器进行认证, 认证通过后, 向服务器返 回认证结果。
该消息携带有: 对服务器的身份认证结果、 及其他相关消息。
在现有技术中有些时候,终端在认证服务器通过后,可能决定不发起会话, 此时若已经发现 s— nonce过期或错误, 需要更新, 将无法更新 s— nonce, 无法 有效维护 s— nonce。 决方案。 过后, 并决定不发起会话时, 会向服务器发送一个状态回复消息, 当终端判断 出 s— nonce 已经过期, 或服务器保存的与终端保存的不一致时, 生成新的 s— nonce , 在该状态回复消息中携带新的 s— nonce、 使用 c— nonce、 终端用户名、 密码、 回复消息体等计算出的 Digest, 使服务器收到该状态回复消息后, 可以 根据使用 c— nonce、 终端用户名、 密码、 回复消息体等计算出的 Digest对该信 息进行认证, 在认证通过后根据该状态回复消息中携带新的 s— nonce更新其自 身保存的 s— nonce。
该携带新的 s— nonce的状态回复消息格式实施例如图 10所示, 包括: 摘 要 ( Digest )、 通知消息头 ( notification-hdr )、 通知消息体 ( notification -body )。
其中, notification-hdr包括: 版本 ( version )、 状态码 ( status-code )、 对应 的通知消息标识( Notification-ID )、新随机数 ( Next-nonce )、保留( future-use )、 会话标识 ( sessionid )、认证标识长度( length-authname )、认证标识 ( authname )。
其中的 NextNonce即携带的新 s— nonce。
在现有技术中, s— nonce出现问题后, s— nonce和 c— nonce都不再使用, 终 端和服务器都使用缺省 nonce生成认证信息,这样就造成恶意服务器截获任何 一个消息都有可能攻击服务器或终端。
而 s— nonce和 c— nonce是两个不同的值, 分别由服务器和终端生成, 供对 方使用, 所以一个出现问题并不影响另外一个, 本发明实施例提供的进行认证 的方法实施例八、 及九中, 在 s— nonce 出现问题时, 提供了单独更新 s— nonce 的解决方案。
s— nonce出现问题的状况包括: 终端判断出 s— nonce 已经过期, 或者发现 服务器保存的 s— nonce出了问题, 例如终端判断出服务器保存的 s— nonce与终 端的 s— nonce不一致、 不同步。
其中, 判断服务器保存的 s— nonce与终端的 s— nonce不一致、 不同步的方 法包括: 服务器使用 s— nonce发出触发消息后, 一定时间内没有收到终端回复 的信息; 或者是终端发现服务器发送的 Trigger 消息中使用缺省 nonce 生成 Digest; 或者是终端发现服务器发送的 Trigger消息中没有使用 nonce等。
终端在发现 s— nonce出现问题, 并对服务器身份认证通过后, 发起会话请 求, 会话请求消息中认证终端身份的认证信息用 c— nonce 生成或者使用基础 ( basic )认证方式, 即用户名力 p密码的认证方式,进一步进行 s— nonce的更新。
本实施例提供了两种更新 s— nonce的方法: 进行认证的方法实施例七、 与 进行认证的方法实施例八。 nonce值生成 Trigger消息为例进行描述, 其流程如图 11所示:
步骤 1101、 服务器发送用于触发会话的 Trigger消息至终端。
服务器判断其之前使用的 s— nonce错误后,使用缺省 nonce值生成 Trigger 消息发送到终端, 该 Trigger消息中携带有: 使用缺省 nonce值生成的 Digest,
Triggerlnfo、 及其他相关消息。
步骤 1102、 终端对该 Trigger消息认证失败, 使用缺省值重新认证。
终端收到 Trigger消息后,使用保存的 s— nonce生成 Digest对该 Trigger消 息进行认证, 当由于某种原因认证失败时, 终端使用缺省 nonce值生成 Digest 对该 Trigger消息重新进行认证。
若认证通过, 则说明服务器之前使用的 s— nonce 错误, 服务器保存的 s— nonce与终端保存的不一致。
步骤 1103、 终端发送包含更新信息的会话请求消息至服务器。
终端使用缺省 nonce值认证通过后, 生成新的 s— nonce, 并将该 s— nonce 携带在会话请求消息中,作为包含更新信息的会话请求消息发送至服务器,发 起会话, 并使服务器更新 s— nonce。
该会话请求消息中携带有: SessionID、更新后的 s— nonce、包含使用 c— nonce 值生成的 Digest的 Authenticate。
进一步, 上述步骤中可以把会话标识作为 nonce或者把 Trigger消息标识 作为 nonce代替缺省 nonce, 可以避免使用一个不变的公知的 nonce, 进而达 到更好的安全性。
在会话请求消息中携带更新后的 s— nonce 的方法与实施例三及四基本相 同, 此处不再赘述。 步骤 1104、 服务器返回包含认证结果、 更新结果及认证请求的应答消息。 服务器收到该会话请求消息后, 使用 c— nonce值对终端进行认证, 并使用 该会话请求消息携带的更新后的 s— nonce更新其保存的 s— nonce; 认证通过, 更新成功后, 再使用更新过的 s— nonce生成认证请求, 向终端返回包含认证结 果、 更新结果及认证请求的应答消息。
该应答消息携带有: 服务器对终端的身份认证结果、 s— nonce更新结果、 及包含使用更新后 s— nonce值生成的 Digest的 Authenticate
步骤 1105、 终端返回包含认证结果的消息至服务器。
终端使用更新后 s— nonce值对服务器进行认证, 认证通过后, 向服务器返 回认证结果。 nonce值生成 Trigger消息,但不在会话请求中携带更新信息为例进行描述,其 流程如图 12所示:
步骤 1201、 服务器发送用于触发会话的 Trigger消息至终端。
服务器判断其之前使用的 s— nonce错误后,使用缺省 nonce值生成 Trigger 消息发送到终端, 该 Trigger消息中携带有: 使用缺省 nonce值生成的 Digest,
Triggerlnfo、 及其他相关消息。
步骤 1202、 终端对该 Trigger消息认证失败, 使用缺省 nonce重新认证。 终端收到 Trigger消息后,使用保存的 s— nonce生成 Digest对该 Trigger消 息进行认证, 当由于某种原因认证失败时, 终端使用缺省 nonce值生成 Digest 对该 Trigger消息重新进行认证。
若认证通过, 则说明服务器其之前使用的 s— nonce错误, 服务器保存的 s— nonce与终端保存的不一致。
步骤 1203、 终端对该信息认证通过后, 发送会话请求消息至服务器。 若认证通过, 则发送会话请求消息至服务器, 发起会话。
该会话请求消息中携带有: SessionID、 包含使用 c— nonce 生成的 Digest 的 Authenticate„
从本步骤开始终端与服务器正式建立会话连接。
步骤 1204、 服务器返回包含认证结果和认证请求的应答消息。 缺省 nonce生成 Authenticate , 然后向终端返回包含认证结果和认证请求的应 答消息。
该应答消息携带有: 服务器对终端的身份认证结果、 SessionID、 包含使用 缺省 nonce生成的 Digest的 Authenticate„
步骤 1205、 终端返回更新命令、 及认证结果到服务器。
终端使用缺省 nonce对服务器进行认证, 认证通过后, 生成新的 s— nonce, 并发送 s— nonce更新命令、 及对服务器的认证结果到服务器
步骤 1206、 服务器返回更新结果至终端。
服务器收到更新消息后, 根据终端的指示更新自身保存的 s— nonce, 并将 更新结果返回给终端。
进一步, 上述步骤中可以把会话标识作为 nonce或者把 Trigger消息标识 作为 nonce代替缺省 nonce, 可以避免使用一个不变的公知的 nonce, 进而达 到更好的安全性。
此时为了提供系统的可靠性, 可对服务器密码进行更新。
本发明提供的进行认证的方法的又一实施例中, 以服务器使用缺省 nonce 值生成 Trigger消息, 但不在会话中携带缺省 nonce为例进行描述, 具体方法 说明 ^下:
服务器在判断其之前使用的 s— nonce错误后, 使用缺省 nonce值或把会话 标识作为 nonce或者 4巴 Trigger消息标识作为 nonce生成 Trigger消息发送到终 端, 该 Trigger消息中携带有: 使用缺省 nonce值或把会话标识作为 nonce或 者把 Trigger消息标识作为 nonce生成的 Digest、 Triggerlnfo,及其他相关消息。
终端收到 Trigger消息后,使用保存的 s— nonce生成 Digest对该 Trigger消 息进行认证, 当由于某种原因认证失败时, 终端使用缺省 nonce值或把会话标 识作为 nonce或者 4巴 Trigger消息标识作为 nonce生成 Digest对该 Trigger消息 重新认证, 若认证通过, 则发送会话请求消息至服务器, 发起会话, 该会话请 求消息中携带有: SessionID、 包含使用 c— nonce生成的 Digest的 Authenticate。
服务器使用 c— nonce 认证该会话请求消息, 认证失败后发起挑战 ( challenge ) 以更新 c— nonce 并要求重新认证, 认证通过后服务器发送使用 s— nonce生成的认证请求, 终端同样使用 s— nonce进行认证, 认证失败后发起 才兆战 ( challenge ) 以更新 s— nonce并要求重新认证, 认证通过后返回结果。
进一步, 上述步骤中终端可以在会话请求消息中携带更新的 s— nonce给服 务器, 服务器发送的认证请求使用该新的 s— nonce。
由以上描述可以看出, 在 s— nonce 出现问题时只更新 s— nonce , 不更新 c— nonce, 即使系统在处理 s— nonce错误时使用缺省 nonce或把会话标识作为 nonce 或者 4巴 Trigger 消息标识作为 nonce 进行认证, 但由于不需要更新 c— nonce,终端可以使用 c— nonce生成会话请求,减少了使用缺省 nonce或 4巴会 话标识作为 nonce或者把 Trigger消息标识作为 nonce的次数, 系统的安全性 得到了提高。
另夕卜, 由于一个会话当中使用的 s— nonce和 c— nonce , 分别由终端、 服务 器生成并更新, 因此造成终端、 服务器的管理负担较重。 同的 nonce, 替代现有技术的 s— nonce和 c— nonce完成终端和服务器之间的认 证, 这是由于在同一会话中, 有传输层安全或应用层安全认证保证, 所以可以 使用相同的 nonce完成终端和服务器之间的认证。
该 nonce可以由服务器生成, 也可以由终端生成, 下面将以由服务器生成
的两种方法, 分述如下:
方法一、 由服务器进行 nonce值的更新。
首先由服务器下发更新随机数命令 ( NextNonce ),在 NextNonce命令中携 带新 none
终端接收到该 NextNonce 命令后, 使用该 NextNonce 命令中携带的新 nonce更新自身保存的 nonce值。
该更新命令可以携带在认证消息中,即在该消息中携带了更新命令和服务 器的认证信息;或其它管理消息中,即在该消息中没有携带服务器的认证信息。 若该更新命令携带在认证消息中,则终端收到该消息后,根据 NextNonce命令 先更新 nonce, 再使用更新后的 nonce生成 Digest对该信息进行认证, 认证必 然会通过, 此时若有其它恶意服务器截获了该消息, 就可以在任何时间对终端 进行重放攻击。为了防止这种情况的出现,在认证消息中携带 NextNonce命令 时, 使用未更新前的 nonce生成的 Digest, 终端在收到消息后, 先使用更新前 的 nonce生成的 Digest进行认证,在认证通过后,再才艮据 NextNonce命令对自 身保存的 nonce值进行更新; 若在其它管理消息中携带 nonce更新命令, 则由 于新 nonce和认证信息分开在两个不同的消息中发送给对方,所以不存在重放 攻击风险。
以使用应答消息携带 NextNonce命令为例, 流程如图 13所示:
步骤 1301、 服务器发送用于触发会话的 Trigger消息至终端。
该触发消息中携带有: 使用共用 nonce生成的 Digest, TriggerInfo。
共用 nonce为服务器生成, 供服务器与终端使用。
在实际使用时, 本步骤中的共用 nonce也可以是触发消息 nonce、 或缺省 nonce, 在有些时候服务器也可以不使用 nonce, 直接使用服务器 ID和密码生 成用于触发会话的 Trigger 消息, 而终端也直接使用服务器 ID 和密码生成 Digest该 Trigger消息进行认证。
步骤 1302、 终端发送会话请求消息至服务器。
终端收到 Trigger消息后,使用保存的 s— nonce生成 Digest对该 Trigger消 息进行认证, 认证通过, 则发送会话请求消息至服务器, 发起会话。
该会话请求消息中携带有: SessionID、 包含使用共用 nonce生成的 Digest 的 Authenticate„
从本步骤开始终端与服务器正式建立会话连接。
步骤 1303、 服务器返回包含认证结果和认证请求的应答消息, 并在该应 答消息中携带 NextNonce命令。
服务器根据终端发送来的 Authenticate对终端进行认证, 认证通过, 并发 现共用 nonce需要更新时, 生成新的共用 nonce, 然后向终端返回包含认证结 果和认证请求的应答消息, 并在该应答消息中携带 NextNonce命令。
该应答消息携带有: 服务器对终端的身份认证结果、 SessionID、 包含使用 更新前 nonce生成的 Digest的 Authenticate、 包含新的 nonce的 NextNonce命 令。 步骤 1304、 终端收到该应答消息后, 使用更新前的 nonce对该消息进行 认证。
步骤 1305、认证通过, 终端根据 NextNonce命令的指示,使用 NextNonce 命令携带的新的 nonce更新自身保存的共用 nonce。
步骤 1306、 终端返回包含认证结果、 更新结果的消息至服务器。
该消息携带有: 终端对服务器的身份认证结果、 共用 nonce的更新结果、 及其他相关消息。
由于服务器和终端对共用 nonce有效时间的定义可能不同,服务器判断共 用 nonce有效时, 可能对于终端而言已经到达有效时限了, 因此为了保持共用 供了终端请求服务器更新共用 nonce的技术方案。
终端可以使用 DM命令中的提醒 (Alert )命令向服务器请求更新共用 nonce, 为了使得服务器可以理解该命令, 为其增加一个 Alert类型以表示请求 服务器更新 nonce。
终端在认为共用 nonce需要更新的时候, 通过该 Alert命令向服务器发送 共同 nonce更新请求, 该消息可以携带在认证消息中或其它管理消息中, 服务 器收到该消息后, 根据具体情况决定是否更新。
Alert类型可以定义为: org. openmobilealliance. extNonce。
该 Alert类型的消息实例可以为:
<Alert>
<CmdID>2</CmdID>
<Data>1226</Data> <!- Generic Alert ~>
<Item>
<Meta>
<Type xmlns="syncml:metinf >
org. openmobilealliance .NextNonce
</Type>
</Meta>
<Data/> </Item>
</Alert>
由终端进行 nonce值更新的方法与由服务器进行 nonce值的更新的方法类 似, 这里不再赘述。
方法二、 由服务器和终端共同进行 nonce的更新。
服务器判断共用 nonce需要更新时, 生成一个新的 nonce进行更新, 终端 也可以在判断共用 nonce需要更新时, 生成一个新的 nonce进行更新。
该更新 nonce的方法可以是: 通过 NextNonce命令进行, 实例如下: <Chal>
<Meta>
<NextNonce xmlns= ' syncml: metinf ' >LG3 iZQhhdmKNHg==</NextNonce>
</Meta>
</Chal>
该 NextNonce命令可以携带在会话过程中的消息中,例如,终端可以将该 NextNonce 命令携带在会话请求中, 发送到服务器, 请求服务器更新共用 nonce; 也可以使用其它消息发送 NextNonce命令。
不管是服务器进行共同 nonce的更新还是终端进行共同 nonce的更新, 若 该更新命令携带在认证消息中, 则对端收到该消息后, 先更新 nonce, 再使用 更新后的 nonce生成 Digest对该信息进行认证,认证必然会通过, 此时若有其 它恶意服务器截获了该消息, 就可以在任何时间对终端进行重放攻击。 为了防 止这种情况的出现,在认证消息中携带 NextNonce命令时,可以使用更新前的 nonce生成 Digest对该信息进行认证, 在认证通过后, 再才艮据 NextNonce命令 对自身保存的 nonce值进行更新;若使用其它管理消息携带该 nonce更新命令, 则由于新 nonce和认证信息分开在两个不同的消息中发送给对方,所以不存在 攻击风险。 用的 nonce进行认证, 此时如果共用 nonce出错, 可以使用以上所述的任何一 骤 803中将携带新的 nonce、 及用该 nonce生成的 Digest, 此时若有恶意服务 器截获了该消息 ,就可以向服务器或终端不断重复发送该消息 ,进行重放攻击 , 服务器或终端将无法识别, 均认为是有效信息, 并进行相应操作, 为了防止这 种情况, 可以使用未更新前的 nonce生成 Digest, 这样服务器在接收到消息后 首先使用未更新前的 nonce计算 Digest以认证消息发送者, 即终端,在认证通 过后, 再根据 NextNonce命令对自身保存的 nonce值进行更新。 的负担。
本发明实施例提供的进行认证的系统实施例一结构如图 14所示, 包括: 服务器 1410, 用于使用触发消息随机数生成触发消息, 并发送所述使用 触发消息随机数生成的触发消息;
终端 1420 , 用于接收所述使用触发消息随机数生成的触发消息, 并使用 所述触发消息随机数对所述使用触发消息随机数生成的触发消息进行认证,认 证所述使用触发消息随机数生成的触发消息的有效性。
其中, 服务器 1410内又包括:
第一生成单元 1412, 用于使用触发消息随机数生成触发消息;
发送单元 1411 , 用于发送所述使用触发消息随机数生成的触发消息; 第二生成单元 1417 , 用于使用服务器随机数生成触发消息, 并将所述使 用服务器随机数生成的触发消息发送到所述终端;
判断单元 1413 , 用于在确定终端对所述使用服务器随机数生成的触发消 息认证失败时, 控制所述第一生成单元 1412使用触发消息随机数生成触发消 息;
时间单元 1414, 用于在所述第一生成单元 1412使用触发消息随机数生成 触发消息时,取所述服务器的系统时间, 并将所述系统时间携带在所述使用触 发消息随机数生成的触发消息中;
编码单元 1415 , 用于对所述第一生成单元 1412使用触发消息随机数生成 的触发消息进行编号, 使用所述编号作为所述触发消息随机数;
随机数重置单元 1416 , 用于根据需要对所述编码单元 1415生成的触发消 息随机数进行调整。
会话标识转随机数单元 1418, 用于将触发消息所触发会话的会话标识作 为触发消息随机数, 以使终端在收到该触发消息时,使用该触发消息随机数对 该触发消息进行认证,并在认证通过后发起会话请求以请求该会话标识标识的 会话。
其中, 编码单元 1415内又包括:
累加编码单元 14151 , 用于使用累加的方式对所述使用触发消息随机数生 成的触发消息进行编号;
递减编码单元 14152 , 用于使用递减的方式对所述使用触发消息随机数生 成的触发消息进行编号。
其中, 终端 1420内又包括:
接收单元 1421 , 用于接收所述使用触发消息随机数生成的触发消息; 第一认证单元 1422 , 用于使用所述触发消息随机数对所述使用触发消息 随机数生成的触发消息进行认证,认证所述使用触发消息随机数生成的触发消 息的有效性。
第二认证单元 1425 , 用于在收到所述触发消息时, 使用所述服务器随机 数对所述触发消息进行认证, 并在认证失败后使用触发消息随机数进行重认 证。
第一有效判断单元 1423 , 用于在所述接收单元 1421收到所述使用触发消 息随机数生成的触发消息时,取所述终端的本地时间, 以所述本地时间与所述 系统时间差值的绝对值与预设的值进行比较,在小于所述预设的值时, 判断所 述触发消息随机数为有效值, 并控制所述第一认证单元 1422使用所述触发消 息随机数对所述使用触发消息随机数生成的触发消息进行认证。
第二有效判断单元 1424, 用于在所述接收单元 1421收到所述使用触发消 息随机数生成的触发消息,根据自身保存的触发消息随机数, 判断所述触发消 息携带的触发消息随机数有效时, 保存所述触发消息携带的触发消息随机数, 并控制所述第一认证单元 1422使用所述触发消息随机数对所述使用触发消息 随机数生成的触发消息进行认证。
会话标识转随机数单元 1428, 用于将所述触发消息所触发会话的会话标 识作为所述触发消息随机数,并使用所述触发消息随机数对所述触发消息进行 认证, 并在认证通过后发起会话请求以请求所述会话标识标识的会话。 所述第二有效判断单元 1424包括:
第一编码判断单元 14241 , 用于以所述终端保存的触发消息随机数与所述 触发消息携带的触发消息随机数进行比较,在所述触发消息携带的触发消息随 机数大于所述保存的最大的触发消息随机数时,或在终端保存的已接收过的触 发消息随机数中不包含所述触发消息携带的触发消息随机数时,或在终端保存 的未收到过的数值中包含所述触发消息携带的触发消息随机数时,判断所述触 发消息携带的触发消息随机数有效。
第二编码判断单元 14242, 用于以所述终端保存的触发消息随机数与所述 触发消息携带的触发消息随机数进行比较,在所述触发消息携带的触发消息随 机数小于所述保存的最小的触发消息随机数时,或在所述保存的已接收过的触 发消息随机数中不包含所述触发消息携带的触发消息随机数时,或在终端保存 的未收到过的数值中包含所述触发消息携带的触发消息随机数时,判断所述触 发消息携带的触发消息随机数有效。
本发明实施例提供的进行认证的系统实施例一的具体运行方式,可参考上 述。
使用本发明实施例提供的进行认证的系统实施例一提供的技术方案 ,在认 证失败时, 将不再需要使用缺省 nonce完成认证, 提高了系统的安全性。
本发明实施例提供的服务器实施例一,与上文描述的本发明实施例提供的 进行认证的系统实施例一中的服务器基本一致, 在此不再重复描述。
本发明实施例提供的终端实施例一结构如图 15所示, 包括:
接收单元 1501 , 用于接收服务器发送的触发消息;
第一生成单元 1502 , 用于在收到所述触发消息后, 判断服务器随机数需 要更新时, 生成新的服务器随机数, 并将所述新的服务器随机数携带在会话请 求中,发送到所述服务器, 以使所述服务器可以在收到所述携带有新的服务器 随机数的会话请求时,使用所述新的服务器随机数更新自身保存的服务器随机 数。
第二生成单元 1503 , 用于在收到触发消息后, 决定不发起会话, 判断服 务器随机数需要更新时, 生成新的服务器随机数, 并将所述新的服务器随机数 携带在状态回复消息中,发送到所述服务器, 以使所述服务器可以在收到所述 携带有新的服务器随机数的状态回复消息时,使用所述新的服务器随机数更新 自身保存的服务器随机数。
本发明实施例提供的终端实施例一的具体运行方式,可参考上文描述的本 发明实施例提供的进行认证的方法实施例四、 五、 六, 在此不再重复描述。
使用本发明实施例提供的终端实施例一提供的技术方案, 在 s— nonce需要 更新时, 直接在会话请求消息中携带更新命令, 可以减少信令交互的次数, 有 效减轻系统的负荷, 并且可以减少使用缺省 nonce完成认证的次数, 提高了系 统的安全性。
本发明实施例提供的终端实施例二, 结构如图 16所示:
终端 1600包括:
接收单元 1601 , 用于接收服务器发送的触发消息;
生成单元 1602 , 用于在收到所述触发消息后, 首先使用服务器随机数认 证该触发消息,在认证失败后再使用缺省随机数认证该触发消息,在认证通过 后,使用终端随机数生成会话请求发送到服务器, 以使服务器使用终端随机数 认证终端。
密码修改单元 1603 , 用于在使用所述新的服务器随机数更新服务器随机 数完成后, 修改服务器密码和终端密码。
本发明实施例提供的终端实施例二的具体运行方式,可参考上文描述的本 发明实施例提供的进行认证的方法实施例七、 八, 在此不再重复描述。
使用本发明实施例提供的终端实施例二提供的技术方案, 在 s— nonce需要 更新时, 只更新 s— nonce, 不更新 c— nonce, 即使系统在处理 s— nonce错误时使 用缺省 nonce进行认证, 但由于不需要更新 c— nonce, 终端可以使用 c— nonce 生成会话请求, 减少了使用缺省 nonce的次数, 系统的安全性得到了提高。
本发明实施例提供的进行认证的系统实施例二结构如图 17所示, 包括: 服务器 1710、 及终端 1720。
其中, 服务器 1710内又包括:
触发单元 1711 , 用于使用服务器及终端共用随机数生成触发消息, 并发 送到终端, 以使所述终端在收到所述触发消息后,使用所述共用随机数对所述 触发消息进行认证;
接收单元 1712, 用接收终端返回的使用所述共用随机数生成的会话请求; 认证单元 1713 , 用于使用所述共用随机数对所述会话请求进行认证; 生成单元 1714 , 用于在对所述会话请求认证通过后, 使用所述共用随机 数生成应答消息, 并发送到所述终端, 以使所述终端在收到所述应答消息后, 使用所述共用随机数对所述应答消息进行认证。
更新单元 1715 , 用于生成所述共用随机数, 在需要更新所述共用随机数 时, 生成新的共用随机数, 并发送包含所述新的共用随机数的更新随机数消息 到所述终端, 以使所述终端在收到所述更新随机数消息时,使用所述新的共用 随机数更新共用随机数。
请求单元 1716 , 用于在判断需要更新所述共用随机数时, 发送请求更新 随机数消息至所述终端, 以使所述终端在收到所述请求更新随机数消息,且决 定更新后, 生成所述新的共用随机数, 并发送包含所述新的共用随机数的更新 随机数消息。
其中, 终端 1720内又包括:
接收单元 1721 , 用于接收服务器发送的使用服务器及终端共用随机数生 成的触发消息;
第一认证单元 1722 , 用于在收到所述触发消息后, 使用所述共用随机数 对所述触发消息进行认证;
生成单元 1723 , 用于在认证通过后, 使用所述共用随机数生成会话请求, 并发送到所述服务器, 以使所述服务器可以在收到所述会话请求后,使用所述 共用随机数对所述会话请求进行认证, 认证所述会话请求的有效性;
第二认证单元 1724 , 用于在收到所述服务器使用所述共用随机数生成的 应答消息后, 使用所述共用随机数对所述应答消息进行认证。
更新单元 1725 , 用于生成所述共用随机数, 在需要更新所述共用随机数 时, 生成新的共用随机数, 并发送包含所述新的共用随机数的更新随机数消息 到所述服务器, 以使所述服务器在收到所述更新随机数消息时,使用所述新的 共用随机数更新共用随机数。
请求单元 1726 , 用于在判断需要更新所述共用随机数时, 发送请求更新 随机数消息至所述服务器, 以使所述服务器在收到所述请求更新随机数消息, 且决定更新后, 生成所述新的共用随机数, 并发送包含所述新的共用随机数的 更新随机数消息。
本发明实施例提供的进行认证的系统实施例二的具体运行方式,可参考上 在本发明实施例提供的进行认证的系统实施例二提供的技术方案中,服务 器和终端在会话过程中使用共用的 nonce ,替代现有技术的 s— nonce和 c— nonce 完成终端和服务器之间的认证, 有效减轻了系统的负担。
本发明实施例提供的服务器实施例二、及本发明实施例提供的终端实施例 三,与本发明实施例提供的进行认证的系统实施例二种描述的服务器及终端基 本一致, 在此不再重复描述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可 读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上对本发明所提供的一种使用数据同步协议或设备管理协议进行认证 的方法、 系统、 服务器及终端进行了详细介绍, 本文中应用了具体个例对本发 明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明 的方法及其核心思想; 同时,对于本领域的一般技术人员,依据本发明的思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应 理解为对本发明的限制。

Claims

权 利 要 求
1、 一种使用数据同步协议或设备管理协议进行认证的方法, 其特征在于, 包括:
服务器使用触发消息随机数生成触发消息 ,并将所述使用触发消息随机数 生成的触发消息发送到终端; 以使所述终端可以提取所述触发消息随机数,在 确认所述触发消息随机数有效时, 使用所述触发消息随机数生成摘要对所 述使用触发消息随机数生成的触发消息进行认证, 在认证通过后, 向所述触发 消息指示的服务器发起会话请求, 所述会话请求中携带会话标识。
2、 如权利要求 1所述的使用数据同步协议或设备管理协议进行认证的方 法, 其特征在于, 在所述服务器使用触发消息随机数生成触发消息之前, 所述 方法还包括:
所述服务器使用服务器随机数生成触发消息,并将所述使用服务器随机数 生成的触发消息发送到终端;
在确定终端对所述使用服务器随机数生成的触发消息认证失败时,所述服 务器再使用触发消息随机数生成触发消息。
3、 如权利要求 1或 2所述的使用数据同步协议或设备管理协议进行认证 的方法, 其特征在于, 所述服务器使用触发消息随机数生成触发消息包括: 所述服务器取所述服务器的系统时间作为触发消息随机数,并将所述系统 时间携带在所述使用触发消息随机数生成的触发消息中;
以使所述终端可以在收到所述使用触发消息随机数生成的触发消息时,取 所述终端的本地时间与所述触发消息随机数进行比较,判断所述触发消息随机 数是否为有效值, 在判断所述触发消息随机数为有效值时,使用所述触发消息 随机数生成的摘要对所述使用触发消息随机数生成的触发消息进行认证。
4、 如权利要求 1或 2所述的使用数据同步协议或设备管理协议进行认证 的方法, 其特征在于, 所述服务器使用触发消息随机数生成触发消息包括: 所述服务器使用所述触发消息所触发会话的会话标识作为所述触发消息 随机数, 以使所述终端在收到所述触发消息时,使用所述触发消息随机数对所 述触发消息进行认证,并在认证通过后发起会话请求以请求所述会话标识标识 的会话。
5、 如权利要求 1或 2所述的使用数据同步协议或设备管理协议进行认证 的方法, 其特征在于, 所述服务器使用触发消息随机数生成触发消息包括: 所述服务器使用所述触发消息的标识作为所述触发消息随机数,以使所述 终端在收到所述触发消息时 ,使用所述触发消息随机数对所述触发消息进行认 证,所述触发消息标识用于将终端回复的所述触发消息的处理结果与所述触发 消息进行关联。
6、 如权利要求 1或 2所述的使用数据同步协议或设备管理协议进行认证 的方法, 其特征在于, 还包括:
服务器使用累加的方式对所述使用触发消息随机数生成的触发消息进行 编号, 使用所述编号作为所述触发消息随机数;
以使所述终端可以在收到所述使用触发消息随机数生成的触发消息,根据 自身保存的触发消息随机数判断,当所述触发消息携带的触发消息随机数大于 所述保存的最大的触发消息随机数时,或在所述保存的已接收过的触发消息随 机数中不包含所述触发消息携带的触发消息随机数时,或在所述保存的未收到 过的数值中包含所述触发消息携带的触发消息随机数时,确定为所述触发消息 携带的触发消息随机数有效, 并保存所述触发消息携带的触发消息随机数, 并 使用所述触发消息随机数生成的摘要对所述使用触发消息随机数生成的触发 消息进行认证。
7、 如权利要求 6所述的使用数据同步协议或设备管理协议进行认证的方 法, 其特征在于, 还包括:
对触发消息随机数进行调整。
8、 如权利要求 1或 2所述的使用数据同步协议或设备管理协议进行认证 的方法, 其特征在于, 所述服务器使用触发消息随机数生成触发消息包括: 所述服务器将所述触发消息随机数携带在所述触发消息的消息头或消息 体中,并使用所述触发消息随机数、所述触发消息的消息头和消息体生成摘要, 使用所述摘要生成所述触发消息;
或所述服务器将所述触发消息随机数携带在所述触发消息的消息头或消 息体中,使用所述触发消息的消息头和消息体生成摘要,使用所述摘要生成所 述触发消息。
9、一种使用数据同步协议或设备管理协议进行认证的方法, 其特征在于, 包括:
终端获知需要更新服务器随机数;
生成新的服务器随机数 ,并将所述新的服务器随机数携带在会话请求消息 中发送到服务器 ,以使所述服务器可以在收到所述携带有新的服务器随机数的 会话请求消息时, 使用所述新的服务器随机数更新自身保存的服务器随机数。
10、如权利要求 9所述的使用数据同步协议或设备管理协议进行认证的方 法, 其特征在于, 所述服务器更新自身保存的服务器随机数具体为:
所述服务器在收到所述会话请求消息时, 首先认证所述终端, 并在认证通 过后使用所述新的服务器随机数更新自身保存的服务器随机数。
11、如权利要求 9所述的使用数据同步协议或设备管理协议进行认证的方 法, 其特征在于, 将所述新的服务器随机数携带在会话请求中包括:
所述终端将所述新的服务器随机数携带在所述会话请求消息的消息头或 消息体中。
12、一种使用数据同步协议或设备管理协议进行认证的方法,其特征在于, 包括:
终端接收服务器发送的使用缺省随机数生成的触发消息;
所述终端在收到所述触发消息后,首先使用服务器随机数认证所述触发消 息, 在认证失败后再使用缺省随机数认证触发消息, 在认证通过后, 使用缺省 随机数生成会话请求消息请求会话,在会话中发送新的服务器随机数到所述服 务器,使所述服务器更新服务器随机数, 并接收服务器发送的使用缺省随机数 生成的认证信息,认证服务器身份,接收服务器发送的更新终端随机数的命令 以更新终端随机数;
并在更新所述服务器随机数和终端随机数后更新服务器密码和终端密码。
13、一种使用数据同步协议或设备管理协议进行认证的方法,其特征在于, 包括:
终端向服务器发送使用缺省随机数生成的会话请求消息,以使所述服务器 在收到所述会话请求消息后,在确定需要使用缺省随机数进行认证时,使用缺 省随机数对所述会话请求消息进行认证, 并在认证通过时, 向所述终端返回包 含认证结果、 用缺省随机数生成的认证请求和终端随机数更新命令的应答消 息;
终端接收所述应答消息, 在确定需要使用缺省随机数进行认证时,使用缺 省随机数对所述应答消息进行认证, 并在认证通过时, 向所述服务器返回包含 认证结果和服务器随机数更新命令的应答消息。
14、 如权利要求 13所述的使用数据同步协议或设备管理协议进行认证的 方法, 其特征在于, 所述服务器确定需要使用缺省随机数进行认证具体为: 若服务器发送过使用缺省随机数的用以触发所述会话的触发消息给所述 终端, 则确定为需要使用缺省随机数进行认证; 或者
服务器首先使用终端随机数生成认证信息进行认证,在认证失败时确定为 需要使用缺省随机数进行认证;
所述终端确定需要使用缺省随机数进行认证具体为:
若终端发送过使用缺省随机数的会话请求消息给所述服务器,则确定为需 要使用缺省随机数进行认证; 或者
终端首先使用服务器随机数生成认证信息进行认证,在认证失败时确定为 需要使用缺省随机数进行认证。
15、一种使用数据同步协议或设备管理协议进行认证的方法,其特征在于, 包括:
终端接收服务器发送的使用缺省随机数或会话标识或触发消息标识生成 的触发消息;
所述终端在收到所述触发消息后,首先使用服务器随机数认证所述触发消 息, 在认证失败后再使用缺省随机数或会话标识或触发消息标识认证触发消 息, 在认证通过后, 使用终端随机数生成会话请求消息发送到服务器, 以使所 述服务器使用终端随机数认证终端。
16、 如权利要求 15所述的使用数据同步协议或设备管理协议进行认证的 方法, 其特征在于, 还包括:
终端发送新的服务器随机数到所述服务器,使所述服务器使用所述新的服 务器随机数更新服务器随机数,所述终端将所述新的服务器随机数携带在所述 会话请求消息中发送到所述服务器,或者携带在所述服务器发送的挑战消息的 回复消息中发送到所述服务器。
17、 如权利要求 15所述的使用数据同步协议或设备管理协议进行认证的 方法, 其特征在于, 在所述终端使用终端随机数生成会话请求消息并发送到服 务器之后, 所述方法还包括:
所述终端收到所述服务器返回的使用缺省随机数或会话标识或触发消息 标识生成的应答消息后, 对服务器进行认证, 并认证通过后, 发送所述新的服 务器随机数到所述服务器,使所述服务器使用所述新的服务器随机数更新服务 器随机数。
18、 如权利要求 15所述的使用数据同步协议或设备管理协议进行认证的 方法, 其特征在于, 在所述终端使用终端随机数生成会话请求消息并发送到服 务器之后, 所述方法还包括:
所述终端接收所述服务器返回的携带使用服务器随机数生成的服务器认 证请求的应答消息, 并使用服务器随机数对所述服务器进行认证。
19、 如权利要求 15、 16、 17或 18所述的使用数据同步协议或设备管理协 议进行认证的方法, 其特征在于, 还包括:
在使用所述新的服务器随机数更新服务器随机数完成后, 更新服务器密 码。
20、一种使用数据同步协议或设备管理协议进行认证的方法,其特征在于, 包括:
终端接收服务器发送的触发消息;
所述终端在收到所述触发消息后,提取其携带的认证信息对所述服务器进 行认证;
认证通过后, 终端使用服务器及终端共用随机数生成会话请求, 并发送到 所述服务器;
以使所述服务器可以在收到所述会话请求后,使用所述共用随机数对所述 终端进行认证;
所述终端在收到所述服务器携带有使用所述共用随机数生成的认证信息 应答消息后, 使用所述共用随机数对所述服务器进行认证。
21、 如权利要求 19所述的使用数据同步协议或设备管理协议进行认证的 方法, 其特征在于, 还包括:
在需要更新所述共用随机数时, 生成新的共用随机数, 并发送包含所述新 共用随机数的更新命令;
收到所述更新命令, 使用所述新的共用随机数更新所保存的共用随机数。
22、 如权利要求 21所述的使用数据同步协议或设备管理协议进行认证的 方法, 其特征在于, 还包括:
将所述新的共用随机数携带在会话过程中的认证消息中发送,收到所述认 证消息后, 使用更新前的随机数生成摘要进行认证;
或者将所述新的共用随机数携带在会话过程中的管理消息中发送。
23、如权利要求 21或 22所述的使用数据同步协议或设备管理协议进行认 证的方法, 其特征在于, 还包括:
在判断需要更新所述共用随机数时, 发送随机数更新请求;
收到所述随机数更新请求, 生成所述新的共用随机数, 并发送包含所述新 的共用随机数的消息。
24、一种使用数据同步协议或设备管理协议进行认证的系统,其特征在于, 包括:
服务器, 用于使用触发消息随机数生成触发消息, 并发送所述使用触发消 息随机数生成的触发消息;
终端, 用于接收所述使用触发消息随机数生成的触发消息,提取所述触发 消息随机数,在确认所述触发消息随机数有效时,使用所述触发消息随机数生 成摘要对所述使用触发消息随机数生成的触发消息进行认证, 在认证通过后, 向所述触发消息指示的服务器发起会话请求。
25、 一种服务器, 其特征在于, 包括:
第一生成单元,用于使用触发消息随机数生成符合数据同步协议或设备管 理协议规范的触发消息;
发送单元, 用于发送所述使用触发消息随机数生成的触发消息到终端, 以 使所述终端可以提取所述触发消息随机数, 在确认所述触发消息随机数有效 时,使用所述触发消息随机数对所述使用触发消息随机数生成的触发消息进行 认证, 在认证通过后, 向所述触发消息指示的服务器发起会话请求。
26、 如权利要求 25所述的服务器, 其特征在于, 还包括:
第二生成单元, 用于使用服务器随机数生成触发消息, 并将所述使用服务 器随机数生成的触发消息发送到所述终端,以使所述终端可以使用所述服务器 随机数对所述使用服务器随机数生成的触发消息进行认证;
判断单元,用于在确定所述终端对所述使用服务器随机数生成的触发消息 认证失败时, 控制所述第一生成单元使用触发消息随机数生成触发消息。
27、 如权利要求 26所述的服务器, 其特征在于, 所述编码单元包括: 累加编码单元,用于使用累加的方式对所述使用触发消息随机数生成的触 发消息进行编号,以使所述终端以保存的触发消息随机数与所述触发消息携带 的触发消息随机数进行比较,判断所述触发消息携带的触发消息随机数是否有 效,有效则使用所述触发消息随机数生成摘要对所述使用触发消息随机数生成 的触发消息进行认证, 并保存所述触发消息携带的触发消息随机数。
28、 如权利要求 26所述的服务器, 其特征在于, 还包括:
随机数重置单元, 用于对所述编码单元生成的触发消息随机数进行调整。
29、 如权利要求 26所述的服务器, 其特征在于, 还包括:
会话标识转随机数单元,用于将所述触发消息所触发会话的会话标识作为 所述触发消息随机数, 以使所述终端在收到所述触发消息时,使用所述触发消 息随机数对所述触发消息进行认证,并在认证通过后发起会话请求以请求所述 会话标识标识的会话。
30、 一种终端, 其特征在于, 包括:
接收单元,用于接收服务器使用触发消息随机数生成的符合数据同步协议 或设备管理协议规范的触发消息;
第一认证单元, 用于提取所述触发消息随机数,在确认所述触发消息随机 数有效时,使用所述触发消息随机数生成摘要对所述使用触发消息随机数生成 的触发消息进行认证,在认证通过后, 向所述触发消息指示的服务器发起会话 请求。
31、 如权利要求 30所述的终端, 其特征在于, 还包括:
第二认证单元, 用于在收到所述触发消息时,使用所述服务器随机数对所 述触发消息进行认证, 并在认证失败后使用触发消息随机数进行重认证。
32、 如权利要求 30或 31所述的终端, 其特征在于, 还包括: 第二有效判断单元,用于在所述接收单元收到所述服务器使用触发消息编 号作为触发消息随机数生成的触发消息, 根据自身保存的触发消息随机数判 断,当所述触发消息携带的触发消息随机数大于终端保存的最大的触发消息随 机数时,或在终端保存的已接收过的触发消息随机数中不包含所述触发消息携 带的触发消息随机数时,或在终端保存的未收到过的数值中包含所述触发消息 携带的触发消息随机数时, 确定为所述触发消息携带的触发消息随机数有效, 并保存所述触发消息携带的触发消息随机数,并控制所述第一认证单元使用所 述触发消息随机数对所述使用触发消息随机数生成的触发消息进行认证。
33、 如权利要求 30或 31所述的终端, 其特征在于, 还包括:
会话标识转随机数单元,用于将所述触发消息所触发会话的会话标识作为 所述触发消息随机数, 并使用所述触发消息随机数对所述触发消息进行认证, 并在认证通过后发起会话请求以请求所述会话标识标识的会话。
34、 一种终端, 其特征在于, 包括:
获知单元, 用于获知需要更新服务器随机数;
第一生成单元, 用于生成新的服务器随机数, 并将所述新的服务器随机数 携带在会话请求消息中,发送到所述服务器, 以使所述服务器可以在收到所述 携带有新的服务器随机数的会话请求时,使用所述新的服务器随机数更新自身 保存的服务器随机数。
35、 一种终端, 其特征在于, 包括:
接收单元,用于接收服务器发送的使用缺省随机数生成的符合数据同步协 议或设备管理协议规范的触发消息;
生成单元, 用于在收到所述触发消息后, 首先使用服务器随机数认证所述 触发消息,在认证失败后再使用缺省随机数认证所述触发消息,在认证通过后, 使用终端随机数生成会话请求发送到服务器,以使所述服务器使用终端随机数 认证终端。
36、 如权利要求 35所述的终端, 其特征在于, 还包括:
密码修改单元,用于在使用所述新的服务器随机数更新服务器随机数完成 后, 更新服务器密码。
PCT/CN2008/070686 2007-11-08 2008-04-09 A method, system, server and terminal for processing an authentication Ceased WO2009059496A1 (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP2010532407A JP5209731B2 (ja) 2007-11-08 2008-04-09 認証方法およびクライアント
ES08734046T ES2426946T3 (es) 2007-11-08 2008-04-09 Un método, sistema, servidor y terminal para poner en práctica una autenticación
KR1020107011964A KR101134059B1 (ko) 2007-11-08 2008-04-09 인증 방법, 시스템, 서버 및 클라이언트
EP08734046.9A EP2209253B1 (en) 2007-11-08 2008-04-09 A method, system, server and terminal for processing an authentication
US12/775,937 US8392717B2 (en) 2007-11-08 2010-05-07 Authentication method, system, server, and client
US13/270,579 US8245048B2 (en) 2007-11-08 2011-10-11 Authentication method, system, server, and client

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN200710170309.5 2007-11-08
CN200710170309 2007-11-08
CN2007101954623A CN101431413B (zh) 2007-11-08 2007-11-27 进行认证的方法、系统、服务器及终端
CN200710195462.3 2007-11-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/775,937 Continuation US8392717B2 (en) 2007-11-08 2010-05-07 Authentication method, system, server, and client

Publications (1)

Publication Number Publication Date
WO2009059496A1 true WO2009059496A1 (en) 2009-05-14

Family

ID=40646594

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/070686 Ceased WO2009059496A1 (en) 2007-11-08 2008-04-09 A method, system, server and terminal for processing an authentication

Country Status (8)

Country Link
US (2) US8392717B2 (zh)
EP (3) EP2579502B1 (zh)
JP (1) JP5209731B2 (zh)
KR (1) KR101134059B1 (zh)
CN (2) CN101431413B (zh)
ES (1) ES2426946T3 (zh)
RU (1) RU2446593C2 (zh)
WO (1) WO2009059496A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110024003A (ko) * 2009-09-01 2011-03-09 엘지전자 주식회사 네트워크상에서의 디바이스 인증 시스템 및 인증 방법

Families Citing this family (73)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9318108B2 (en) 2010-01-18 2016-04-19 Apple Inc. Intelligent automated assistant
US8977255B2 (en) 2007-04-03 2015-03-10 Apple Inc. Method and system for operating a multi-function portable electronic device using voice-activation
US8676904B2 (en) 2008-10-02 2014-03-18 Apple Inc. Electronic devices with voice command and contextual data processing capabilities
US8776214B1 (en) 2009-08-12 2014-07-08 Amazon Technologies, Inc. Authentication manager
WO2012005739A1 (en) * 2010-07-09 2012-01-12 Hewlett-Packard Development Company, L.P. Responses to server challenges included in a hypertext transfer protocol header
WO2012110694A1 (en) * 2011-02-14 2012-08-23 Nokia Corporation Seamless wi-fi subscription remediation
US9171162B2 (en) 2011-03-29 2015-10-27 Microsoft Technology Licensing, Llc Random file request for software attestation
US10057736B2 (en) 2011-06-03 2018-08-21 Apple Inc. Active transport based notifications
CN102231678A (zh) * 2011-06-27 2011-11-02 华为终端有限公司 设备管理的方法、装置和系统
US11444936B2 (en) 2011-07-29 2022-09-13 Amazon Technologies, Inc. Managing security credentials
US10362019B2 (en) 2011-07-29 2019-07-23 Amazon Technologies, Inc. Managing security credentials
US9767262B1 (en) 2011-07-29 2017-09-19 Amazon Technologies, Inc. Managing security credentials
WO2013061614A2 (en) 2011-10-28 2013-05-02 Nec Corporation Secure method for mtc device triggering
US8984276B2 (en) * 2012-01-10 2015-03-17 Jpmorgan Chase Bank, N.A. System and method for device registration and authentication
US8955065B2 (en) * 2012-02-01 2015-02-10 Amazon Technologies, Inc. Recovery of managed security credentials
US8863250B2 (en) 2012-02-01 2014-10-14 Amazon Technologies, Inc. Logout from multiple network sites
CN107451472B (zh) * 2012-03-08 2021-06-04 阿里巴巴集团控股有限公司 表单验证方法、装置和系统
US10417037B2 (en) 2012-05-15 2019-09-17 Apple Inc. Systems and methods for integrating third party services with a digital assistant
DE112014000709B4 (de) 2013-02-07 2021-12-30 Apple Inc. Verfahren und vorrichtung zum betrieb eines sprachtriggers für einen digitalen assistenten
US8966599B1 (en) 2013-03-14 2015-02-24 Amazon Technologies, Inc. Automatic token renewal for device authentication
US10475018B1 (en) 2013-11-29 2019-11-12 Amazon Technologies, Inc. Updating account data for multiple account providers
CN104954327B (zh) * 2014-03-27 2019-02-22 东华软件股份公司 用于终端连接控制的服务器及方法、终端及方法、和系统
US10170123B2 (en) 2014-05-30 2019-01-01 Apple Inc. Intelligent assistant for home automation
US9715875B2 (en) 2014-05-30 2017-07-25 Apple Inc. Reducing the need for manual start/end-pointing and trigger phrases
US9338493B2 (en) 2014-06-30 2016-05-10 Apple Inc. Intelligent automated assistant for TV user interactions
US9886953B2 (en) 2015-03-08 2018-02-06 Apple Inc. Virtual assistant activation
KR101655439B1 (ko) * 2015-03-26 2016-09-20 세종대학교산학협력단 컴퓨팅 장치의 인증 방법 및 이를 수행하기 위한 장치
US10460227B2 (en) 2015-05-15 2019-10-29 Apple Inc. Virtual assistant in a communication session
US9916151B2 (en) * 2015-08-25 2018-03-13 Ford Global Technologies, Llc Multiple-stage secure vehicle software updating
US10747498B2 (en) 2015-09-08 2020-08-18 Apple Inc. Zero latency digital assistant
US10671428B2 (en) 2015-09-08 2020-06-02 Apple Inc. Distributed personal assistant
US11587559B2 (en) 2015-09-30 2023-02-21 Apple Inc. Intelligent device identification
WO2017064361A1 (en) * 2015-10-16 2017-04-20 Nokia Technologies Oy Message authentication
US10691473B2 (en) 2015-11-06 2020-06-23 Apple Inc. Intelligent automated assistant in a messaging environment
US9967248B1 (en) * 2015-12-28 2018-05-08 Amazon Technologies Inc. System for authenticating and processing service requests
US12223282B2 (en) 2016-06-09 2025-02-11 Apple Inc. Intelligent automated assistant in a home environment
US10586535B2 (en) 2016-06-10 2020-03-10 Apple Inc. Intelligent digital assistant in a multi-tasking environment
US12197817B2 (en) 2016-06-11 2025-01-14 Apple Inc. Intelligent device arbitration and control
DK201670540A1 (en) 2016-06-11 2018-01-08 Apple Inc Application integration with a digital assistant
CN106100889A (zh) * 2016-07-01 2016-11-09 浪潮(北京)电子信息产业有限公司 一种snmp协议安全的增强方法及装置
CN106411953A (zh) * 2016-11-30 2017-02-15 深圳前海弘稼科技有限公司 一种种植箱登录方法及装置
US11204787B2 (en) 2017-01-09 2021-12-21 Apple Inc. Application integration with a digital assistant
CN108337210B (zh) * 2017-01-19 2021-05-18 钉钉控股(开曼)有限公司 设备配置方法及装置、系统
KR102228744B1 (ko) * 2017-03-07 2021-03-16 휴렛-팩커드 디벨롭먼트 컴퍼니, 엘.피. 난수에 기초한 데이터 메시지 인증
US10659464B2 (en) * 2017-05-10 2020-05-19 Microsoft Technology Licensing, Llc Securely authenticating a bot user
DK180048B1 (en) 2017-05-11 2020-02-04 Apple Inc. MAINTAINING THE DATA PROTECTION OF PERSONAL INFORMATION
DK179496B1 (en) 2017-05-12 2019-01-15 Apple Inc. USER-SPECIFIC Acoustic Models
DK201770428A1 (en) 2017-05-12 2019-02-18 Apple Inc. LOW-LATENCY INTELLIGENT AUTOMATED ASSISTANT
DK201770411A1 (en) 2017-05-15 2018-12-20 Apple Inc. Multi-modal interfaces
US10303715B2 (en) 2017-05-16 2019-05-28 Apple Inc. Intelligent automated assistant for media exploration
DK179560B1 (en) 2017-05-16 2019-02-18 Apple Inc. FAR-FIELD EXTENSION FOR DIGITAL ASSISTANT SERVICES
FR3071373B1 (fr) * 2017-09-21 2021-01-22 Onoff Telecom Procede de verification de la validite d’une ligne telephonique d’un utilisateur
US20200367025A1 (en) * 2017-10-24 2020-11-19 Irad Deutsch Combination system and method
US10818288B2 (en) 2018-03-26 2020-10-27 Apple Inc. Natural assistant interaction
US10928918B2 (en) 2018-05-07 2021-02-23 Apple Inc. Raise to speak
DK180639B1 (en) 2018-06-01 2021-11-04 Apple Inc DISABILITY OF ATTENTION-ATTENTIVE VIRTUAL ASSISTANT
DK201870355A1 (en) 2018-06-01 2019-12-16 Apple Inc. VIRTUAL ASSISTANT OPERATION IN MULTI-DEVICE ENVIRONMENTS
US11462215B2 (en) 2018-09-28 2022-10-04 Apple Inc. Multi-modal inputs for voice commands
US11348573B2 (en) 2019-03-18 2022-05-31 Apple Inc. Multimodality in digital assistant systems
DK201970509A1 (en) 2019-05-06 2021-01-15 Apple Inc Spoken notifications
US11307752B2 (en) 2019-05-06 2022-04-19 Apple Inc. User configurable task triggers
US11227599B2 (en) 2019-06-01 2022-01-18 Apple Inc. Methods and user interfaces for voice-based control of electronic devices
US12326823B2 (en) * 2019-08-19 2025-06-10 Cryptography Research, Inc. Application authentication and data encryption without stored pre-shared keys
JP7279668B2 (ja) * 2020-03-12 2023-05-23 トヨタ自動車株式会社 車載用制御装置
KR102519202B1 (ko) * 2020-03-30 2023-04-05 한양대학교 산학협력단 보안 시스템
US11061543B1 (en) 2020-05-11 2021-07-13 Apple Inc. Providing relevant data items based on context
US11490204B2 (en) 2020-07-20 2022-11-01 Apple Inc. Multi-device audio adjustment coordination
US11438683B2 (en) 2020-07-21 2022-09-06 Apple Inc. User identification using headphones
EP4191940B1 (en) 2020-08-13 2025-07-23 Shenzhen Yinwang Intelligent Technologies Co., Ltd. In-vehicle network secure communication method, apparatus and device
CN112260997B (zh) * 2020-09-23 2023-05-26 曙光信息产业(北京)有限公司 数据访问方法、装置、计算机设备和存储介质
CN112367329B (zh) * 2020-11-17 2023-05-02 北京知道创宇信息技术股份有限公司 通信连接认证方法、装置、计算机设备及存储介质
CN114168919B (zh) * 2021-12-02 2025-09-23 Oppo广东移动通信有限公司 双向身份认证的方法及相关装置
CN116361845A (zh) * 2021-12-27 2023-06-30 华为技术有限公司 访问对象的鉴权方法、装置及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6058480A (en) * 1996-06-03 2000-05-02 Cranberry Properties, Llc System for remote pass-phase authentication
US20030115464A1 (en) * 2001-12-19 2003-06-19 Nyang Dae Hun Method of designing password-based authentication and key exchange protocol using zero-knowledge interactive proof
CN1476709A (zh) * 2000-09-22 2004-02-18 ���ĺ� 网际协议电话安全体系结构
US20040111615A1 (en) * 2002-12-10 2004-06-10 Dae Hun Nyang Authentication method using symmetric authenticated key exchange and asymmetric authenticated key exchange
JP2005005778A (ja) * 2003-06-09 2005-01-06 Foundation For The Promotion Of Industrial Science 認証装置及び認証方法

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6064736A (en) * 1997-09-15 2000-05-16 International Business Machines Corporation Systems, methods and computer program products that use an encrypted session for additional password verification
US6148405A (en) * 1997-11-10 2000-11-14 Phone.Com, Inc. Method and system for secure lightweight transactions in wireless data networks
US6065120A (en) * 1997-12-09 2000-05-16 Phone.Com, Inc. Method and system for self-provisioning a rendezvous to ensure secure access to information in a database from multiple devices
US6892308B1 (en) 1999-04-09 2005-05-10 General Instrument Corporation Internet protocol telephony security architecture
GB9922665D0 (en) * 1999-09-25 1999-11-24 Hewlett Packard Co A method of enforcing trusted functionality in a full function platform
US7024695B1 (en) * 1999-12-30 2006-04-04 Intel Corporation Method and apparatus for secure remote system management
US20020196935A1 (en) * 2001-02-25 2002-12-26 Storymail, Inc. Common security protocol structure and mechanism and system and method for using
US7421733B2 (en) * 2002-02-06 2008-09-02 Hewlett-Packard Development Company, L.P. System and method for providing multi-class processing of login requests
JP4186512B2 (ja) * 2002-05-20 2008-11-26 ソニー株式会社 サービス提供システム、機器端末およびその処理方法、認証装置および方法、サービス提供装置および方法、並びにプログラム
US7574599B1 (en) * 2002-10-11 2009-08-11 Verizon Laboratories Inc. Robust authentication and key agreement protocol for next-generation wireless networks
US7181572B2 (en) * 2002-12-02 2007-02-20 Silverbrook Research Pty Ltd Cache updating method and apparatus
KR100548354B1 (ko) * 2003-06-14 2006-02-02 엘지전자 주식회사 동기화 프로토콜에서의 사용자 인증 방법
CN1894923A (zh) 2003-10-08 2007-01-10 史蒂芬·J·英格博格 用改进保密性技术来建立通讯的方法和系统
US7549048B2 (en) * 2004-03-19 2009-06-16 Microsoft Corporation Efficient and secure authentication of computing systems
US7437771B2 (en) * 2004-04-19 2008-10-14 Woodcock Washburn Llp Rendering protected digital content within a network of computing devices or the like
US20060174103A1 (en) * 2004-09-16 2006-08-03 Nokia Corporation System and method for integrating PKI and XML-based security mechanisms in SyncML
US7690026B2 (en) * 2005-08-22 2010-03-30 Microsoft Corporation Distributed single sign-on service
KR101209071B1 (ko) * 2006-09-19 2012-12-06 엘지전자 주식회사 디바이스 관리시스템 및 그 제어방법

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6058480A (en) * 1996-06-03 2000-05-02 Cranberry Properties, Llc System for remote pass-phase authentication
CN1476709A (zh) * 2000-09-22 2004-02-18 ���ĺ� 网际协议电话安全体系结构
US20030115464A1 (en) * 2001-12-19 2003-06-19 Nyang Dae Hun Method of designing password-based authentication and key exchange protocol using zero-knowledge interactive proof
US20040111615A1 (en) * 2002-12-10 2004-06-10 Dae Hun Nyang Authentication method using symmetric authenticated key exchange and asymmetric authenticated key exchange
JP2005005778A (ja) * 2003-06-09 2005-01-06 Foundation For The Promotion Of Industrial Science 認証装置及び認証方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
See also references of EP2209253A4 *
SHI T. ET AL.: "Design and analysis of a wireless authentication protocol against DoS attacks based on Hash function", SYSTEM ENGINEERING AND ELECTRONICS, vol. 28, no. 1, January 2006 (2006-01-01), pages 122 - 126, XP008134722 *
WANG X. ET AL.: "Attack on 4-way Handshake of 802.11i", COMPUTER AND MODERNIZATION, no. 5, May 2006 (2006-05-01), pages 72 - 75, XP008138415 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110024003A (ko) * 2009-09-01 2011-03-09 엘지전자 주식회사 네트워크상에서의 디바이스 인증 시스템 및 인증 방법
KR101676305B1 (ko) 2009-09-01 2016-11-15 엘지전자 주식회사 네트워크상에서의 디바이스 인증 시스템 및 인증 방법

Also Published As

Publication number Publication date
EP2579502B1 (en) 2015-09-02
EP2579503A2 (en) 2013-04-10
EP2209253B1 (en) 2013-06-19
EP2209253A4 (en) 2011-11-30
EP2579502A3 (en) 2013-10-16
ES2426946T3 (es) 2013-10-25
CN102333100B (zh) 2013-11-06
US20100217997A1 (en) 2010-08-26
US8392717B2 (en) 2013-03-05
CN101431413A (zh) 2009-05-13
JP2011504261A (ja) 2011-02-03
JP5209731B2 (ja) 2013-06-12
CN102333100A (zh) 2012-01-25
RU2010123182A (ru) 2011-12-20
KR20100071115A (ko) 2010-06-28
EP2579503B1 (en) 2015-09-02
CN101431413B (zh) 2012-04-25
US8245048B2 (en) 2012-08-14
EP2579503A3 (en) 2013-10-09
KR101134059B1 (ko) 2012-05-09
EP2209253A1 (en) 2010-07-21
RU2446593C2 (ru) 2012-03-27
EP2579502A2 (en) 2013-04-10
US20120030472A1 (en) 2012-02-02

Similar Documents

Publication Publication Date Title
WO2009059496A1 (en) A method, system, server and terminal for processing an authentication
US12273445B2 (en) Key management method, device, and system
US8555064B2 (en) Security system and method for wireless communication system
US8438616B2 (en) Method for terminal configuration and management and terminal device
JP6086987B2 (ja) ホットスポットネットワークにおける未知のデバイスに対する制限付き証明書登録
JP4637185B2 (ja) 無線通信システム内の最適なデータ転送のための方法及び装置
US12439249B2 (en) Methods and apparatus relating to authentication of a wireless device
US20080072043A1 (en) Device management system and method of controlling the same
CN115706663A (zh) 更新方法、网络侧设备、终端和计算机可读存储介质
CN105847056B (zh) 双向转发检测控制报文的传输方法及系统
US20240373215A1 (en) Security configuration update in communication networks
CN116530119A (zh) 保护无线网络中序列号的方法、设备和系统
US20250300981A1 (en) Faster movement of 802.1x supplicants using cache
CN109005178B (zh) 一种认证方法和认证系统
WO2024255695A1 (zh) 通信方法和通信装置
KR20250164582A (ko) 모바일 장치 관리 서비스를 제공하는 시스템 및 이의 동작 방법
CN120567542A (zh) 一种认证方法及装置
CN115865496A (zh) 一种802.1x协议的认证方法和系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08734046

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010532407

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2008734046

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20107011964

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2010123182

Country of ref document: RU