Distribution network authentication method and system for star flash equipment, terminal and storage medium
By performing key distribution, device authentication and key reset in the distribution network authentication of the Starflash module device, the problem of low security in the distribution network authentication in the prior art is solved, and higher security and key management efficiency are achieved.
Patent Information
- Application Number
- CN202411521673.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, devices using the Star Flash module lack encryption processing for network authentication, resulting in low security and the inability to reset the authentication key.
By obtaining the distribution network authentication request for the distribution network master device, obtain the distribution network authentication key, and key distribution to the target distribution network slave device. Then, perform device authentication. If the authentication fails, reset the authentication key of the configuration network and authenticate and save it again.
Improve the security between the distribution network master and distribution network slave devices, ensuring the security and resetability of the authentication key.
Smart Images

Figure CN119562253A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device network configuration, and in particular to a network configuration authentication method, system, terminal and computer-readable storage medium for a Star Flash device. Background Art
[0002] As a new generation of wireless short-range communication technology, Star Flash has the advantages of low latency, precise synchronization, and high reliability compared to the currently widely used Bluetooth and WiFi. Star Flash can bring users lower energy consumption, faster speed, lower latency, more stable connection, wider coverage, and greater networking capabilities. The advantages of Star Flash technology give it broad application prospects in many fields. In the field of smart home, Star Flash technology can achieve efficient interconnection between smart home devices, providing users with a more convenient and intelligent life experience. In the field of smart manufacturing, Star Flash technology can realize real-time data communication between industrial equipment, providing support for the automation and intelligence of industrial production. In the field of smart cars, Star Flash technology can achieve high-speed, low-latency communication between in-vehicle devices, providing a foundation for applications such as smart driving and Internet of Vehicles.
[0003] At present, when devices using the Star Flash module are performing network configuration authentication, key authentication information is not encrypted, resulting in low security of the device during network configuration authentication, and the authentication key cannot be reset.
[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide a network configuration authentication method, system, terminal and storage medium for Star Flash equipment, aiming to solve the problem in the prior art that when devices using Star Flash modules perform network configuration authentication, key authentication information is not encrypted, resulting in low security of the equipment during network configuration authentication and inability to reset the authentication key.
[0006] To achieve the above object, the present invention provides a network configuration authentication method for a Star Flash device, the network configuration authentication method for the Star Flash device comprising the following steps:
[0007] Obtaining a network configuration authentication request from a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing keys to a target network configuration slave device according to the network configuration authentication key;
[0008] Obtaining a key distribution result of the target network configuration slave device, and performing device authentication on the network configuration master device and the target network configuration slave device according to the key distribution result to obtain an authentication result;
[0009] If the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key, and the network configuration master device and the target network configuration slave device are authenticated again according to the reset key to obtain authentication information, and the authentication information is saved.
[0010] Optionally, the network configuration authentication method of the Star Flash device, wherein the obtaining of the network configuration authentication request of the network configuration master device, obtaining the network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing the key to the target network configuration slave device according to the network configuration authentication key, further comprises:
[0011] Obtain the list of devices to be configured, perform device query on the list of devices to be configured according to the master device of the network configuration, and obtain the slave device ID information;
[0012] The key distribution information of the corresponding network configuration slave device is obtained according to the slave device ID information, and the target network configuration slave device is obtained according to the key distribution information, wherein the target network configuration slave device is a network configuration slave device to which the key is not distributed.
[0013] Optionally, the network configuration authentication method of the Star Flash device, wherein the obtaining of the network configuration authentication request of the network configuration master device, obtaining the network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing the key to the target network configuration slave device according to the network configuration authentication key, specifically includes:
[0014] Obtain a network configuration authentication request from a network configuration master device, obtain a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and send a key distribution command code of the network configuration authentication key to the target network configuration slave device;
[0015] Obtaining a first challenge code and a slave device public key of the target network configuration slave device, and sending the first challenge code and the slave device public key to the network configuration master device, wherein the first challenge code is generated by the target network configuration slave device according to the key distribution command code;
[0016] Encrypting the first challenge code and the network configuration authentication key according to the slave device public key to obtain ciphertext information, and sending the ciphertext information to the target network configuration slave device;
[0017] Obtain a decryption result of the target network configuration slave device, wherein the decryption result is obtained by the target network configuration slave device decrypting the ciphertext information.
[0018] Optionally, the network configuration authentication method of the Star Flash device, wherein the obtaining of the network configuration authentication request of the network configuration master device, obtaining the network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing the key to the target network configuration slave device according to the network configuration authentication key, further comprises:
[0019] Obtaining a second challenge code of the decryption result, and judging whether the network configuration authentication key of the network configuration master device is successfully distributed according to the second challenge code;
[0020] If the second challenge code is consistent with the first challenge code, it is determined that the network distribution authentication key of the network distribution master device is successfully distributed, and a key distribution return code is generated according to the decryption result, and the key distribution return code is sent to the network distribution master device;
[0021] If the second challenge code is inconsistent with the first challenge code, it is determined that the network configuration authentication key distribution of the network configuration master device has failed, and an error code is generated according to the decryption result, and the error code is sent to the network configuration master device.
[0022] Optionally, the network configuration authentication method of the Star Flash device, wherein the step of obtaining the key distribution result of the target network configuration slave device, and performing device authentication on the network configuration master device and the target network configuration slave device according to the key distribution result to obtain the authentication result, specifically includes:
[0023] Obtaining the key distribution result of the target network configuration slave device, and if the key distribution result is that the key distribution is successful, obtaining the network configuration authentication command code of the network configuration master device according to the key distribution result, and sending the network configuration authentication command code to the target network configuration slave device;
[0024] Obtaining a third challenge code of the target network configuration slave device, and sending the third challenge code to the network configuration master device, wherein the third challenge code is generated by the target network configuration slave device inquiring the corresponding authentication key according to the network configuration authentication command code, and calculating the first hash value of the authentication key according to the first hash value;
[0025] Obtain a second hash value of the network distribution master device, and perform verification processing on the second hash value and the first hash value of the third challenge code to obtain a verification result, wherein the second hash value is obtained by the network distribution master device querying the authentication key and the data key of the target network distribution slave device, and calculating the authentication key and the data key;
[0026] If the verification result is that the second hash value is equal to the first hash value, then the authentication result is determined to be that the network configuration authentication of the network configuration master device and the target network configuration slave device is passed;
[0027] If the verification result is that the second hash value is not equal to the first hash value, the authentication result is determined to be that the network configuration authentication of the network configuration master device and the target network configuration slave device fails.
[0028] Optionally, the network configuration authentication method of the Star Flash device, wherein if the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key, and then further includes:
[0029] Obtaining a key reset command code of the network distribution master device, and sending the key reset command code to the target network distribution slave device;
[0030] Obtaining a fourth challenge code and a slave device public key of the target network configuration slave device, and sending the fourth challenge code and the slave device public key to the network configuration master device, wherein the fourth challenge code is generated by the target network configuration slave device according to the key reset command code;
[0031] Encrypting the fourth challenge code and the reset key according to the slave device public key to obtain target ciphertext information, and sending the target ciphertext information to the target network distribution slave device;
[0032] Obtain a target decryption result of the target network configuration slave device. If the target challenge code of the target decryption result is consistent with the fourth challenge code, determine that the target network configuration slave device successfully responds to the key reset, wherein the decryption result is obtained by the target network configuration slave device decrypting the target ciphertext information.
[0033] Optionally, the network distribution authentication method of the Star Flash device, wherein the re-authentication of the network distribution master device and the target network distribution slave device according to the reset key to obtain authentication information and save the authentication information specifically includes:
[0034] When the target network distribution slave device successfully responds to the key reset, the network distribution master device and the target network distribution slave device are authenticated again according to the reset key to obtain authentication information;
[0035] The authentication information is converted into a form to obtain the authentication information in a file form, and the authentication information in the file form is encrypted and stored using an encryption algorithm.
[0036] Optionally, in the network distribution authentication method of the Star Flash device, the network distribution authentication system of the Star Flash device comprises:
[0037] A key distribution module is used to obtain a network configuration authentication request from a network configuration master device, obtain a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distribute keys to a target network configuration slave device according to the network configuration authentication key;
[0038] A device authentication module is used to obtain a key distribution result of the target network distribution slave device, and perform device authentication on the network distribution master device and the target network distribution slave device according to the key distribution result to obtain an authentication result;
[0039] The key reset module is used to reset the network configuration authentication key if the authentication result is that the network configuration authentication fails, obtain a reset key, re-authenticate the network configuration master device and the target network configuration slave device according to the reset key, obtain authentication information, and save the authentication information.
[0040] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a network configuration authentication program of a Star Flash device stored in the memory and executable on the processor, and when the network configuration authentication program of the Star Flash device is executed by the processor, the steps of the network configuration authentication method of the Star Flash device as described above are implemented.
[0041] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a network configuration authentication program of a Star Flash device, and when the network configuration authentication program of the Star Flash device is executed by a processor, the steps of the network configuration authentication method of the Star Flash device as described above are implemented.
[0042] In the present invention, a network configuration authentication request of a network configuration master device is obtained, a network configuration authentication key of the network configuration master device is obtained according to the network configuration authentication request, and a key distribution is performed on a target network configuration slave device according to the network configuration authentication key; a key distribution result of the target network configuration slave device is obtained, and device authentication is performed on the network configuration master device and the target network configuration slave device according to the key distribution result to obtain an authentication result; if the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key, and the network configuration master device and the target network configuration slave device are authenticated again according to the reset key to obtain authentication information, and the authentication information is saved. The present invention can encrypt key authentication information when the device of the Star Flash module performs network configuration authentication, thereby improving the security between the network configuration master device and the network configuration slave device. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of a preferred embodiment of the network distribution authentication method of the Star Flash device in the present invention;
[0044] Figure 2 It is a structural diagram of a preferred embodiment of the network distribution authentication system of the star flash device in the present invention;
[0045] Figure 3 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0047] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0048] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0049] The network authentication method of the Star Flash device described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the network configuration authentication method of the Star Flash device includes the following steps:
[0050] Step S10: obtaining a network configuration authentication request from a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing keys to a target network configuration slave device according to the network configuration authentication key.
[0051] The step S10 comprises:
[0052] Step S11, obtaining a network configuration authentication request of a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and sending a key distribution command code of the network configuration authentication key to the target network configuration slave device;
[0053] Step S12: obtaining a first challenge code and a slave device public key of the target network distribution slave device, and sending the first challenge code and the slave device public key to the network distribution master device, wherein the first challenge code is generated by the target network distribution slave device according to the key distribution command code;
[0054] Step S13: encrypting the first challenge code and the network configuration authentication key according to the slave device public key to obtain ciphertext information, and sending the ciphertext information to the target network configuration slave device;
[0055] Step S14: Obtain a decryption result of the target network distribution slave device, wherein the decryption result is obtained by the target network distribution slave device decrypting the ciphertext information.
[0056] Specifically, in an embodiment of the present invention, the L2 industrial tablet is used as the main configuration end, that is, the network configuration master device, and the L2 controller and the L0 adapter can be configured; and the L2 controller and the L0 adapter are used as the to-be-configured ends, that is, the network configuration slave devices, the L0 adapter master uses Hi3863, and the L2 industrial tablet and the L2 controller both support the SLE USB module; before the network configuration master device and the target network configuration slave device perform network configuration authentication, it is necessary to determine the corresponding target network configuration slave device, specifically, obtain the list information of the to-be-configured devices, perform a device query on the list information of the to-be-configured devices according to the network configuration master device, and obtain the slave device ID information, for example, SID1, SID2, SID3, SID4, etc.; then, obtain the key distribution information of the corresponding network configuration slave device according to the slave device ID information, and obtain the target network configuration slave device according to the key distribution information, wherein the target network configuration slave device is a network configuration slave device that has not distributed a key.
[0057] When the network configuration master device performs network configuration authentication with the target network configuration slave device, the network configuration authentication request of the network configuration master device is obtained, the network configuration authentication key of the network configuration master device is obtained according to the network configuration authentication request, and the key is distributed to the target network configuration slave device according to the network configuration authentication key. The network configuration authentication key is locally encrypted and stored as key authentication information, and the distributed network configuration authentication key is used for subsequent network configuration authentication and network configuration data encryption and decryption. The specific key distribution process is to obtain the network configuration authentication key of the network configuration master device, for example, masterConfigKey, wherein each of the network configuration master devices has only one network configuration master key, that is, the network configuration authentication key, which can be The network configuration authentication key is used to derive a slave device authentication key (e.g., deviceAuthKey) and a data key (e.g., deviceAuthKey); thereafter, the key distribution command code of the network configuration authentication key is sent to the target network configuration slave device; and when the network configuration master device performs key distribution, it needs to use a corresponding interface, such as a keyDistribution interface, wherein the interface includes an external interface and an internal interface, and the external interface is used to provide for network configuration service calls, such as a keyDistribution interface, a getKeyStatus interface, and a key Reset interface, deviceVetify interface, encryptConfigData interface and decryptConfigData, etc., the keyDistribution interface is used for key distribution, the getKeyStatus interface is used to query the key distribution status, the keyReset interface is used for key reset, the deviceVetify interface is used for network configuration authentication, the encryptConfigData interface is used to encrypt network configuration data, and the decryptConfigData interface is used to decrypt network configuration data; the internal interface includes a random value generation interface, a public-private key pair generation interface, a network configuration master key generation interface, a key derivation interface, a session key generation interface, etc.; the random value generation interface is used to generate a random value, for example, get_Random; the public-private key pair generation interface is used to generate a public key and a private key, wherein the public key is used to encrypt and protect the network configuration authentication key distributed by the network configuration master device to the network configuration slave device to be configured; the network configuration master key generation interface is used to generate a network configuration authentication key; the key derivation interface is used to derive a key; the session key generation interface is used to generate a session key, for example, get_sessionKey.
[0058] Afterwards, the key distribution command code of the network configuration authentication key is sent to the target network configuration slave device through the keyDistribution interface, specifically, the key distribution command code of the network configuration authentication key is obtained, and the key distribution command code is sent to the target network configuration slave device; after the target network configuration slave device receives the key distribution command code, the target network configuration slave device generates a corresponding first challenge code (for example, slaveCH1) according to the key distribution command code, wherein the first challenge code includes a slave device public-private key pair (for example, slavePK and slaveSK) and a key list, and each network configuration slave device has a fixed public-private key. Yes, and obtain the first challenge code of the target network distribution slave device, and send the challenge code to the network distribution master device; after the network distribution master device receives the first challenge code, the first challenge code and the network distribution authentication key are encrypting according to the slave device public key to obtain the corresponding ciphertext information, for example, master device ID|deviceAuthKey|deviceDateKey|slaveCH1, and send the ciphertext information to the target network distribution slave device; after the target network distribution slave device receives the ciphertext information, the ciphertext information is decrypted to obtain the corresponding decryption result, and the decryption result of the target network distribution slave device is obtained.
[0059] Furthermore, in an embodiment of the present invention, it is necessary to determine whether the network configuration authentication key of the network configuration master device is successfully distributed. The specific judgment process is to obtain a second challenge code of the decryption result, and determine whether the network configuration authentication key of the network configuration master device is successfully distributed according to the second challenge code; if the second challenge code is consistent with the first challenge code of the target network configuration slave device, it is determined that the network configuration authentication key of the network configuration master device is successfully distributed, and a key distribution return code is generated according to the decryption result, and the key distribution return code is sent to the network configuration master device; if the second challenge code is inconsistent with the first challenge code of the target network configuration slave device, it is determined that the network configuration authentication key of the network configuration master device has failed to be distributed, and an error code is generated according to the decryption result, the error code is sent to the network configuration master device, and a reminder to redistribute the key is issued.
[0060] Step S20: Obtain a key distribution result of the target network configuration slave device, and perform device authentication on the network configuration master device and the target network configuration slave device according to the key distribution result to obtain an authentication result.
[0061] The step S20 comprises:
[0062] Step S21, obtaining the key distribution result of the target network configuration slave device, if the key distribution result is that the key distribution is successful, obtaining the network configuration authentication command code of the network configuration master device according to the key distribution result, and sending the network configuration authentication command code to the target network configuration slave device;
[0063] Step S22, obtaining a third challenge code of the target network distribution slave device, and sending the third challenge code to the network distribution master device, wherein the third challenge code is generated by the target network distribution slave device according to the network distribution authentication command code to query the corresponding authentication key, and calculate the first hash value of the authentication key;
[0064] Step S23, obtaining a second hash value of the distribution network master device, and verifying the second hash value and the first hash value of the third challenge code to obtain a verification result, wherein the second hash value is obtained by the distribution network master device querying the authentication key and the data key of the target distribution network slave device, and calculating the authentication key and the data key;
[0065] Step S24: If the verification result is that the second hash value is equal to the first hash value, then the authentication result is determined to be that the network configuration authentication of the network configuration master device and the target network configuration slave device is passed;
[0066] Step S25: If the verification result is that the second hash value is not equal to the first hash value, it is determined that the authentication result is that the network configuration authentication of the network configuration master device and the target network configuration slave device fails.
[0067] Specifically, in an embodiment of the present invention, after key distribution is performed on the target network configuration slave device, the key distribution result of the target network configuration slave device is obtained. If the key distribution result is a successful key distribution, the network configuration authentication command code of the network configuration master device (for example, master device ID|network configuration authentication command code|hostCH1) is obtained according to the key distribution result, and the network configuration authentication command code is sent to the target network configuration slave device; the target network configuration slave device queries the corresponding authentication key (for example, hostCH1|deviceAuthKey) according to the master device ID of the network configuration authentication command code, and calculates a first hash value of the authentication key (for example, hash1), generates a third challenge code according to the first hash value, for example, (for example, slaveCH2), and sends the third challenge code to the network configuration master device; thereafter, the network configuration master The device queries the authentication key (for example, deviceAuthKey) and the data key (for example, deviceAuthKey) of the target network distribution slave device, and calculates the authentication key and the data key to obtain a second hash value (for example, hash2), and verifies the second hash value and the first hash value of the third challenge code to obtain a verification result. If the verification result is that the second hash value is equal to the first hash value, then the authentication result is determined to be that the network distribution master device and the target network distribution slave device have passed the network distribution authentication; if the verification result is that the second hash value is not equal to the first hash value, then the authentication result is determined to be that the network distribution master device and the target network distribution slave device have failed the network distribution authentication. The present invention can quickly determine whether the network distribution master device and the target network distribution slave device are authenticated successfully by calculating the corresponding hash values.
[0068] Step S30: If the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key, and the network configuration master device and the target network configuration slave device are re-authenticated according to the reset key to obtain authentication information, and the authentication information is saved.
[0069] The step S30 comprises:
[0070] Step S31: If the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key;
[0071] Step S32: When the target network distribution slave device successfully responds to the key reset, the network distribution master device and the target network distribution slave device are re-authenticated according to the reset key to obtain authentication information;
[0072] Step S33: convert the authentication information into a file format, and encrypt and save the authentication information in the file format using an encryption algorithm.
[0073] Specifically, in an embodiment of the present invention, after obtaining the corresponding authentication result, if the authentication result is that the network configuration authentication fails, the key reset process will be entered, specifically, the network configuration master device resets the network configuration authentication key to obtain the reset key, specifically, the network configuration master device uses masterConfigKey to derive a new slave device authentication key, that is, reset the key, and updates the corresponding key list, prompts an authentication abnormality alarm, and records the corresponding key update log; thereafter, obtains the key reset command code of the network configuration master device, and sends the key reset command code to the target network configuration slave device; the target network configuration slave device generates a fourth challenge code (for example, slaveCH3) according to the key reset command code, and obtains the slave device public key of the target network configuration slave device, and The fourth challenge code and the slave device public key are sent to the network configuration master device; the fourth challenge code and the reset key are encrypted according to the slave device public key to obtain target ciphertext information (for example, master device ID|deviceAuthKey|deviceDataKey|slaveCH3), and the target ciphertext information is sent to the target network configuration slave device; thereafter, the target network configuration slave device decrypts the target ciphertext information to obtain a target decryption result. If the target challenge code of the target decryption result is consistent with the fourth challenge code, it is determined that the target network configuration slave device successfully responds to the key reset, and the corresponding key update log is recorded; a key reset success response is generated according to the target decryption result, and the key reset success response is sent to the network configuration master device.
[0074] When the target network distribution slave device successfully responds to the key reset, the network distribution master device and the target network distribution slave device are re-authenticated according to the reset key. The authentication process is as described above and will not be repeated here. After the re-authentication is completed, the corresponding authentication information is obtained; afterwards, the authentication information needs to be saved locally, and the authentication information is saved locally in the form of a file, then the authentication information is converted to obtain the authentication information in the form of a file, wherein each line in the file records one piece of authentication information, and the corresponding key information needs to be encrypted and written into the file after being encoded with base64. When the key information is read subsequently, it is necessary to read the file, decode it with base64, and then perform base64 decoding on the ciphertext of the corresponding key. Decrypt the authentication information to obtain the key; then, when saving the authentication information in the form of a file, it needs to be encrypted and saved. Specifically, the authentication information in the form of a file is encrypted and saved by an encryption algorithm, wherein the encryption algorithm includes an AES encryption algorithm and a lightweight encryption algorithm Ascon. If the device has abundant hardware resources, the AES encryption algorithm is preferably used to encrypt the authentication information, and the encryption key of the authentication information is saved in the huks key library; if the hardware resource configuration of the device is low and the performance does not meet the requirements, the lightweight encryption algorithm Ascon is provided as an alternative encryption algorithm, the authentication information is encrypted by the lightweight encryption algorithm Ascon, and the encryption key of the authentication information is saved in the huks key library.
[0075] Furthermore, if the corresponding authentication information needs to be deleted, the authentication information can be deleted through the interface of the file system, and a single piece of authentication information can also be deleted through the interface of the file system; when deleting the authentication information, the corresponding log needs to be recorded.
[0076] The present invention can encrypt key authentication information when the device of the Star Flash module performs network distribution authentication, thereby improving the security between the network distribution master device and the network distribution slave device.
[0077] Furthermore, if Figure 2 As shown, based on the above-mentioned network distribution authentication method of the star flash device, the present invention also provides a network distribution authentication system of the star flash device, and the network distribution authentication system of the star flash device includes:
[0078] The key distribution module 51 is used to obtain a network configuration authentication request from a network configuration master device, obtain a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distribute keys to a target network configuration slave device according to the network configuration authentication key;
[0079] The device authentication module 52 is used to obtain the key distribution result of the target network distribution slave device, and perform device authentication on the network distribution master device and the target network distribution slave device according to the key distribution result to obtain an authentication result;
[0080] The key reset module 53 is used to reset the network configuration authentication key if the authentication result is that the network configuration authentication fails, obtain a reset key, re-authenticate the network configuration master device and the target network configuration slave device according to the reset key, obtain authentication information, and save the authentication information.
[0081] Furthermore, if Figure 3 As shown, based on the network configuration authentication method of the above-mentioned Star Flash device, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0082] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 can also be used to temporarily store data that has been output or is to be output. In one embodiment, the network configuration authentication program 40 of the Star Flash device is stored in the memory 20, and the network configuration authentication program 40 of the Star Flash device can be executed by the processor 10, thereby realizing the network configuration authentication method of the Star Flash device in the present application.
[0083] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the network configuration authentication method of the Star Flash device.
[0084] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.
[0085] In one embodiment, when the processor 10 executes the network configuration authentication program 40 of the Star Flash device in the memory 20, the following steps are implemented:
[0086] Obtaining a network configuration authentication request from a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing keys to a target network configuration slave device according to the network configuration authentication key;
[0087] Obtaining a key distribution result of the target network configuration slave device, and performing device authentication on the network configuration master device and the target network configuration slave device according to the key distribution result to obtain an authentication result;
[0088] If the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key, and the network configuration master device and the target network configuration slave device are authenticated again according to the reset key to obtain authentication information, and the authentication information is saved.
[0089] The method of obtaining a network configuration authentication request of a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing a key to a target network configuration slave device according to the network configuration authentication key, further includes:
[0090] Obtain the list of devices to be configured, perform device query on the list of devices to be configured according to the master device of the network configuration, and obtain the slave device ID information;
[0091] The key distribution information of the corresponding network configuration slave device is obtained according to the slave device ID information, and the target network configuration slave device is obtained according to the key distribution information, wherein the target network configuration slave device is a network configuration slave device to which the key is not distributed.
[0092] The obtaining of a network configuration authentication request of a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and performing key distribution to a target network configuration slave device according to the network configuration authentication key specifically includes:
[0093] Obtain a network configuration authentication request from a network configuration master device, obtain a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and send a key distribution command code of the network configuration authentication key to the target network configuration slave device;
[0094] Obtaining a first challenge code and a slave device public key of the target network configuration slave device, and sending the first challenge code and the slave device public key to the network configuration master device, wherein the first challenge code is generated by the target network configuration slave device according to the key distribution command code;
[0095] Encrypting the first challenge code and the network configuration authentication key according to the slave device public key to obtain ciphertext information, and sending the ciphertext information to the target network configuration slave device;
[0096] Obtain a decryption result of the target network configuration slave device, wherein the decryption result is obtained by the target network configuration slave device decrypting the ciphertext information.
[0097] The method further includes: obtaining a network configuration authentication request of a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing a key to a target network configuration slave device according to the network configuration authentication key, and then further including:
[0098] Obtaining a second challenge code of the decryption result, and judging whether the network configuration authentication key of the network configuration master device is successfully distributed according to the second challenge code;
[0099] If the second challenge code is consistent with the first challenge code, it is determined that the network distribution authentication key of the network distribution master device is successfully distributed, and a key distribution return code is generated according to the decryption result, and the key distribution return code is sent to the network distribution master device;
[0100] If the second challenge code is inconsistent with the first challenge code, it is determined that the network configuration authentication key distribution of the network configuration master device has failed, and an error code is generated according to the decryption result, and the error code is sent to the network configuration master device.
[0101] The step of obtaining the key distribution result of the target network configuration slave device, and performing device authentication on the network configuration master device and the target network configuration slave device according to the key distribution result to obtain an authentication result specifically includes:
[0102] Obtaining the key distribution result of the target network configuration slave device, and if the key distribution result is that the key distribution is successful, obtaining the network configuration authentication command code of the network configuration master device according to the key distribution result, and sending the network configuration authentication command code to the target network configuration slave device;
[0103] Obtaining a third challenge code of the target network configuration slave device, and sending the third challenge code to the network configuration master device, wherein the third challenge code is generated by the target network configuration slave device inquiring the corresponding authentication key according to the network configuration authentication command code, and calculating the first hash value of the authentication key according to the first hash value;
[0104] Obtain a second hash value of the network distribution master device, and perform verification processing on the second hash value and the first hash value of the third challenge code to obtain a verification result, wherein the second hash value is obtained by the network distribution master device querying the authentication key and the data key of the target network distribution slave device, and calculating the authentication key and the data key;
[0105] If the verification result is that the second hash value is equal to the first hash value, then the authentication result is determined to be that the network configuration authentication of the network configuration master device and the target network configuration slave device is passed;
[0106] If the verification result is that the second hash value is not equal to the first hash value, the authentication result is determined to be that the network configuration authentication of the network configuration master device and the target network configuration slave device fails.
[0107] If the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key, and then the method further includes:
[0108] Obtaining a key reset command code of the network distribution master device, and sending the key reset command code to the target network distribution slave device;
[0109] Obtaining a fourth challenge code and a slave device public key of the target network configuration slave device, and sending the fourth challenge code and the slave device public key to the network configuration master device, wherein the fourth challenge code is generated by the target network configuration slave device according to the key reset command code;
[0110] Encrypting the fourth challenge code and the reset key according to the slave device public key to obtain target ciphertext information, and sending the target ciphertext information to the target network distribution slave device;
[0111] Obtain a target decryption result of the target network configuration slave device. If the target challenge code of the target decryption result is consistent with the fourth challenge code, determine that the target network configuration slave device successfully responds to the key reset, wherein the decryption result is obtained by the target network configuration slave device decrypting the target ciphertext information.
[0112] The re-authenticating the network distribution master device and the target network distribution slave device according to the reset key to obtain authentication information and save the authentication information specifically includes:
[0113] When the target network distribution slave device successfully responds to the key reset, the network distribution master device and the target network distribution slave device are authenticated again according to the reset key to obtain authentication information;
[0114] The authentication information is converted into a form to obtain the authentication information in a file form, and the authentication information in the file form is encrypted and stored using an encryption algorithm.
[0115] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a network configuration authentication program of a Star Flash device, and when the network configuration authentication program of the Star Flash device is executed by a processor, the steps of the network configuration authentication method of the Star Flash device as described above are implemented.
[0116] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0117] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0118] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A network distribution authentication method for a Star Flash device, characterized in that: The network configuration authentication method of the Star Flash device includes: Obtaining a network configuration authentication request from a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing keys to a target network configuration slave device according to the network configuration authentication key; Obtaining a key distribution result of the target network configuration slave device, and performing device authentication on the network configuration master device and the target network configuration slave device according to the key distribution result to obtain an authentication result; If the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key, and the network configuration master device and the target network configuration slave device are authenticated again according to the reset key to obtain authentication information, and the authentication information is saved.
2. The network distribution authentication method of the Star Flash device according to claim 1 is characterized in that: The obtaining of a network configuration authentication request of a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing a key to a target network configuration slave device according to the network configuration authentication key, further includes: Obtain the list of devices to be configured, perform device query on the list of devices to be configured according to the master device of the network configuration, and obtain the slave device ID information; The key distribution information of the corresponding network configuration slave device is obtained according to the slave device ID information, and the target network configuration slave device is obtained according to the key distribution information, wherein the target network configuration slave device is a network configuration slave device to which the key is not distributed.
3. The network distribution authentication method of the Star Flash device according to claim 1 is characterized in that: The obtaining of a network configuration authentication request of a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing a key to a target network configuration slave device according to the network configuration authentication key specifically includes: Obtain a network configuration authentication request from a network configuration master device, obtain a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and send a key distribution command code of the network configuration authentication key to the target network configuration slave device; Obtaining a first challenge code and a slave device public key of the target network configuration slave device, and sending the first challenge code and the slave device public key to the network configuration master device, wherein the first challenge code is generated by the target network configuration slave device according to the key distribution command code; Encrypting the first challenge code and the network configuration authentication key according to the slave device public key to obtain ciphertext information, and sending the ciphertext information to the target network configuration slave device; Obtain a decryption result of the target network configuration slave device, wherein the decryption result is obtained by the target network configuration slave device decrypting the ciphertext information.
4. The network distribution authentication method of the Star Flash device according to claim 3 is characterized in that: The step of obtaining a network configuration authentication request of a network configuration master device, obtaining a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distributing a key to a target network configuration slave device according to the network configuration authentication key, further includes: Obtaining a second challenge code of the decryption result, and judging whether the network configuration authentication key of the network configuration master device is successfully distributed according to the second challenge code; If the second challenge code is consistent with the first challenge code, it is determined that the network distribution authentication key of the network distribution master device is successfully distributed, and a key distribution return code is generated according to the decryption result, and the key distribution return code is sent to the network distribution master device; If the second challenge code is inconsistent with the first challenge code, it is determined that the network configuration authentication key distribution of the network configuration master device has failed, and an error code is generated according to the decryption result, and the error code is sent to the network configuration master device.
5. The network distribution authentication method of the Star Flash device according to claim 1 is characterized in that: The obtaining of the key distribution result of the target network configuration slave device, and performing device authentication on the network configuration master device and the target network configuration slave device according to the key distribution result to obtain an authentication result specifically includes: Obtaining the key distribution result of the target network configuration slave device, and if the key distribution result is that the key distribution is successful, obtaining the network configuration authentication command code of the network configuration master device according to the key distribution result, and sending the network configuration authentication command code to the target network configuration slave device; Obtaining a third challenge code of the target network configuration slave device, and sending the third challenge code to the network configuration master device, wherein the third challenge code is generated by the target network configuration slave device inquiring the corresponding authentication key according to the network configuration authentication command code, and calculating the first hash value of the authentication key according to the first hash value; Obtain a second hash value of the network distribution master device, and perform verification processing on the second hash value and the first hash value of the third challenge code to obtain a verification result, wherein the second hash value is obtained by the network distribution master device querying the authentication key and the data key of the target network distribution slave device, and calculating the authentication key and the data key; If the verification result is that the second hash value is equal to the first hash value, then the authentication result is determined to be that the network configuration authentication of the network configuration master device and the target network configuration slave device is passed; If the verification result is that the second hash value is not equal to the first hash value, the authentication result is determined to be that the network configuration authentication of the network configuration master device and the target network configuration slave device fails.
6. The network distribution authentication method of the Star Flash device according to claim 1, characterized in that: If the authentication result is that the network configuration authentication fails, the network configuration authentication key is reset to obtain a reset key, and then the method further includes: Obtaining a key reset command code of the network distribution master device, and sending the key reset command code to the target network distribution slave device; Obtaining a fourth challenge code and a slave device public key of the target network configuration slave device, and sending the fourth challenge code and the slave device public key to the network configuration master device, wherein the fourth challenge code is generated by the target network configuration slave device according to the key reset command code; Encrypting the fourth challenge code and the reset key according to the slave device public key to obtain target ciphertext information, and sending the target ciphertext information to the target network distribution slave device; Obtain a target decryption result of the target network configuration slave device. If the target challenge code of the target decryption result is consistent with the fourth challenge code, determine that the target network configuration slave device successfully responds to the key reset, wherein the decryption result is obtained by the target network configuration slave device decrypting the target ciphertext information.
7. The network distribution authentication method of the Star Flash device according to claim 6 is characterized in that: The re-authenticating the network distribution master device and the target network distribution slave device according to the reset key to obtain authentication information and save the authentication information specifically includes: When the target network distribution slave device successfully responds to the key reset, the network distribution master device and the target network distribution slave device are authenticated again according to the reset key to obtain authentication information; The authentication information is converted into a form to obtain the authentication information in a file form, and the authentication information in the file form is encrypted and stored using an encryption algorithm.
8. A network distribution authentication system for Star Flash equipment, characterized in that: The network distribution authentication system of the Star Flash device includes: A key distribution module is used to obtain a network configuration authentication request from a network configuration master device, obtain a network configuration authentication key of the network configuration master device according to the network configuration authentication request, and distribute keys to a target network configuration slave device according to the network configuration authentication key; A device authentication module is used to obtain a key distribution result of the target network distribution slave device, and perform device authentication on the network distribution master device and the target network distribution slave device according to the key distribution result to obtain an authentication result; The key reset module is used to reset the network configuration authentication key if the authentication result is that the network configuration authentication fails, obtain a reset key, re-authenticate the network configuration master device and the target network configuration slave device according to the reset key, obtain authentication information, and save the authentication information.
9. A terminal, characterized in that: The terminal includes a memory, a processor, and a network configuration authentication program for the Star Flash device stored in the memory and executable on the processor. When the network configuration authentication program for the Star Flash device is executed by the processor, the steps of the network configuration authentication method for the Star Flash device as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer-readable storage medium stores a network configuration authentication program for a Star Flash device. When the network configuration authentication program for a Star Flash device is executed by a processor, the steps of a network configuration authentication method for a Star Flash device as described in any one of claims 1-7 are implemented.