Encryption authentication method for data acquisition equipment

By using encryption authentication methods in the data acquisition device, the matrix S and C are generated and verified, the system stability and performance problems caused by hardware imitation are solved, ensuring the authenticity and security of the equipment and preventing system hidden dangers.

CN113641984BActive Publication Date: 2024-12-17HANGZHOU BAIZIJIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111003913.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-30
Publication Date
2024-12-17
Estimated Expiration
2041-08-30

AI Technical Summary

Technical Problem

In the field of industrial production, the hardware of data acquisition equipment is easily imitated or replaced, resulting in reduced system stability and performance. Especially in product surface quality detection, the data collected by industrial cameras is simple in format and is easily cracked, causing system hidden dangers.

Method used

Using an encryption authentication method of a data acquisition device, the m*p matrix S is generated, and the authentication ciphertext is generated is encoded and the encryption matrix C of the device to be authenticated is verified through multiplication operation to judge the effectiveness of the device and prevent third-party imitation equipment. Use of

Benefits of technology

It effectively avoids the system stability and performance reduction caused by the use of third-party imitation equipment, prevents system hidden dangers, and ensures the authenticity and safety of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113641984B_ABST
    Figure CN113641984B_ABST
Patent Text Reader

Abstract

The present invention relates to an encryption authentication method for data acquisition equipment, and the steps of the present invention are: S1, generate an M*P matrix S; S2, take out the numbers in the matrix S uniformly by row or column, encode each row or column according to a predetermined encoding rule, generate an authentication ciphertext based on the encoding result, and send the authentication ciphertext to the device to be authenticated; S3, obtain the response ciphertext returned by the device to be authenticated, and decode the response ciphertext to obtain an M*N encryption matrix C; S4, calculate C'=S*M, if C=C', the authentication is successful, and the subsequent normal use can be carried out; otherwise, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1; S5, judge whether the number of retries exceeds the limited number, if not, return to step S1; if exceeded, the system will be locked for a period of time. The present invention realizes the authentication of the effectiveness of the device, avoids the reduction of the stability and performance of the system caused by the use of third-party imitation equipment, and avoids the hidden dangers of the entire system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an encryption authentication method for data acquisition equipment, which is applicable to the technical field of data encryption. Background Art

[0002] In the field of industrial production, hardware devices are often used to collect data, and the data is processed by computer software in the data processing equipment. However, the functions of hardware devices are relatively universal and are often imitated or replaced by cheaper products, which greatly reduces the stability and performance of the system.

[0003] In the field of product surface quality inspection, industrial cameras are one of the core components of the system. Usually, the data they collect is transmitted to other terminals in a relatively simple plain text format. If the hardware itself and the format of the collected data are cracked, it is likely to be imitated or replaced by a third party, causing hidden dangers to the entire system. Summary of the invention

[0004] The technical problem to be solved by the present invention is: in view of the above-mentioned problems, an encryption authentication method for data acquisition equipment is provided.

[0005] The technical solution adopted by the present invention is: an encryption authentication method for data acquisition equipment, which is used to authenticate the equipment, and is characterized by:

[0006] S1, generate m*p matrix S;

[0007] S2, take out the numbers in the matrix S uniformly by row or column, encode each row or column according to the established encoding rules, generate the authentication ciphertext based on the encoding result, and send the authentication ciphertext to the device to be authenticated;

[0008] S3, obtain the response ciphertext returned by the device to be authenticated, and decode the response ciphertext to obtain an m*n encryption matrix C;

[0009] The response ciphertext is generated by the device to be authenticated by taking out the numbers in the encryption matrix C uniformly by row or column, encoding each row or column according to a predetermined encoding rule, and generating the ciphertext based on the encoding result;

[0010] The encryption matrix C is obtained by the device to be authenticated after decoding the matrix S from the authentication ciphertext, and then calculated according to C=S*M, where the matrix M is a p*n matrix agreed in advance;

[0011] S4. Calculate C'=S*M. If C= C', the authentication is successful and the device can be used normally. Otherwise, the authentication fails, and the subsequent operation process is stopped. The number of retries is increased by 1.

[0012] S5. Determine whether the number of retries exceeds the limit. If not, return to step S1; if exceeded, lock the system for a period of time.

[0013] The matrix S is generated based on the current system time.

[0014] Step S3 includes:

[0015] If the response ciphertext cannot be decoded normally, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1, and the process jumps to step S5;

[0016] If the response ciphertext can be decoded normally, but the decoded content cannot form the m*n encryption matrix C, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1, and the process jumps to step S5.

[0017] Repeat steps S1 to S5 at regular intervals to perform authentication.

[0018] An encryption authentication device for a data acquisition device, used for authenticating the device, characterized by comprising:

[0019] Matrix generation module, used to generate m*p matrix S;

[0020] The ciphertext generation module is used to take out the numbers in the matrix S uniformly by row or column, encode each row or column according to the established encoding rules, generate the authentication ciphertext based on the encoding result, and send the authentication ciphertext to the device to be authenticated;

[0021] The ciphertext decoding module is used to obtain the response ciphertext returned by the device to be authenticated, and decode the response ciphertext to obtain the m*n encryption matrix C;

[0022] The authentication judgment module is used to calculate C'=S*M. If C= C', the authentication is successful and can be used normally; otherwise, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1;

[0023] The retry judgment module is used to judge whether the number of retries exceeds the limit. If not, re-authentication will be performed; if exceeded, the system will be locked for a period of time;

[0024] The response ciphertext is generated by the device to be authenticated by taking out the numbers in the encryption matrix C uniformly by row or column, encoding each row or column according to a predetermined encoding rule, and generating the ciphertext based on the encoding result;

[0025] The encryption matrix C is obtained by the device to be authenticated after decoding the matrix S from the authentication ciphertext, and then calculated according to C=S*M, where the matrix M is a pre-agreed p*n matrix.

[0026] The matrix S is generated based on the current system time.

[0027] The ciphertext decoding module comprises:

[0028] If the response ciphertext cannot be decoded normally, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1, jumping to the retry judgment module;

[0029] If the response ciphertext can be decoded normally, but the decoded content cannot form the m*n encryption matrix C, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1, jumping to the retry judgment module.

[0030] A storage medium stores a computer program that can be executed by a processor, characterized in that when the computer program is executed, the steps of the encryption authentication method of the data acquisition device are implemented.

[0031] A data processing device comprises a memory and a processor, wherein the memory stores a computer program executable by the processor, and wherein the computer program implements the steps of the encryption authentication method of the data acquisition device when executed.

[0032] An encryption authentication system for a data acquisition device comprises a data acquisition device and a data processing device for authenticating the data acquisition device.

[0033] The beneficial effects of the present invention are as follows: the present invention generates authentication ciphertext by encoding the m*p matrix S by row or column and then sends it to the data acquisition device, the data acquisition device decodes and generates the matrix S, multiplies the pre-agreed p*n matrix M with the matrix S as the encryption matrix, obtains the m*n matrix C, the matrix C is encoded by row or column to generate response ciphertext and then sent to the data processing device, the data processing device decodes the response ciphertext to obtain the matrix C, and calculates the matrix C', and judges whether the authentication is successful by comparing the matrix C with the matrix C'. The present invention realizes the authentication of the validity of the device, avoids the reduction of the stability and performance of the system caused by the use of third-party imitation devices, and avoids the hidden dangers of the whole system. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flowchart of an embodiment.

[0035] Figure 2 It is a functional module diagram of an embodiment.

[0036] 1. Matrix generation module; 2. Ciphertext generation module; 3. Ciphertext decoding module; 4. Authentication judgment module; 5. Retry judgment module. DETAILED DESCRIPTION

[0037] This embodiment provides an encryption authentication method for a data acquisition device, which is used to authenticate the data acquisition device, and specifically includes the following steps:

[0038] S1. Generate an m*p matrix S based on the current system time.

[0039] S2. Take out the numbers in the matrix S uniformly by row or column (in this example, by row, the number extraction agreed upon in different systems is different), encode each row or column according to the established encoding rules, arrange the encoding results of each row or column in a pre-agreed order (the order agreed upon in different systems is different) to generate the authentication ciphertext, and send the authentication ciphertext to the device to be authenticated.

[0040] S3. Obtain the response ciphertext returned by the device to be authenticated, and decode the response ciphertext according to the decoding method agreed upon by the system to obtain the m*n encryption matrix C. However, if the response ciphertext cannot be decoded normally, the authentication fails, and the subsequent operation process is stopped. At the same time, the number of retries is increased by 1, and the process jumps directly to step S5. If the response ciphertext can be decoded normally, but the decoded content cannot constitute the m*n encryption matrix C, the authentication fails, and the subsequent operation process is stopped. At the same time, the number of retries is increased by 1, and the process jumps directly to step S5.

[0041] In this embodiment, the response ciphertext is generated by the device to be authenticated by uniformly taking out the numbers in the encryption matrix C by row or column, encoding each row or column according to the established encoding rules, and arranging the encoding results of each row or column in a pre-agreed order. The encryption matrix C is obtained by the device to be authenticated from the authentication ciphertext according to the established decoding rules to obtain the matrix S, and then calculated according to C=S*M, where the matrix M is a pre-agreed p*n matrix (the matrix M of the device to be authenticated in different systems is different).

[0042] S4. After obtaining the m*n encryption matrix C, calculate C'=S*M. If C= C', the authentication is successful and can be used normally; otherwise, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1;

[0043] S5. Determine whether the number of retries exceeds the limit. If not, return to step S1; if exceeded, lock the system for a period of time.

[0044] In this embodiment, if the device works normally, the device validity will be verified at regular intervals, and the method is the same as steps S1 to S5.

[0045] This embodiment also provides an encryption authentication device for a data acquisition device, which is used to authenticate the data acquisition device, and includes: a matrix generation module 1, a ciphertext generation module 2, a ciphertext decoding module 3, an authentication judgment module 4 and a retry judgment module 5.

[0046] In this example, the matrix generation module is used to generate an m*p matrix S based on the current system time; the ciphertext generation module is used to take out the numbers in the matrix S uniformly by row or column, encode each row or column according to the established encoding rules, generate the authentication ciphertext based on the encoding result, and send the authentication ciphertext to the device to be authenticated; the ciphertext decoding module is used to obtain the response ciphertext returned by the device to be authenticated, and decode the response ciphertext to obtain the m*n encryption matrix C; the authentication judgment module is used to calculate C'=S*M. If C= C', the authentication is successful and can be used normally afterwards; otherwise, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1; the retry judgment module is used to determine whether the number of retries exceeds the limit. If not, the authentication is re-performed; if exceeded, the system will be locked for a period of time.

[0047] This embodiment also provides a storage medium on which a computer program that can be executed by a processor is stored. When the computer program is executed, the steps of the encryption authentication method of the data acquisition device in this example are implemented.

[0048] This embodiment also provides a data processing device, which has a memory and a processor. The memory stores a computer program that can be executed by the processor. When the computer program is executed, the steps of the encryption authentication method of the data acquisition device in this example are implemented.

[0049] This embodiment also provides an encryption authentication system for a data acquisition device, comprising a data acquisition device and a data processing device for authenticating the data acquisition device. The working principle of the encryption authentication system for the data acquisition device is as follows:

[0050] The data processing device generates an m*p matrix S based on the current time;

[0051] The data processing device takes out the numbers in the matrix S uniformly by row or column, encodes each row or column according to the established encoding rules, arranges the encoding results of each row or column in a pre-agreed order to generate an authentication ciphertext, and sends the authentication ciphertext to the data collection device to be authenticated;

[0052] The data acquisition device obtains the authentication ciphertext sent by the data processing device, and decodes the authentication ciphertext according to the pre-agreed decoding rules to obtain the matrix S. However, if the authentication ciphertext cannot be decoded normally, the authenticity of the authentication ciphertext is in doubt, and the subsequent operation process is stopped; if the authentication ciphertext can be decoded normally, but the decoded content cannot form the m*p matrix S, the authenticity of the authentication ciphertext is in doubt, and the subsequent operation process is stopped;

[0053] The data acquisition device calculates the encryption matrix C according to C=S*M, where the matrix M is a pre-agreed p*n matrix;

[0054] The data acquisition device uniformly takes out the numbers in the encryption matrix C by row or column, encodes each row or column according to the established encoding rules, arranges the encoding results of each row or column in a pre-agreed order to generate a response ciphertext, and sends the response ciphertext to the data processing device;

[0055] The data processing device obtains the response ciphertext returned by the device to be authenticated, and decodes the response ciphertext to obtain the m*n encryption matrix C. However, if the response ciphertext cannot be decoded normally, the authentication fails and the subsequent operation process stops; if the response ciphertext can be decoded normally, but the decoded content cannot constitute the m*n encryption matrix C, the authentication fails and the subsequent operation process stops;

[0056] After the data processing device obtains the m*n encryption matrix C, it calculates C'=S*M. If C= C', the authentication is successful and can be used normally; otherwise, the authentication fails and the subsequent operation process is stopped.

[0057] In this embodiment, m, n, and p are all positive integers.

[0058] To further describe the present embodiment, the steps of the present embodiment are described below with a specific example: In a product surface quality inspection system, a certain specified model of industrial camera is used, and its hardware and internal program are of specified versions. The computer software of the data processing equipment in the quality inspection system and the internal program of the camera (data acquisition device) are pre-installed with a specified encryption matrix. The specific steps are as follows:

[0059] After the product surface quality inspection system is started, the computer software obtains the current system time, which is composed of year-month-day-hour-minute-second-millisecond (take the first 2 digits). For example, if the current time is 16:02:53:230 on January 6, 2021, the character composition is 2021010616025323, a total of 16 digits, which are converted into a 4*4 matrix S;

[0060] The numbers in the matrix S are taken out row by row, encoded, and converted into hexadecimal codes in sequence to generate authentication ciphertext, which is sent to the data acquisition device;

[0061] After receiving the matrix S, the data acquisition device takes out the numbers in the matrix row by row, uses the pre-agreed 4*4 matrix M as the encryption matrix to perform multiplication operation with the matrix S, and obtains the information encryption matrix C=S*M, which is also a 4*4 matrix. The numbers in C are taken out row by row, converted into hexadecimal codes in sequence, generate response ciphertext, and return the response ciphertext to the data processing device;

[0062] The data processing device parses the ciphertext returned by the data acquisition device, obtains all the characters of the matrix C, and calculates C'=S*M. If C= C', the device is considered valid and can be used normally; otherwise, the subsequent operation process is stopped.

Claims

1. An encryption authentication method for a data acquisition device, used to authenticate a device, wherein the device to be authenticated is an industrial camera as a data acquisition device, and the authentication device is a data processing device in a quality inspection system, characterized in that: S1. Generate an m*p matrix S, where the matrix S is generated based on the current system time, m is a positive integer, and p is a positive integer; S2, take out the numbers in the matrix S uniformly by row or column, encode each row or column according to the established encoding rules, generate the authentication ciphertext based on the encoding result, and send the authentication ciphertext to the device to be authenticated; S3, obtaining the response ciphertext returned by the device to be authenticated, and decoding the response ciphertext to obtain an m*n encryption matrix C, where n is a positive integer; The response ciphertext is generated by the device to be authenticated by taking out the numbers in the encryption matrix C uniformly by row or column, encoding each row or column according to a predetermined encoding rule, and generating the ciphertext based on the encoding result; The encryption matrix C is obtained by the device to be authenticated after decoding the matrix S from the authentication ciphertext, and then calculated according to C=S*M, where the matrix M is a p*n matrix pre-built in and agreed upon in advance by the device to be authenticated; S4. Based on the matrix S generated by the authentication device and the pre-built-in and pre-agreed matrix M of the authentication device, calculate C'=S*M. If C= C', the authentication is successful and the subsequent normal use can be carried out; otherwise, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1; S5, determine whether the number of retries exceeds the specified number, if not, return to step S1; If exceeded, the system will be locked for a period of time.

2. The encryption authentication method for data acquisition equipment according to claim 1, characterized in that: Step S3 includes: If the response ciphertext cannot be decoded normally, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1, and the process jumps to step S5; If the response ciphertext can be decoded normally, but the decoded content cannot form the m*n encryption matrix C, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1, and the process jumps to step S5.

3. The encryption authentication method for data acquisition equipment according to claim 1 or 2, characterized in that: Repeat steps S1 to S5 at regular intervals to perform authentication.

4. An encryption authentication device for a data acquisition device, used for authenticating a device, wherein the device to be authenticated is an industrial camera as a data acquisition device, and the authentication device is a data processing device in a quality inspection system, characterized in that: include: A matrix generation module (1) is used to generate an m*p matrix S, wherein the matrix S is generated based on the current system time, m is a positive integer, and p is a positive integer; The ciphertext generation module (2) is used to uniformly extract the numbers in the matrix S by row or column, encode each row or column according to a predetermined encoding rule, generate an authentication ciphertext based on the encoding result, and send the authentication ciphertext to the device to be authenticated; The ciphertext decoding module (3) is used to obtain the response ciphertext returned by the device to be authenticated, and decode the response ciphertext to obtain an m*n encryption matrix C, where n is a positive integer; The authentication judgment module (4) is used to calculate C'=S*M based on the matrix S generated by the authentication device and the matrix M pre-built in and agreed upon in advance by the authentication device. If C= C', the authentication is successful and the subsequent normal use can be carried out; otherwise, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1; A retry determination module (5) is used to determine whether the number of retries exceeds a specified number, and if not, re-authenticate; If exceeded, the system will be locked for a period of time; The response ciphertext is generated by the device to be authenticated by taking out the numbers in the encryption matrix C uniformly by row or column, encoding each row or column according to a predetermined encoding rule, and generating the ciphertext based on the encoding result; The encryption matrix C is obtained by the device to be authenticated after decoding the matrix S from the authentication ciphertext, and then calculated according to C=S*M, where the matrix M is a pre-built-in and pre-agreed p*n matrix of the device to be authenticated.

5. The encryption authentication device for data acquisition equipment according to claim 4, characterized in that: The ciphertext decoding module (3) comprises: If the response ciphertext cannot be decoded normally, the authentication fails, the subsequent operation process is stopped, and the number of retries is increased by 1, jumping to the retry judgment module (5); If the response ciphertext can be decoded normally, but the decoded content cannot form the m*n encryption matrix C, the authentication fails, and the subsequent operation process is stopped. At the same time, the number of retries is increased by 1, and the process jumps to the retry judgment module (5).

6. A storage medium having stored thereon a computer program executable by a processor, characterized in that: When the computer program is executed, the steps of the encryption authentication method for the data acquisition device according to any one of claims 1 to 3 are implemented.

7. A data processing device comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, wherein: When the computer program is executed, the steps of the encryption authentication method for the data acquisition device according to any one of claims 1 to 3 are implemented.

8. An encryption authentication system for a data acquisition device, comprising a data acquisition device and the data processing device according to claim 7 for authenticating the data acquisition device.

Citation Information

Patent Citations

  • Secondary encryption-based data validation and data recovery algorithm in cloud storage

    CN106611128A

  • Authentication encryption ciphertext encoding method, system and device and storage medium

    CN110868287A