Data encryption method and device, device access authentication method, device and system

By collecting and encrypting the unique identifier of the terminal device and requesting access timestamp in the device access authentication, and comparing it with the cached legal device timestamp, the problem of low security of device access authentication in the prior art is solved. Significantly improves network security.

CN115190481BActive Publication Date: 2024-11-26UNIONTECH SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210622363.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-01
Publication Date
2024-11-26
Estimated Expiration
2042-06-01

AI Technical Summary

Technical Problem

The existing equipment access certification technology has low security and is easily cracked, resulting in uncontrolled equipment access to the internal network, and there is a risk of data leakage.

Method used

By collecting unique identifiers in the terminal device, intercepting the EAP reply message, modifying the user name field to the unique identifier plus the requested access timestamp and encrypting, generating a new EAP reply message, and decrypting it in the device authentication device and cached Compare the set of legal equipment timestamps to determine whether the device authentication is successful or failed.

Benefits of technology

It greatly increases the difficulty of device access authentication, improves network security, prevents unauthorized devices from accessing, and effectively prevents playback attacks and forgery requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115190481B_ABST
    Figure CN115190481B_ABST
Patent Text Reader

Abstract

The present invention discloses a data encryption method and device, a device access authentication method, device and system, a computing device and a readable storage medium, which relate to the field of device access authentication technology and can solve the technical problems of low security and easy cracking of current access authentication technology. The device access authentication method includes: modifying the user name field in the first EAP response message sent by the terminal device to new user name data to generate a second EAP response message; converting the second EAP response message into a RADIUS access request message through an intermediate connection device; parsing the message sent by the intermediate connection device through a security server to obtain the new user name data; receiving the new user name data through a device authentication device; decrypting with a key to obtain the contained device unique identifier and request access timestamp, and comparing it with the cached data set to determine whether the device authentication is successful. According to the technical solution of the present invention, replay attacks and forged requests can be prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of device access authentication, and in particular to a data encryption method and device, a device access authentication method, device and system, a computing device and a readable storage medium. Background Art

[0002] To ensure information security, all kinds of organizations will set up identity authentication for their internal networks. When a device connects to the network, it needs to enter the user name and password to authenticate the authentication server first. Only after the authentication is passed can it connect to the internal network. To improve security, authentication generally adopts a two-stage authentication method, such as PEAP+MSCHAPV2 authentication, in which the first stage establishes an encrypted channel, and the second stage transmits key information such as user name and password for authentication.

[0003] When two-stage authentication is used, the username in the first stage can be a fake username, that is, the anonymous user field. Identity authentication can improve security to a certain extent, but people who know the authentication method and password (such as internal employees) can connect their private devices to the internal network in the same way, which will lead to uncontrolled devices accessing the internal network, posing security risks such as data leakage.

[0004] In order to prevent the above situation from happening, the unique identifier of the device (also called sn, which can be a MAC address or a string information customized within the organization) needs to be added to the authentication, and only authorized devices are allowed to connect to the internal network. At this time, two authentications are required to connect to the internal network: 1) identity authentication, authenticating the username and password; 2) device access authentication, authenticating the device sn.

[0005] The device authentication process is as follows: the security client module of the terminal device stores the device's SN information; when the terminal device is connected to the Internet, the security client module intercepts the EAP response (EAP-response) message sent by the terminal, modifies the username field in the message (Identity field, a field in the EAP message used to transmit the username), and mixes the stored SN information into the Identity field.

[0006] The EAP message is converted into a RADIUS message by the wireless access point / access point controller (AP / AC) and sent to the authentication server. At this time, the Identity field in the EAP message corresponds to the User Name field in the RADIUS message.

[0007] The authentication server parses the UserName field: if there is no sn information, it is judged as an illegal device and directly rejected; if there is sn information, the sn information is parsed and sent to the device authentication server. If the sn is illegal, the device authentication server returns the authentication failure and the authentication server refuses device access; if the sn is legal, the authentication server removes the sn information in the UserName field, generates a new RADIUS message, performs authentication or sends it to the next identity authentication server for identity authentication. If the authentication is passed, the device is allowed to access the network, and if the authentication fails, the device is denied access to the network.

[0008] However, the security of this solution is low. For example, device access authentication can be cracked by packet capture. By capturing packets on the network (capturing air packets or having a person with a legitimate device capture packets directly on a legitimate device), after capturing the Identity field, the Identity mixed with sn information is directly used as an anonymous user, and then authenticated with the real user name and password, this technology can be cracked to connect any device to the network. In other words, for a person who knows the user name and password and can pass the identity authentication, any device can be connected to the internal network by cracking it.

[0009] Considering that outsiders who do not know the username and password cannot pass the identity authentication, there is no need for device access authentication; the purpose of device access authentication is mainly to prevent people who know the username and password from connecting illegal devices to the network, but these people can easily crack this technology through packet capture and replay attacks, so there is an urgent need for a more secure and unbreakable device access method. Summary of the invention

[0010] To this end, the present invention provides a data encryption method and apparatus, a device access authentication method, apparatus and system, a computing device and a readable storage medium, in an effort to solve or at least alleviate at least one of the above problems.

[0011] According to a first aspect of the present invention, there is provided a data encryption method, which is executed in a terminal device, and includes: collecting a unique identifier of the terminal device; intercepting a first EAP response message sent by the terminal device; modifying a user name field in the first EAP response message to new user name data, and generating a second EAP response message; the new user name data is the unique identifier plus a request access timestamp, and is encrypted with a key, wherein the request access timestamp indicates the time when the terminal device requests to access the network.

[0012] According to a second aspect of the present invention, there is provided a device access authentication method, which is executed in a device authentication apparatus, and comprises: receiving a RADIUS access request message sent by an intermediate connection apparatus, wherein the RADIUS access request message includes the second EAP response message as described above; parsing the RADIUS access request message to obtain new user name data; decrypting the new user name data with a key to obtain the unique identifier and the access request timestamp as described in the data encryption method as described above; judging whether the time indicated by the access request timestamp is outside a predetermined time period or greater than the current time; if so, returning authentication failure information to a terminal device; otherwise: comparing the unique identifier and the access request timestamp with a data set cached in the device authentication apparatus, wherein the data set is a set of legitimate devices and access timestamps of legitimate devices within a predetermined time period, judging whether the data set contains the unique identifier, and if not, returning authentication failure information to the terminal device; otherwise: judging whether the access request timestamp is within the data set, and if so, returning authentication failure information to the terminal device; otherwise: judging that the device authentication is successful, and storing the unique identifier and the access request timestamp obtained after decryption in the data set.

[0013] Optionally, the device access authentication method further includes: determining whether the time indicated by the timestamp in the data set is within a predetermined time period, and if not, deleting the timestamp that is not within the predetermined time period and its corresponding unique identifier from the data set.

[0014] According to a third aspect of the present invention, a device access authentication method is provided, comprising: collecting a unique identifier of a terminal device through a security client module in a terminal device; intercepting a first EAP response message sent by the terminal device; modifying a user name field in the first EAP response message to new user name data, and generating a second EAP response message; the new user name data is data obtained by adding a request access timestamp to the unique identifier and encrypting it with a key, the request access timestamp indicating the time when the terminal device requested to access the network; converting the second EAP response message into a RADIUS access request message through an intermediate connection device, the RADIUS access request message including the second EAP response message; parsing the RADIUS access request message sent by the intermediate connection device through a security server to obtain the new user name data; receiving the new user name data through a device authentication device User name data; decrypt the new user name data with a key to obtain the unique identifier and the access request timestamp; and determine whether the time represented by the access request timestamp is outside the predetermined time period or greater than the current time; if so, return authentication failure information to the terminal device, otherwise: compare the unique identifier and the access request timestamp with a data set cached in the device authentication device, wherein the data set is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, and determine whether the data set contains the unique identifier. If not, return authentication failure information to the terminal device, otherwise: determine whether the access request timestamp is within the data set. If so, return authentication failure information to the terminal device, otherwise: determine that the device authentication is successful, and store the unique identifier and the access request timestamp obtained after decryption in the data set.

[0015] Optionally, the device access authentication method also includes: when it is determined that the device authentication is successful, sending an authentication success message to a security server through the device authentication device; the security server sends all RADIUS access request messages from the intermediate connection device to the identity authentication service device for identity authentication; the security server obtains the result of the identity authentication and sends the result of the identity authentication to the intermediate connection device.

[0016] According to a fourth aspect of the present invention, a data encryption device is provided, comprising: a collection module, used to collect a unique identifier of the terminal device; an interception module, used to intercept a first EAP response message sent by the terminal device; a modification module, used to modify a user name field in the first EAP response message to new user name data to generate a second EAP response message; the new user name data is the unique identifier plus a request access timestamp, and the data is encrypted with a key, and the request access timestamp indicates the time when the terminal device requests to access the network.

[0017] According to a fifth aspect of the present invention, there is provided a device access authentication device, which is located in the device authentication device, wherein the device authentication device caches the following data set, which is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, and the device access authentication device comprises: a receiving module, which is used to receive the new user name data described in the data encryption method as described above, wherein the new user name data is obtained by parsing a RADIUS access request message sent by an intermediate connection device through a security server, wherein the RADIUS access request message includes the second EAP response message as described above, and wherein the intermediate connection device is located between a terminal device and a security server; and a decryption module, which decrypts the new user name data with a key to obtain the unique identifier and the access request timestamp described in the data encryption method as described above. ; A first judgment module is used to judge whether the time indicated by the request access timestamp is outside the predetermined time period or greater than the current time; if so, an authentication failure message is returned to the terminal device, otherwise a comparison module is triggered; a comparison module is used to compare the unique identifier and the request access timestamp with the data set cached in the device authentication device to judge whether the data set contains the unique identifier, if not, an authentication failure message is returned to the terminal device, otherwise a second judgment module is triggered; a second judgment module is used to judge whether the request access timestamp is within the data set, if so, an authentication failure message is returned to the terminal device, otherwise a saving module is triggered; a saving module judges whether the device authentication is successful, and stores the unique identifier and the request access timestamp obtained after decryption in the data set.

[0018] According to a sixth aspect of the present invention, there is provided a device access authentication system, comprising: a terminal device, comprising a security client module, the security client module comprising a data encryption device, the data encryption device comprising: a collection module, for collecting a unique identifier of the terminal device; an interception module, for intercepting a first EAP response message sent by the terminal device; a modification module, for modifying a user name field in the first EAP response message to new user name data to generate a second EAP response message, the new user name data being the unique identifier plus a request access timestamp, and encrypted with a key, the request access timestamp indicating the time when the terminal device requested to access the network; an intermediate connection device, for converting the second EAP response message into a RADIUS message, the RADIUS message comprising the second EAP response message; a security server, for parsing the RADIUS access request message sent by the intermediate connection device to obtain the new user name data; a device authentication device, for caching the following data sets, the data sets being a legitimate device and a legitimate device A set of access timestamps within a predetermined time period, the device authentication device comprises: a receiving module, used to receive the new user name data; a decryption module, used to decrypt the new user name data with a key to obtain the unique identifier and the request access timestamp; a first judgment module, used to judge whether the time represented by the request access timestamp is outside the predetermined time period or greater than the current time; if so, return authentication failure information to the terminal device, otherwise trigger the comparison module; the comparison module, used to compare the unique identifier and the request access timestamp with the data set cached in the device authentication device, to judge whether the data set contains the unique identifier, if not, return authentication failure information to the terminal device, otherwise trigger the second judgment module; the second judgment module, used to judge whether the request access timestamp is in the data set, if so, return authentication failure information to the terminal device, otherwise trigger the saving module; the saving module, judges that the device authentication is successful, and stores the unique identifier and the request access timestamp obtained after decryption in the data set.

[0019] According to a seventh aspect of the present invention, there is provided a computing device, comprising: at least one processor and a memory storing program instructions; when the program instructions are read and executed by the processor, the computing device executes the data encryption method as described above or the device access authentication method as described above.

[0020] According to an eighth aspect of the present invention, there is provided a readable storage medium storing program instructions, which, when read and executed by a computing device, enables the computing device to execute the data encryption method or device access authentication method as described above.

[0021] According to the technical solution of the present invention, the problem of low security of existing device encryption technology and device access authentication technology is overcome, the difficulty of cracking is greatly increased, and the security of the network is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.

[0023] Figure 1 The overall architecture of the device access authentication method according to an embodiment of the present invention is shown;

[0024] Figure 2 A flow chart of a data encryption method according to an embodiment of the present invention is shown;

[0025] Figure 3 A flow chart of a device access authentication method according to an embodiment of the present invention is shown;

[0026] Figure 4 A flow chart of a device access authentication method according to an embodiment of the present invention is shown;

[0027] Figure 5 A schematic structural block diagram of a data encryption device according to an embodiment of the present invention is shown;

[0028] Figure 6 A schematic structural block diagram of a device access authentication apparatus according to an embodiment of the present invention is shown;

[0029] Figure 7 A schematic structural block diagram of a device access authentication system according to an embodiment of the present invention is shown;

[0030] Figure 8 A schematic diagram of a computing device according to one embodiment of the present invention is shown. DETAILED DESCRIPTION

[0031] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0032] Before describing the data encryption method and device access authentication method according to the implementation mode of the present invention, the implementation background thereof is first introduced. The implementation mode of the present invention adopts the general architecture of EAP (Extensible Authentication Protocol, which is a collection of a series of authentication methods) to transmit the actual authentication protocol, among which PEAP+MSCHAP2, TLS, TTLS, etc. are used for wireless authentication and have good security. The implementation mode of the present invention adopts PEAP+MSCHAP2 as an architecture example for the convenience of description.

[0033] From the user's perspective, the PEAP+MSCHAP2 authentication process can include two stages:

[0034] The first phase is authentication initialization. In this phase, the user, wireless access point, and server have not yet negotiated an authentication method. The username passed in this phase is in plain text. At the end of the first phase, the user and server have successfully negotiated to use PEAP for authentication.

[0035] The second stage is the authentication process. All data transmitted in this stage is encrypted by the encryption algorithm negotiated by PEAP. The authentication method used in this stage can be MSCHAP2 (just as an example). The characteristic of MSCHAP2 authentication is that the password is not transmitted, the username + password + random number is hashed, and then the hash value is transmitted, which together with the PEAP TLS channel constitutes double protection.

[0036] PEAP authentication itself is to negotiate encryption parameters in plain text in the first stage; then establish an encrypted channel, and finally perform authentication in the encrypted channel. The encryption method and device access authentication method according to the embodiment of the present invention are both performed in the first stage, and identity authentication is performed in the second stage.

[0037] Figure 1 The overall architecture diagram of the method according to one embodiment of the present invention is shown. The terminal device 110 may be a wireless terminal device (such as a mobile phone, a Linux device, a Windows device, etc.). Figure 1 The intermediate connection device 120 shown can be a wireless access point (AP) device of a wireless network. The terminal device is equipped with a wireless network card and connected to the wireless access point (AP) device of the wireless network. If there are multiple APs, an access controller (AC) can be equipped, and enterprise-level WPA2 / WPA3 authentication is set on the AC, and its authentication server is pointed to the security server. The terminal device can also be a wired terminal device. In this case, Figure 1 The intermediate connection device shown may be a switch.

[0038] The terminal device 110 is equipped with a security client module, which can generate / collect the unique identifier message of the device (also called sn, which can be a MAC address or a string information customized within the organization). The security client module or the terminal device stores a key for encryption. The security client module modifies the Identity field in the EAP response (EAP-response) message sent by the wireless device to sn+data encrypted with a key for the request access timestamp. The EAP response (EAP-response) message is a response message made by the terminal device in response to the request message sent by the AP or the switch. The request access timestamp indicates the time when the terminal device requests to access the network.

[0039] The EAP-response message sent by the terminal device 110 is converted into a RADIUS message through the intermediate connection device 120. The RADIUS message is an access request message, wherein the Identity field in the EAP-response message corresponds to the Username field in the RADIUS access request message. RADIUS is a widely used AAA protocol, and most of the enterprise-level secure wireless network authentication currently uses this protocol.

[0040] The security server 130 is a RADIUS server. The security server 130 parses the first RADIUS access request message in the PEAP authentication process. A pointing module (rest module) is provided inside the security server to point to the device authentication device. The pointing module sends the user name (Username) field in the first RADIUS access request message in a PEAP authentication process to the device authentication device for device authentication.

[0041] The device authentication device 140 can be a device authentication server located outside the security server, or it can be a device authentication module integrated in the security server. A key is stored in the device authentication device 140, and the key can be used to decrypt the data encrypted by the security client module with the key. A cache is provided in the device authentication device, in which a data set {sn, a timestamp set of authentication performed by this device within a predetermined time period} of a legitimate device is stored. If the device authentication device returns a failure, a reject message is directly returned to the intermediate connection device to reject the connection. If the device authentication device returns a success, a subsequent identity authentication process is performed. The key stored in the device authentication device is the same as the key encrypted by the security client, and is set in advance in the terminal device and the device authentication device for encryption / decryption when connected to the network. In addition, the key can also be a pair of public key (set in the terminal device) and private key (set in the device authentication device).

[0042] The security server 130 is also provided with a proxy module pointing to the identity authentication device 150. After passing the device authentication, it directly forwards all received RADIUS messages (i.e., RADIUS access request messages converted from all EAP response messages sent by the terminal device, including the first RADIUS access request message mentioned above) to the identity authentication device 150 for identity authentication, and forwards the message of the identity authentication device to the intermediate connection device 120. The identity authentication device is a RADIUS server. The identity authentication device stores the user's username and password data, and authenticates the username and password according to the PEAP protocol. Similar to the device authentication device, the identity authentication device can be an identity authentication server independent of the security server, or integrated into the security server.

[0043] In summary, according to the embodiment of the present invention, the Identity field in the EAP response message sent by the terminal device is modified to the encrypted data of the device's unique identifier (sn) + the access request timestamp, and the security server parses the RADIUS access request message of the first phase authentication, and sends its username field (username field, which is consistent with the above-mentioned Identity field content) to the device authentication device for device authentication. Among them, the device authentication device decrypts the username field, obtains sn and timestamp, and compares sn and timestamp to implement a wireless device access authentication scheme that prevents replay attacks and forged requests.

[0044] The above is a description of the overall architecture of the technical solution according to the embodiment of the present invention. The following describes the specific process of the data encryption method and the device access authentication method according to the embodiment of the present invention in conjunction with the accompanying drawings. Figure 2 Describes a data encryption method performed by a terminal device, the method being Figure 1The secure client module located in the terminal device is executed as shown. Figure 2 As shown, the method includes:

[0045] S210, collecting a unique identifier of the terminal device through a security client module in the terminal device. The unique identifier may be a MAC address or a string of information customized within an organization, such as a MAC address 00e070db4ecf.

[0046] S220: intercepting a first EAP response message sent by the terminal device.

[0047] S230: Modify the user name field in the first EAP response message to new user name data to generate a second EAP response message, where the new user name data is data obtained by adding a request access timestamp to the unique identifier and encrypting the data with a key.

[0048] The username field is the Identity field in the EAP response message. The timestamp is automatically generated by the terminal device and retrieved by the security client. The timestamp can be a number, such as 20:00 on April 1, 2022, the timestamp can be 1648814400. Then use a special tag such as "uosauth" to concatenate sn and the timestamp to get: 00e070db4ecfuosauth1648814400. Then use the key to encrypt the final value. The key is stored in the security client module or the security area inside the terminal device, which can be a string.

[0049] In specific practice, the security client module can be a network authentication module (that is, there is source code, and the network authentication module can be directly modified, such as the wap_supplicant program on a Linux device), or a kernel driver module (for devices that do not have network authentication module source code, such as Windows devices, the network packets to be sent by the terminal device are intercepted at the driver layer).

[0050] Reference below Figure 3 The specific process of the device access authentication method according to the embodiment of the present invention is described. The device access authentication method adopts Figure 2 The data encrypted by the method shown is used for device access authentication, and Figure 1The device authentication device shown in the figure is executed. The device authentication device receives the new user name data obtained after the security server parses the RADIUS access request message, decrypts the relevant fields with the key, and obtains sn+timestamp. Then, the device authentication device determines whether the event represented by the timestamp is a time outside the predetermined time period or greater than the current time. Among them, the current time is obtained from the server, and theoretically should be greater than the timestamp obtained by decryption, because it takes time for data to be transmitted on the network. If it is a time outside the predetermined time period or greater than the current time, it means that the request is illegal, and the device authentication device directly returns authentication failure. The predetermined time period can be, for example, 5 minutes, or other time can be set according to business needs. Then use sn to query the cache of the device authentication device, and the data in the cache is {sn, authentication timestamp set within the predetermined time period}. The timestamp set can be empty, indicating that it has not been authenticated within the predetermined time period. If no sn data matching the sn obtained by decryption is found, it means that the device is illegal, and the device authentication device directly returns authentication failure. If the sn data is found, it is determined whether the timestamp obtained by decryption is in the queried timestamp set. If it is, it means that the device has been authenticated at that time, and this access request is a replay attack, and the device authentication device directly returns failure. Otherwise, the device authentication is judged to be successful, and the sn+timestamp obtained by decryption is added to the cache.

[0051] like Figure 3 As shown, the method includes:

[0052] S310, receiving the above-mentioned new user name data, wherein the new user name data is obtained by the security server parsing a RADIUS access request message sent by an intermediate connection device, wherein the RADIUS access request message includes the above-mentioned second EAP response message, and the intermediate connection device is located between the terminal device and the security server.

[0053] S320: decrypt the new user name data using a key to obtain the unique identifier and the access request timestamp.

[0054] S330, determining whether the time indicated by the access request timestamp is outside a predetermined time period or greater than the current time;

[0055] If yes, return authentication failure information to the terminal device, otherwise:

[0056] S340, comparing the unique identifier and the access request timestamp with a data set cached in the device authentication apparatus, wherein the data set is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, and determining whether the data set contains the unique identifier. If not, returning authentication failure information to the terminal device; otherwise:

[0057] S350, determining whether the requested access timestamp is within the data set,

[0058] If yes, return authentication failure information to the terminal device, otherwise:

[0059] S360, determining that the device authentication by the device authentication apparatus is successful, and storing the unique identifier and the access request timestamp obtained after decryption into the data set.

[0060] In addition, the device authentication device can update the cache regularly and delete expired data. This function can be automatically realized by setting the expiration time of the data through the function module inside the device authentication device. Figure 3 The method may further include: determining whether the time represented by the timestamp in the data set is within a predetermined time period, and if not, deleting the timestamp and its corresponding unique identifier that are not within the predetermined time period from the data set. In the embodiment of the present invention, the predetermined time period may be set to, for example, 5 minutes, or may be set to other time periods according to the size of the cache.

[0061] According to an embodiment of the present invention, a device access authentication method is also provided. The device access authentication method includes the entire process from the security client module encrypting the device unique identifier and the timestamp to the device authentication device performing authentication services. Figure 4 A schematic flow chart of the method is shown in FIG. Figure 4 As shown, the method includes:

[0062] S410, collecting a unique identifier of the terminal device through a security client module in the terminal device; intercepting a first EAP response message sent by the terminal device; modifying a user name field in the first EAP response message to new user name data to obtain a second EAP response message, wherein the new user name data is data obtained by adding a request access timestamp to the unique identifier and encrypting the data with a key;

[0063] S420, converting the second EAP response message into a RADIUS access request message through an intermediate connection device, where the RADIUS message includes the second EAP response message;

[0064] S430, parsing the RADIUS access request message sent by the intermediate connection device through the security server to obtain the new user name data;

[0065] S440, receiving the new user name data through the device authentication device; decrypting the new user name data with a key to obtain the unique identifier and the access request timestamp;

[0066] S450, determining whether the time indicated by the access request timestamp is outside a predetermined time period or greater than the current time;

[0067] If yes, return authentication failure information to the terminal device, otherwise:

[0068] S460, comparing the unique identifier and the access request timestamp with a data set cached in the device authentication apparatus, wherein the data set is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, and determining whether the data set contains the unique identifier.

[0069] If not, return authentication failure information to the terminal device, otherwise:

[0070] S470, determining whether the requested access timestamp is within the data set,

[0071] If yes, return authentication failure information to the terminal device, otherwise:

[0072] S480, determining that the device authentication by the device authentication apparatus is successful, and storing the unique identifier and the access request timestamp obtained after decryption into the data set.

[0073] According to the technical solution of the implementation mode of the present invention, the security of wireless device access authentication is greatly improved. Specifically, the purpose of device access authentication is to check the device sn when connecting to the network and deny unauthorized and illegal devices access. In terms of security, it is necessary to consider that users crack this solution and use private devices to access the network. There are several possible cracking situations: 1. Replay attack, in which the user obtains the last data by capturing packets and then connects to the network again. According to the technical solution of the present invention, the sn and timestamp are mixed and then encrypted, and the device authentication device contains a cache of timestamps, so the data captured by the user through packet capture cannot be authenticated again. 2. Forged request, in which the sn of the known device is then forged on the private device to request to connect to the network. According to the technical solution of the present invention, the sn and timestamp are encrypted and transmitted, and the request cannot be forged if the encryption algorithm cannot be cracked.

[0074] Figure 4 The method shown may also include: when it is determined that the device authentication of the device authentication device is successful, sending a message of successful authentication to a security server through the device authentication device; the security server sends all RADIUS messages from the intermediate connection device (i.e., RADIUS messages converted from all EAP response messages sent by the terminal device) to the identity authentication service device for identity authentication; and sending the result of the identity authentication to the intermediate connection device.

[0075] The identity authentication process can adopt any existing identity authentication method as long as it complies with the RADIUS protocol and can authenticate the user name and password.

[0076] Among them, according to the PEAP protocol described above, in the first stage (i.e., the encryption channel establishment process), the data is transmitted in plain text, and the user name can be an anonymous user field; in the second stage, the encryption channel has been established, and the data is transmitted in the encryption channel, and the real user name can be transmitted at this time. In other words, the modified Identity field is sent to the identity authentication server and is understood as an anonymous user field according to the protocol. Under the framework of the PEAP authentication method, although the UserName field in the RADIUS access request (access-request) message in the first and second stages of the authentication process is different, the modified Identity field can be understood as an anonymous user field, so that the modification of the Identity field by the security client module will not affect the identity authentication; as long as the real user name and password are correct, the authentication can still be passed.

[0077] The solution mentioned in the background art does not utilize the feature of anonymous users. The solution performs subsequent authentication after the security server restores the Identity field, and does not perform encryption and device authentication technology in the technical background of two-stage authentication.

[0078] According to an embodiment of the present invention, a data encryption device is also provided, located at Figure 2 In the secure client module shown in Figure 5 As shown, the device comprises:

[0079] The collection module 510 is used to collect the unique identifier of the terminal device.

[0080] The interception module 520 intercepts the first EAP response message sent by the terminal device.

[0081] The modification module 530 is configured to modify the user name field in the first EAP response message to new user name data to generate a second EAP response message, wherein the new user name data is data obtained by adding a request access timestamp to the unique identifier and encrypting the data with a key.

[0082] According to an embodiment of the present invention, there is also provided a device access authentication device, located at Figure 1 In the device authentication device shown. Figure 6 As shown, the device access authentication device includes:

[0083] The receiving module 610 is used to receive the above-mentioned new user name data, where the new user name data is obtained by the security server parsing the RADIUS access request message sent by the intermediate connection device, where the RADIUS access request message includes the above-mentioned second EAP response message, and the intermediate connection device is located between the terminal device and the security server.

[0084] The decryption module 620 decrypts the new user name data using a key to obtain the unique identifier and the access request timestamp.

[0085] A first determination module 630 determines whether the time indicated by the access request timestamp is outside a predetermined time period or greater than the current time;

[0086] If yes, return authentication failure information to the terminal device, otherwise trigger the comparison module;

[0087] The comparison module 640 compares the unique identifier and the access request timestamp with a data set cached in the device authentication apparatus, wherein the data set is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, and determines whether the data set contains the unique identifier. If not, an authentication failure message is returned to the terminal device, otherwise a second judgment module is triggered;

[0088] The second judgment module 650 judges whether the requested access timestamp is within the data set.

[0089] If yes, the authentication failure information is returned to the terminal device, otherwise the saving module is triggered.

[0090] The storage module 660 determines whether the device authentication by the device authentication apparatus is successful, and stores the unique identifier and the access request timestamp obtained after decryption into the data set.

[0091] In addition, the device access authentication apparatus may include an updating module for determining whether the time indicated by the timestamp in the data set is within a predetermined time period, and if not, deleting the timestamp and its corresponding unique identifier that are not within the predetermined time period from the data set.

[0092] According to an embodiment of the present invention, a device access authentication system is also provided. The system executes the entire process including data encryption and device access authentication services. Figure 7 As shown, the system includes:

[0093] The terminal device 710 includes a security client module, the security client module includes a data encryption device, and the data encryption device includes: a collection module 7110, used to collect a unique identifier of the terminal device; an interception module 7120, intercepting a first EAP response message sent by the terminal device; a modification module 7130, used to modify the user name field in the first EAP response message to new user name data to generate a second EAP response message, wherein the new user name data is the unique identifier plus a request access timestamp and encrypted with a key;

[0094] The intermediate connection device 720 converts the second EAP response message into a RADIUS message, where the RADIUS message includes the second EAP response message;

[0095] The security server 730 parses the RADIUS access request message sent by the intermediate connection device to obtain the new user name data;

[0096] The device authentication device 740 is integrated in the security server or located outside the security server, and includes the following data set, which is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, and the device authentication device 740 includes: a receiving module 7410, which is used to receive the above-mentioned new user name data. A decryption module 7420, which decrypts the new user name data with a key to obtain the above-mentioned unique identifier and the access request timestamp. The first judgment module 7430 judges whether the time indicated by the access request timestamp is outside the predetermined time period or greater than the current time; if so, returns authentication failure information to the terminal device, otherwise triggers the comparison module; the comparison module 7440 compares the unique identifier and the access request timestamp with the data set cached in the device authentication device, wherein the data set is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, judges whether the data set contains the unique identifier, if not, returns authentication failure information to the terminal device, otherwise triggers the second judgment module; the second judgment module 7450 judges whether the access request timestamp is within the data set, if so, returns authentication failure information to the terminal device, otherwise triggers the saving module. The saving module 7460 judges whether the device authentication of the device authentication device is successful, and stores the unique identifier and the access request timestamp obtained after decryption in the data set.

[0097] The device access authentication system may further include: an identity authentication device. When the device authentication is successful, the security server receives a message of successful device authentication, sends all RADIUS access request messages from the intermediate connection device to the identity authentication device to perform identity authentication, and forwards the result of the identity authentication to the intermediate connection device.

[0098] The data encryption method and device access authentication method of the present invention can be executed in a computing device. The computing device can be any device with storage and computing capabilities, which can be implemented as a server, workstation, etc., or as a personal computer such as a desktop computer, a notebook computer, or as a terminal device such as a mobile phone, a tablet computer, a smart wearable device, an Internet of Things device, but is not limited thereto.

[0099] Figure 8FIG. 1 is a schematic diagram of a computing device according to an embodiment of the present invention. It should be noted that: Figure 8 The computing device shown is only an example. In practice, the computing device used to implement the data encryption method and the device access authentication method of the present invention can be any type of device, and its hardware configuration can be different from the above. Figure 8 The computing device shown is the same as Figure 8 In practice, the computing device used to implement the data encryption method and device access authentication method of the present invention can be different from the computing device shown. Figure 8 The hardware components of the computing device shown are increased or deleted, and the present invention does not limit the specific hardware configuration of the computing device.

[0100] like Figure 8 As shown, the device may include: a processor 810, a memory 820, an input / output interface 830, a communication interface 840 and a bus 850. The processor 810, the memory 820, the input / output interface 830 and the communication interface 840 are connected to each other in communication within the device through the bus 850.

[0101] The processor 810 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0102] The memory 820 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 820 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 820 and are called and executed by the processor 810.

[0103] The input / output interface 830 is used to connect the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0104] The communication interface 840 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0105] The bus 850 comprises a pathway that transmits information between the various components of the device (eg, the processor 810, the memory 820, the input / output interface 830, and the communication interface 840).

[0106] It should be noted that, although the above device only shows the processor 810, the memory 820, the input / output interface 830, the communication interface 840 and the bus 850, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0107] The embodiment of the present invention also provides a non-transitory readable storage medium, which stores instructions, and the instructions are used to make the computing device perform a method according to an embodiment of the present invention. The readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be a computer-readable instruction, a data structure, a module of a program, or other data. Examples of readable storage media include, but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, tape disk storage or other magnetic storage device or any other non-transitory readable storage medium.

[0108] In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with examples of the present invention. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to implement the content of the present invention described herein, and the above description of specific languages ​​is for disclosing preferred embodiments of the present invention.

[0109] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0110] Similarly, it should be understood that in order to simplify the present disclosure and help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: the claimed invention requires more features than the features clearly stated in each claim. Those skilled in the art should understand that the modules or units or components of the devices in the examples disclosed herein can be arranged in the devices described in the embodiment, or alternatively can be located in one or more devices different from the devices in the example. The modules in the aforementioned examples can be combined into one module or can be divided into multiple submodules in addition.

[0111] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0112] In addition, it will be appreciated by those skilled in the art that although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of features of different embodiments is meant to be within the scope of the present invention and to form different embodiments. In addition, some of the embodiments described herein are described as a combination of methods or method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices that are used to implement the functions performed by the elements for the purpose of implementing the invention.

[0113] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.

[0114] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is primarily selected for readability and instructional purposes, rather than for the purpose of explaining or limiting the subject matter of the present invention.

Claims

1. A device access authentication method, executed in a device authentication device, comprising: receiving a RADIUS access request message sent by the intermediate connection device, wherein the RADIUS access request message includes a second EAP response message generated in the terminal device in the following manner: collecting a unique identifier of the terminal device, intercepting a first EAP response message sent by the terminal device, and modifying a user name field in the first EAP response message to new user name data to generate a second EAP response message, wherein the new user name data is data obtained by adding a request access timestamp to the unique identifier and encrypting the data with a key, and the request access timestamp indicates the time when the terminal device requests to access the network; Parsing the RADIUS access request message to obtain new user name data; decrypting the new username data using a key to obtain the unique identifier and a request access timestamp; Determining whether the time indicated by the access request timestamp is outside a predetermined time period or greater than the current time; If yes, return authentication failure information to the terminal device, otherwise: Compare the unique identifier and the access request timestamp with a data set cached in the device authentication apparatus, wherein the data set is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, and determine whether the data set contains the unique identifier. If not, return authentication failure information to the terminal device. Otherwise: Determine whether the requested access timestamp is within the data set, If yes, return authentication failure information to the terminal device, otherwise: It is determined that the device authentication is successful, and the unique identifier and the access request timestamp obtained after decryption are stored in the data set.

2. The device access authentication method according to claim 1, further comprising: It is determined whether the time indicated by the timestamp in the data set is within a predetermined time period. If not, the timestamp that is not within the predetermined time period and its corresponding unique identifier are deleted from the data set.

3. A device access authentication method, comprising: Collecting a unique identifier of the terminal device through a secure client module in the terminal device; Intercepting a first EAP response message sent by the terminal device; Modify the username field in the first EAP response message to new username data, and generate a second EAP response message; the new username data is the unique identifier plus the access request timestamp, and is encrypted with a key, and the access request timestamp indicates the time when the terminal device requests to access the network; converting the second EAP response message into a RADIUS access request message through an intermediate connection device, wherein the RADIUS access request message includes the second EAP response message; The security server parses the RADIUS access request message sent by the intermediate connection device to obtain the new user name data; Receiving the new user name data through the device authentication device; Decrypt the new user name data with a key to obtain the unique identifier and the access request timestamp; and determine whether the time indicated by the access request timestamp is outside a predetermined time period or greater than the current time; If yes, return authentication failure information to the terminal device, otherwise: compare the unique identifier and the access request timestamp with the data set cached in the device authentication device, wherein the data set is a collection of legitimate devices and access timestamps of legitimate devices within a predetermined time period, and determine whether the data set contains the unique identifier. If not, return authentication failure information to the terminal device, otherwise: determine whether the access request timestamp is within the data set. If so, return authentication failure information to the terminal device, otherwise: determine whether the device authentication is successful, and store the unique identifier and access request timestamp obtained after decryption in the data set.

4. The device access authentication method according to claim 3, further comprising: When it is determined that the device authentication is successful, a message of successful authentication is sent to the security server through the device authentication device; The security server sends all RADIUS access request messages from the intermediate connection device to the identity authentication service device for identity authentication; The security server obtains the result of the identity authentication and sends the result of the identity authentication to the intermediate connection device.

5. A device access authentication device, located in a device authentication device, wherein the device authentication device caches the following data set, wherein the data set is a collection of legitimate devices and access timestamps of the legitimate devices within a predetermined time period, and the device access authentication device comprises: a receiving module, configured to receive new user name data, wherein the new user name data is obtained by parsing a RADIUS access request message sent by an intermediate connection device through a security server, wherein the intermediate connection device is located between a terminal device and a security server, wherein the RADIUS access request message includes a second EAP response message generated in the terminal device in the following manner: collecting a unique identifier of the terminal device, intercepting a first EAP response message sent by the terminal device, and modifying a user name field in the first EAP response message to the new user name data to generate a second EAP response message, wherein the new user name data is data obtained by adding a request access timestamp to the unique identifier and encrypting the data with a key, wherein the request access timestamp indicates the time when the terminal device requests to access the network; A decryption module, decrypting the new user name data with a key to obtain the unique identifier and the access request timestamp; A first judgment module is used to judge whether the time indicated by the access request timestamp is outside the predetermined time period or greater than the current time; if so, return authentication failure information to the terminal device, otherwise trigger the comparison module; a comparison module, configured to compare the unique identifier and the access request timestamp with the data set cached in the device authentication apparatus, to determine whether the data set contains the unique identifier, and if not, to return authentication failure information to the terminal device, otherwise triggering a second judgment module; The second judgment module is used to judge whether the requested access timestamp is within the data set. If yes, return authentication failure information to the terminal device, otherwise trigger the saving module; The storage module determines whether the device authentication is successful, and stores the unique identifier and the access request timestamp obtained after decryption in the data set.

6. A device access authentication system, comprising: The terminal device includes a security client module, wherein the security client module includes a data encryption device, and the data encryption device includes: A collection module, used for collecting a unique identifier of the terminal device; An interception module, used to intercept a first EAP response message sent by the terminal device; a modification module, configured to modify the user name field in the first EAP response message to new user name data to generate a second EAP response message, wherein the new user name data is data obtained by adding a request access timestamp to the unique identifier and encrypting the data with a key, wherein the request access timestamp indicates the time when the terminal device requests to access the network; The intermediate connection device converts the second EAP response message into a RADIUS message, where the RADIUS message includes the second EAP response message; The security server parses the RADIUS access request message sent by the intermediate connection device to obtain the new user name data; The device authentication device caches the following data set, wherein the data set is a collection of legitimate devices and access timestamps of the legitimate devices within a predetermined time period, and the device authentication device includes: A receiving module, used for receiving the new user name data; A decryption module, used for decrypting the new user name data with a key to obtain the unique identifier and the access request timestamp; A first judgment module is used to judge whether the time indicated by the access request timestamp is outside the predetermined time period or greater than the current time; if so, return authentication failure information to the terminal device, otherwise trigger the comparison module; a comparison module, configured to compare the unique identifier and the access request timestamp with the data set cached in the device authentication apparatus, to determine whether the data set contains the unique identifier, and if not, to return authentication failure information to the terminal device, otherwise triggering a second judgment module; A second judgment module is used to judge whether the requested access timestamp is within the data set, and if so, return authentication failure information to the terminal device, otherwise trigger a saving module; The storage module determines whether the device authentication is successful, and stores the unique identifier and the access request timestamp obtained after decryption in the data set.

7. A computing device comprising: at least one processor and a memory storing program instructions; When the program instructions are read and executed by the processor, the computing device executes the device access authentication method according to any one of claims 1 to 4.

8. A readable storage medium storing program instructions, when the program instructions are read and executed by a computing device, the computing device executes the device access authentication method according to any one of claims 1 to 4.