A hybrid chaotic encryption processing method for logistics risk control evidence images

Through the hybrid chaotic encryption processing method, the logistics data is double encrypted, the image position points are encrypted using K-order Hilbert curves and encryption box vectors, and the visual features are encrypted using mixed chaotic sequences, which solves the security of encrypted data in the prior art. The problem of low is to achieve high security logistics data encryption.

CN118827882BActive Publication Date: 2024-11-22青岛冠成软件有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411290242.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-11-22
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

In the prior art, 56-bit keys are easily cracked by exhaustive attacks under modern computing power, resulting in low security of encrypted data and inability to effectively protect the integrity and security of cold chain logistics data.

Method used

The hybrid chaos encryption method is used to double-encrypt logistics data, encrypt image position points by constructing K-order Hilbert curves and encryption box vectors, and encrypting tone, saturation and brightness using a hybrid chaos sequence to generate high security encrypted data.

Benefits of technology

The security and concealment of encrypted data are improved, so that the encrypted data exists in the form of ordinary RGB images, greatly enhancing the anti-cracking ability and compatibility, and ensuring the integrity and security of logistics data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827882B_ABST
    Figure CN118827882B_ABST
Patent Text Reader

Abstract

The present invention discloses a hybrid chaotic encryption processing method for logistics risk control evidence images, belonging to the technical field of data encryption. When the logistics data is a data string, the present invention constructs an image to be encrypted so that all the data to be encrypted are two-dimensional data, and constructs a K-order Hilbert curve according to the length and width of the image to be encrypted. The K-order Hilbert curve and the encryption box vector are used to perform double encryption on the position points on the image to be encrypted to achieve encryption of the spatial position, and then the hybrid chaotic sequence is used to encrypt the hue, saturation and brightness to achieve encryption of the information on the spatial position, thereby improving the security of the encrypted data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data encryption technology, and in particular to a hybrid chaotic encryption processing method for logistics risk control evidence images. Background Art

[0002] Cold chain logistics refers to a systematic project that ensures that temperature-sensitive products such as refrigerated and frozen foods, fresh produce, and medicines are always kept in a specified low-temperature environment from production, storage, transportation, and sales to ensure product quality and reduce losses. In this process, the physical flow from the supply chain to the receiving location involves multiple links such as transportation, storage, procurement, loading and unloading, packaging, and distribution. The logistics data generated in these links (such as temperature monitoring, cargo status, etc.) has strong evidence and is the key evidence to ensure the quality and safety of the cold chain. If this data is tampered with or leaked, it may lead to food safety problems, economic losses, and even endanger public health.

[0003] DES (Data Encryption Standard) is often used for encryption in the prior art. DES uses a 56-bit key to encrypt a 64-bit data block. However, given the existing computing power, the 56-bit key is no longer safe under modern computing power and can be easily cracked by an exhaustive attack, resulting in low security of encrypted data. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a hybrid chaotic encryption processing method for logistics risk control evidence images, which solves the problem of low security of encrypted data in the prior art.

[0005] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a hybrid chaotic encryption processing method for logistics risk control evidence image, comprising the following steps:

[0006] S1. When the logistics data is a data string, the data string is used to form an image to be encrypted. When the logistics data is a risk control evidence image, the risk control evidence image is used as the image to be encrypted.

[0007] S2. Generate the order K of the Hilbert curve according to the length and width of the image to be encrypted, and construct a K-order Hilbert curve;

[0008] S3. Call the K-order Hilbert curve and the encryption box vector to perform double encryption on the position points on the encrypted image, and use a mixed chaotic sequence to encrypt the hue, saturation and brightness to obtain encrypted data.

[0009] Furthermore, the process of forming the image to be encrypted from the data string in S1 is specifically as follows: 8 bytes are added in front of the data string to identify the string length, the total string length is recorded as L, and each 3 consecutive bytes form a pixel. When the pixel is insufficient, a random number is used for padding to obtain the image to be encrypted. The width of the image to be encrypted is: , where N is the width of the image to be encrypted.

[0010] Furthermore, the random number is generated by a random function, and the random function is: , where X i+1 is the i+1th random number, a is the multiplier, b is the increment, m is the modulus, mod is the remainder operation, X i is the i-th random number, where i is a positive integer.

[0011] Furthermore, the calculation formula of the order K is: , where K is the order, for Round down, M is the length of the image to be encrypted, N is the width of the image to be encrypted, and log is the logarithmic function.

[0012] Furthermore, the recursive function used to construct the K-order Hilbert curve is: , where hf(x,y,n) is the subscript when the recursion order is n at the position point (x,y), hf(x,y,n-1) is the subscript when the recursion order is n-1 at the position point (x,y), hf(m-y+1,2m-x+1,n-1) is the subscript when the recursion order is n-1 at the position point (m-y+1,2m-x+1), m is an integer, m=2 K-1 , hf(x,ym,n-1) is the subscript when the recursion order is n-1 at the position point (x,ym), hf(xm,ym,n-1) is the subscript when the recursion order is n-1 at the position point (xm,ym), n is the number of the recursion order, x is the horizontal coordinate of the image to be encrypted, y is the vertical coordinate of the image to be encrypted, and K is the order.

[0013] Furthermore, S3 includes the following sub-steps:

[0014] S31, calling the K-order Hilbert curve to perform the first encryption on each position point in the image to be encrypted;

[0015] S32, construct an encryption box vector, perform a second encryption on the position point after the first encryption, and obtain the first part of the encrypted data;

[0016] S33, using a mixed chaotic sequence to encrypt the hue, saturation and brightness of each position point on the first encrypted image to obtain a second part of the encrypted data.

[0017] Furthermore, the S31 includes the following sub-steps:

[0018] S311, loop call for K-order Hilbert curve times, m=2 K-1 , K is the order;

[0019] S312, when the subscript generated by the called K-order Hilbert curve is less than When , the position point on the image to be encrypted is encrypted for the first time, where M is the length of the image to be encrypted, N is the width of the image to be encrypted, and the formula for encrypting the position point on the image to be encrypted is: , ,in, is the horizontal coordinate of the position point after the first encryption, is the ordinate of the position point after the first encryption, hf(x,y,K) is the subscript generated by the K-order Hilbert curve, mod is the modulo operation, x is the abscissa of the image to be encrypted, y is the ordinate of the image to be encrypted, K is the order, and α is the first key parameter.

[0020] Further, the S32 includes the following sub-steps:

[0021] S321, construct an encryption box vector, wherein the generation formula of the elements in the encryption box vector is: , where H j+1 is the j+1th element in the encrypted box vector, H j is the jth element in the encryption box vector, j is a positive integer, and α is the first key parameter;

[0022] S322, traverse each position point after the first encryption, and use the elements in the encryption box vector to encrypt each position point after the first encryption in sequence to obtain the first part of the encrypted data: ,in, is the horizontal coordinate of the position point after the second encryption, is the ordinate of the position point after the second encryption, is the horizontal coordinate of the position point after the first encryption, is the ordinate of the position point after the first encryption, xor is the exclusive OR operation, and M is the length of the image to be encrypted.

[0023] Furthermore, the generation formula of the elements in the mixed chaotic sequence is: , where cf k+1 is the k+1th element in the mixed chaotic sequence, cf kis the kth element in the mixed chaotic sequence, k is a positive integer, θ is the second key parameter, β is the third key parameter, mod is the remainder operation, and cos is the cosine function.

[0024] The beneficial effects of the present invention are as follows: when the logistics data is a data string, the present invention constructs an image to be encrypted so that all the data to be encrypted are two-dimensional data, constructs a K-order Hilbert curve according to the length and width of the image to be encrypted, and uses the K-order Hilbert curve and the encryption box vector to perform double encryption on the position points on the image to be encrypted to achieve encryption of the spatial position, and then uses a mixed chaotic sequence to encrypt the hue, saturation and brightness to achieve encryption of the information on the spatial position, thereby improving the security of the encrypted data. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 The figure is a flow chart of a hybrid chaotic encryption processing method for logistics risk control evidence images. DETAILED DESCRIPTION

[0026] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0027] like Figure 1 As shown, a hybrid chaotic encryption processing method for logistics risk control evidence images includes the following steps:

[0028] S1. When the logistics data is a data string, the data string is used to form an image to be encrypted. When the logistics data is a risk control evidence image, the risk control evidence image is used as the image to be encrypted.

[0029] In the present invention, risk control evidence images refer to visual evidence used to record and preserve important transactions, operations or events, which can be used as effective electronic evidence in the event of disputes or when legal tracing is required;

[0030] S2. Generate the order K of the Hilbert curve according to the length and width of the image to be encrypted, and construct a K-order Hilbert curve;

[0031] S3. Call the K-order Hilbert curve and the encryption box vector to perform double encryption on the position points on the encrypted image, and use a mixed chaotic sequence to encrypt the hue, saturation and brightness to obtain encrypted data.

[0032] The process of forming the image to be encrypted from the data string in S1 is as follows: 8 bytes are added in front of the data string to identify the string length, and the total string length is recorded as L. In bytes (8 bits), each continuous 3 bytes form a pixel. When the number of pixels is insufficient, random numbers are used for padding to obtain the image to be encrypted. The width of the image to be encrypted is: , where N is the width of the image to be encrypted.

[0033] In this embodiment, the first key parameter α, the second key parameter θ, and the third key parameter β are known quantities. When the present invention is used specifically, the three key parameters are transmitted using RSA encryption, transmitted to the encryption process for encryption, and transmitted to the decryption process for decryption.

[0034] The random number is generated by a random function, and the random function is: , where X i+1 is the i+1th random number, a is the multiplier, b is the increment, m is the modulus, mod is the remainder operation, X i is the i-th random number, where i is a positive integer.

[0035] In this embodiment, X1=α, a=1664525, b=1013904223, m=4294967296.

[0036] The present invention ensures data integrity and decryption accuracy by adding 8 bytes to the front of the data string to identify the length. Secondly, the conversion method based on bytes (8 bits) is adopted to ensure the accurate expression of data and improve the flexibility of encryption. The practice of treating 3 consecutive bytes as a pixel not only improves the data density, but also increases the difficulty of cracking. It is particularly noteworthy that for the insufficient part, a random function based on the linear congruential method is introduced to generate scrambling codes. The random function ensures a high-quality pseudo-random sequence and significantly enhances the encryption strength and resistance to statistical analysis. Not only does it achieve secure encryption of data, but it also cleverly combines the encryption process with image generation, so that the encrypted data exists in the form of an ordinary RGB image, greatly improving concealment and compatibility.

[0037] The calculation formula of the order K is: , where K is the order, for Round down, M is the length of the image to be encrypted, N is the width of the image to be encrypted, and log is the logarithmic function.

[0038] The recursive function used to construct the K-order Hilbert curve is: , where hf(x,y,n) is the subscript when the recursion order is n at the position point (x,y), hf(x,y,n-1) is the subscript when the recursion order is n-1 at the position point (x,y), hf(m-y+1,2m-x+1,n-1) is the subscript when the recursion order is n-1 at the position point (m-y+1,2m-x+1), m is an integer, m=2 K-1 , hf(x,ym,n-1) is the subscript when the recursion order is n-1 at the position point (x,ym), hf(xm,ym,n-1) is the subscript when the recursion order is n-1 at the position point (xm,ym), n is the number of the recursion order, x is the horizontal coordinate of the image to be encrypted, y is the vertical coordinate of the image to be encrypted, and K is the order.

[0039] The present invention incorporates the length and width (M, N) of the image to be encrypted into the calculation of the order K, realizes the dynamic adaptation of encryption strength and image size, and ensures the flexibility and applicability of encryption. Secondly, the recursive function hf(x, y, n) is used to generate the Hilbert curve, which accurately describes the complex space filling curve and can also disrupt the pixel order while maintaining the image topology, greatly enhancing the security of encryption. In particular, the conditional branch design in the function (such as recursive calls when x ≤ m and y ≤ m, and coordinate transformations and recursive combinations in other cases) ensures that the curve can fully cover the entire image space, improves the uniformity and integrity of encryption, realizes efficient spatial mapping, and increases the complexity of encryption through the self-similar nature of the curve, making unauthorized decryption extremely difficult.

[0040] The S3 comprises the following sub-steps:

[0041] S31, calling the K-order Hilbert curve to perform the first encryption on each position point in the image to be encrypted;

[0042] S32, construct an encryption box vector, perform a second encryption on the position point after the first encryption, and obtain the first part of the encrypted data;

[0043] S33, using a mixed chaotic sequence to encrypt the hue, saturation and brightness of each position point on the first encrypted image to obtain a second part of the encrypted data.

[0044] In the present invention, the encrypted data consists of a first part and a second part.

[0045] The S31 comprises the following sub-steps:

[0046] S311, loop call for K-order Hilbert curve times, m=2 K-1 , K is the order;

[0047] S312, when the subscript generated by the called K-order Hilbert curve is less than When , the position point on the image to be encrypted is encrypted for the first time, where M is the length of the image to be encrypted, N is the width of the image to be encrypted, and the formula for encrypting the position point on the image to be encrypted is: , ,in, is the horizontal coordinate of the position point after the first encryption, is the ordinate of the position point after the first encryption, hf(x,y,K) is the subscript generated by the K-order Hilbert curve, mod is the modulo operation, x is the abscissa of the image to be encrypted, y is the ordinate of the image to be encrypted, K is the order, and α is the first key parameter.

[0048] In step S312, the subscript generated by the called K-order Hilbert curve is greater than , the coordinate conversion is skipped.

[0049] The present invention lays the foundation for subsequent encryption operations by numerically processing the image pixels according to ESL (hue, saturation, brightness), while retaining the essential characteristics of the image. Secondly, the subscripts generated in the previous step are used to re-shuffle the pixels, which increases the complexity of encryption. In particular, the hf(x, y, K) function is used to generate a new coordinate mapping relationship, which not only reflects the space filling characteristics of the Hilbert curve, but also improves the uniformity and security of encryption through cyclic calls. The coordinate mapping formula introduces the α parameter and modular operation, which greatly enhances the randomness and anti-attack ability of the encryption while ensuring the uniqueness of the mapping, not only achieving highly secure pixel rearrangement, but also ensuring the reversibility of decryption, providing an efficient decryption path for authorized users.

[0050] The S32 comprises the following sub-steps:

[0051] S321, construct an encryption box vector, wherein the generation formula of the elements in the encryption box vector is: , where H j+1 is the j+1th element in the encrypted box vector, H j is the jth element in the encryption box vector, j is a positive integer, and α is the first key parameter;

[0052] S322, traverse each position point after the first encryption, and use the elements in the encryption box vector to encrypt each position point after the first encryption in sequence to obtain the first part of the encrypted data: ,in, is the horizontal coordinate of the position point after the second encryption, is the ordinate of the position point after the second encryption, is the horizontal coordinate of the position point after the first encryption, is the ordinate of the position point after the first encryption, xor is the exclusive OR operation, and M is the length of the image to be encrypted.

[0053] The present invention is based on the first encryption The matrix sequentially traverses the pixels, applying a unique obfuscation process to each point to ensure the comprehensiveness of the encryption, and then cleverly combines constants (3.85) and dynamic parameters (1 / 98α) through the encryption box vector generation algorithm to create a highly nonlinear and unpredictable sequence. In particular, the iterative formula used when j>1 not only has chaotic characteristics, but also provides additional encryption strength and flexibility through the α parameter.

[0054] By judging Whether it is a prime number, the exclusive OR (XOR) operation is selectively applied. This method introduces complexity based on prime numbers. For prime number positions, the exclusive OR operation is used for transformation, which not only scrambles the pixel positions, but also j Introduces additional randomness.

[0055] The generation formula of the elements in the mixed chaotic sequence is: , where cf k+1 is the k+1th element in the mixed chaotic sequence, cf k is the kth element in the mixed chaotic sequence, k is a positive integer, θ is the second key parameter, β is the third key parameter, mod is the remainder operation, and cos is the cosine function.

[0056] The present invention generates an unpredictable sequence by introducing a complex mixed chaotic sequence generation function. The function combines trigonometric functions (cosine) and modular operations, which not only increases the nonlinearity of the sequence, but also ensures that the output value is always within the range of 0-255, perfectly adapting to the image pixel value. In particular, the two parameters β and θ are introduced into the function, which further enhances the complexity and security of the encryption process.

[0057] The present invention generates a mixed chaotic sequence (cf1, cf2, cf3, ...) by iteration, and each element value depends on the previous value, which makes prediction or cracking extremely difficult. More importantly, this method combines the generated mixed chaotic sequence with the three component values ​​of the image's ESL (hue, saturation, brightness) and encrypts them through XOR or other operations. This approach not only ensures the comprehensiveness of the encryption (covering all visual features of the image), but also ensures that each pixel has a unique encryption process.

[0058] In this embodiment, a mixed chaotic sequence may be used to perform an XOR operation on the sequence of hue, saturation, and brightness at each position point, thereby realizing encryption of information at each position point.

[0059] When the logistics data is a data string, the present invention constructs an image to be encrypted so that all the data to be encrypted are two-dimensional data. According to the length and width of the image to be encrypted, a K-order Hilbert curve is constructed. The K-order Hilbert curve and the encryption box vector are used to perform double encryption on the position points on the image to be encrypted to achieve encryption of the spatial position. Then, a mixed chaotic sequence is used to encrypt the hue, saturation and brightness to achieve encryption of the information on the spatial position, thereby improving the security of the encrypted data.

[0060] In this embodiment, the decryption process is as follows:

[0061] Step 1: Decrypt the encrypted data using a mixed chaotic sequence. The formula for generating the elements in the mixed chaotic sequence is the same as the formula for generating the elements in the encryption process. According to the mixed chaotic sequence (cf1, cf2, cf3...), the image is decrypted by taking the XOR operation of the three ESL component values ​​of the pixel points.

[0062] Step 2: Decrypt the encrypted data using the decryption box vector. The generation formula of the decryption box vector is the same as that of the encryption box vector. The matrix is ​​traversed sequentially. When a prime number is encountered, the elements in the decryption box vector are XORed, which is the inverse process of step S32.

[0063] Step 3: Construct the K-order Hilbert curve. The construction process of the K-order Hilbert curve is the same as S2;

[0064] Step 4: Call the K-order Hilbert curve for decryption:

[0065] (1) In accordance with Call hf(x,y,K) function repeatedly to generate subscript values.

[0066] (2) If hf(x,y,K) > , skip and do not convert;

[0067] (3) The coordinate mapping relationship is: , ;

[0068] Step 5: When decrypting the data string, convert the RGB image into a data string. The conversion method is: take out the first 9 bytes to parse the type and string length, restore the data string length L in bytes (8 bits), and loop through each pixel of the image sequentially, converting one pixel into 3 consecutive bytes until the length L is reached.

[0069] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A hybrid chaotic encryption processing method for logistics risk control evidence images, characterized in that: The following steps are involved: S1. When the logistics data is a data string, the data string is used to form an image to be encrypted. When the logistics data is a risk control evidence image, the risk control evidence image is used as the image to be encrypted. S2. Generate the order K of the Hilbert curve according to the length and width of the image to be encrypted, and construct a K-order Hilbert curve; S3, calling the K-order Hilbert curve and the encryption box vector, double encrypting the position points on the encrypted image, and using the mixed chaotic sequence to encrypt the hue, saturation and brightness to obtain encrypted data; The process of forming the image to be encrypted from the data string in S1 is as follows: 8 bytes are added in front of the data string to identify the string length, the total string length is recorded as L, and each 3 consecutive bytes form a pixel. When the pixel is insufficient, random numbers are used for padding to obtain the image to be encrypted. The width of the image to be encrypted is: , where N is the width of the image to be encrypted; The random number is generated by a random function, and the random function is: , where X i+1 is the i+1th random number, a is the multiplier, b is the increment, m is the modulus, mod is the remainder operation, X i is the i-th random number, i is a positive integer; The calculation formula of the order K in S2 is: , where K is the order, for Round down, M is the length of the image to be encrypted, N is the width of the image to be encrypted, and log is the logarithmic function; The recursive function used to construct the K-order Hilbert curve in S2 is: , where hf(x,y,n) is the subscript when the recursion order is n at the position point (x,y), hf(x,y,n-1) is the subscript when the recursion order is n-1 at the position point (x,y), hf(m-y+1,2m-x+1,n-1) is the subscript when the recursion order is n-1 at the position point (m-y+1,2m-x+1), m is an integer, m=2 K-1 , hf(x,ym,n-1) is the subscript when the recursion order is n-1 at the position point (x,ym), hf(xm,ym,n-1) is the subscript when the recursion order is n-1 at the position point (xm,ym), n is the number of the recursion order, x is the horizontal coordinate of the image to be encrypted, y is the vertical coordinate of the image to be encrypted, and K is the order.

2. The hybrid chaotic encryption processing method for logistics risk control evidence images according to claim 1 is characterized in that: The S3 comprises the following sub-steps: S31, calling the K-order Hilbert curve to perform the first encryption on each position point in the image to be encrypted; S32, construct an encryption box vector, perform a second encryption on the position point after the first encryption, and obtain the first part of the encrypted data; S33, using a mixed chaotic sequence to encrypt the hue, saturation and brightness of each position point on the first encrypted image to obtain a second part of the encrypted data.

3. The hybrid chaotic encryption processing method for logistics risk control evidence images according to claim 2 is characterized in that: The S31 comprises the following sub-steps: S311, loop call for K-order Hilbert curve times, m=2 K-1 , K is the order; S312, when the subscript generated by the called K-order Hilbert curve is less than When , the position point on the image to be encrypted is encrypted for the first time, where M is the length of the image to be encrypted, N is the width of the image to be encrypted, and the formula for encrypting the position point on the image to be encrypted is: , ,in, is the horizontal coordinate of the position point after the first encryption, is the ordinate of the position point after the first encryption, hf(x,y,K) is the subscript generated by the K-order Hilbert curve, mod is the modulo operation, x is the abscissa of the image to be encrypted, y is the ordinate of the image to be encrypted, K is the order, and α is the first key parameter.

4. The hybrid chaotic encryption processing method for logistics risk control evidence images according to claim 2 is characterized in that: The S32 comprises the following sub-steps: S321, construct an encryption box vector, wherein the generation formula of the elements in the encryption box vector is: , where H j+1 is the j+1th element in the encrypted box vector, H j is the jth element in the encryption box vector, j is a positive integer, and α is the first key parameter; S322, traverse each position point after the first encryption, and use the elements in the encryption box vector to encrypt each position point after the first encryption in sequence to obtain the first part of the encrypted data: ,in, is the horizontal coordinate of the position point after the second encryption, is the ordinate of the position point after the second encryption, is the horizontal coordinate of the position point after the first encryption, is the ordinate of the position point after the first encryption, xor is the exclusive OR operation, and M is the length of the image to be encrypted.

5. The hybrid chaotic encryption processing method for logistics risk control evidence images according to claim 2 is characterized in that: The generation formula of the elements in the mixed chaotic sequence in S33 is: , where cf k+1 is the k+1th element in the mixed chaotic sequence, cf k is the kth element in the mixed chaotic sequence, k is a positive integer, θ is the second key parameter, β is the third key parameter, mod is the remainder operation, and cos is the cosine function.