A zero-knowledge proof encryption method, system, device, medium and product
By simplifying the zero-knowledge proof process through image filtering techniques, this method solves the problem of high computational complexity in existing methods and achieves an encryption method that provides efficient verification and strong privacy protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2026-03-24
AI Technical Summary
Existing zero-knowledge proof encryption methods are computationally complex and lack data privacy protection, making them difficult to promote in efficient verification and real-time application scenarios.
By introducing image filtering technology, a proof instruction that matches the instruction to be proved is generated, and the credibility of the communication information is verified by difference comparison, which simplifies the zero-knowledge proof process and reduces computational complexity.
It improves computational efficiency, is suitable for scenarios requiring high efficiency and frequent verification, reduces the risk of information leakage, and enhances the effectiveness of privacy protection.
Smart Images

Figure CN119720254B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data encryption, in particular to a zero-knowledge proof encryption method, system, device, medium and product. BACKGROUND
[0002] With the increasing demand for privacy protection, zero-knowledge proof technology has been widely concerned in privacy-sensitive fields such as blockchain and identity authentication. Zero-knowledge proof (ZKP) is a cryptographic technology that allows the prover to demonstrate to the verifier that he possesses specific information without revealing the specific content of the information. It has unique advantages in protecting privacy and enhancing information security, and is particularly suitable for scenarios where identity or data authenticity needs to be verified without revealing the content of the data.
[0003] In the field of privacy protection, zero-knowledge proof mainly relies on complex encryption algorithms. Existing zero-knowledge proof algorithms are mostly based on complex mathematical calculations and encryption operations, which require a large amount of computing resources. Especially when dealing with large-scale data, the high computational complexity makes it difficult to popularize zero-knowledge proof technology in some efficient verification and real-time application scenarios.
[0004] In traditional identity verification and data sharing scenarios, information content is often disclosed or transmitted during the verification process, while the advantage of zero-knowledge proof is to verify the authenticity of information without revealing the information itself. However, in traditional zero-knowledge proof methods, the confidentiality of information transmission still needs to be designed and guaranteed, and such transmission design has the risk of being cracked. SUMMARY
[0005] Therefore, the present application provides a zero-knowledge proof encryption method, system, device, medium and product, which solves the technical problems of high computational complexity and lack of data privacy protection of existing zero-knowledge proof encryption methods.
[0006] The first aspect of the present application provides a zero-knowledge proof encryption method, comprising:
[0007] When the message receiver receives the communication information sent by the message generator, the message generator sends a proof instruction to the message generator; wherein the proof instruction includes the original proof graph generated by the communication information;
[0008] The message generator generates a proof instruction matching the proof instruction in response to the proof instruction sent by the message receiver, and sends the proof instruction to the message receiver, wherein the proof instruction includes a complete filtered image obtained by image filtering the original proof graph;
[0009] The message receiver compares the complete filtered image with the pre-stored filtered image to verify the credibility of the communication information sent by the message generator based on the comparison results. The pre-stored filtered image is a partial filtered image obtained by image filtering the original proof image.
[0010] Preferably, the process of generating the original proof diagram includes:
[0011] The communication information is hashed to generate a hash value;
[0012] Convert the hash value to a decimal number;
[0013] The original proof diagram is generated using the decimal number.
[0014] Preferably, the method further includes the step of obtaining the complete filtered image by image filtering of the original proof image; the step of obtaining the complete filtered image by image filtering of the original proof image includes:
[0015] The original proof image is input into a preset first filter for image filtering to obtain an initial filtered image;
[0016] The initial filtered image is input into a preset second filter for image filtering to obtain the complete filtered image; wherein the filtering parameters of the preset first filter and the preset second filter are randomly generated.
[0017] Preferably, the method further includes: assigning the preset first filter and the preset second filter to the message generator.
[0018] Preferably, the method further includes:
[0019] The complete filtered image is segmented to obtain multiple partially filtered images;
[0020] The original proof image and at least one of the partially filtered images are assigned to the message receiver.
[0021] Preferably, the step of comparing the complete filtered image with a pre-stored filtered image by the message receiver, and verifying the credibility of the communication information sent by the message generator based on the comparison result, includes:
[0022] The message receiver calculates the difference between the pixels of the pre-stored filtered image and the corresponding position of the pre-stored filtered image in the complete filtered image to obtain the pixel difference.
[0023] Determine whether the pixel difference meets the preset difference error range;
[0024] If the pixel difference does not meet the preset difference error range, then the communication information sent by the message generator is deemed unreliable.
[0025] If the pixel difference is determined to meet the preset difference error range, then the communication information sent by the message generator is deemed credible.
[0026] Secondly, the present invention also provides a zero-knowledge proof encryption system, comprising:
[0027] A message receiving module is used to send a proof instruction to the message generating module when it receives communication information sent by the message generating module; wherein the proof instruction includes the original proof diagram generated corresponding to the communication information;
[0028] The message generation module is used to respond to the instruction to be proved sent by the message receiving module, generate a proof instruction that matches the instruction to be proved, and send the proof instruction to the message receiving module. The proof instruction includes the complete filtered image obtained after image filtering of the original proof image.
[0029] The message receiving module is also used to compare the complete filtered image with the pre-stored filtered image, and verify the credibility of the communication information sent by the message generating module based on the difference comparison result. The pre-stored filtered image is a partial filtered image obtained by image filtering of the original proof image.
[0030] Thirdly, the present invention also provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, the computer program being executed by the processor causing the processor to perform the steps of the zero-knowledge proof encryption method as described in the first aspect.
[0031] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the zero-knowledge proof encryption method as described in the first aspect.
[0032] Fifthly, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein, when the program instructions are executed by a computer, the computer performs the steps of the zero-knowledge proof encryption method as described in the first aspect.
[0033] As can be seen from the above technical solution, this invention verifies the communication information sent by the message generator after the message receiver receives the communication information sent by the message generator. By introducing image filtering technology, a proof instruction matching the instruction to be proved is generated from the complete filtered image obtained after image filtering of the original proof image. The message receiver then compares the complete filtered image with the pre-stored filtered image to verify the credibility of the communication information sent by the message generator. This simplifies the zero-knowledge verification process, reduces computational complexity, and makes it suitable for scenarios requiring high efficiency and frequent verification. The verification process only requires image comparison, improving computational efficiency and making it suitable for real-time applications. At the same time, it eliminates the need to transmit sensitive data, making the verification process simple and effective, avoiding the risk of information leakage, and improving the effectiveness of privacy protection. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This invention provides an application environment for a zero-knowledge proof encryption method.
[0036] Figure 2 A flowchart of a zero-knowledge proof encryption method provided in an embodiment of the present invention;
[0037] Figure 3 A control block diagram of a zero-knowledge proof encryption method provided in an embodiment of the present invention;
[0038] Figure 4 This is a control block diagram for generating the original image in a zero-knowledge proof encryption method provided in an embodiment of the present invention;
[0039] Figure 5 This is a control block diagram for generating a filter graph in a zero-knowledge proof encryption method provided in an embodiment of the present invention;
[0040] Figure 6 This is a pre-allocated control block diagram in a zero-knowledge proof encryption method provided by an embodiment of the present invention;
[0041] Figure 7 This is a schematic diagram of the structure of a zero-knowledge proof encryption system provided in an embodiment of the present invention;
[0042] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0043] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] The zero-knowledge proof encryption method provided in this application can be applied to, for example... Figure 1 In the application environment shown, the message generator (also known as the prover) and the message receiver (also known as the verifier) are interconnected. When the message receiver receives the communication information sent by the message generator, it sends a proof instruction to the message generator. This proof instruction includes the original proof image generated corresponding to the communication information. In response to the proof instruction sent by the message receiver, the message generator generates a proof instruction that matches the original proof instruction and sends it to the message receiver. The proof instruction includes a complete filtered image obtained by image filtering of the original proof image. The message receiver compares the complete filtered image with a pre-stored filtered image to verify the credibility of the communication information sent by the message generator. The pre-stored filtered image is a partial filtered image obtained by image filtering of the original proof image.
[0045] The message generator and the message receiver can be two different terminals or different nodes within the same system.
[0046] like Figures 2-3 As shown, this application embodiment provides a zero-knowledge proof encryption method, including the following steps S1 to S3. Wherein:
[0047] Step S1: When the message receiver receives the communication information sent by the message generator, it sends a proof instruction to the message generator; wherein, the proof instruction includes the original proof diagram generated corresponding to the communication information.
[0048] Among them, communication information refers to the information that the message receiver and the message generator need to record or transmit, including message content, creation time and additional information.
[0049] In some embodiments, the process of generating the original proof diagram includes:
[0050] Step S101: Perform hash processing on the communication information to generate a hash value.
[0051] The hashing process can be recorded as follows:
[0052]
[0053] In the formula, For communication information, For hash processing, This is a hash value.
[0054] Step S102: Convert the hash value to a decimal number.
[0055] The decimal number conversion process can be recorded as follows:
[0056]
[0057] In the formula, It is a decimal number. This is for decimal number conversion processing.
[0058] Step S103: Generate the original proof diagram using decimal numbers.
[0059] In this process, a decimal number is used as the seed number to generate the original proof image through a fixed image generation model on the system. This image can be used for comparison operations during the verification process. That is:
[0060]
[0061] In the formula, This is the original proof diagram. This is an image generation function.
[0062] Step S2: In response to the instruction to be proved sent by the message receiver, the message generator generates a proof instruction that matches the instruction to be proved, and sends the proof instruction to the message receiver. The proof instruction includes the complete filtered image obtained after image filtering of the original proof image.
[0063] The complete filtered image is obtained by filtering the original proof image.
[0064] In image filtering algorithms, neighborhood filtering is the most basic type of filtering. When performing a 3×3 neighborhood filter on an image, the filter used in this filtering process can be easily deduced by comparing the differences between the original image and the filtered image. However, when the filtering process uses two filters, that is, the original image is filtered twice by two different filters, it is theoretically extremely difficult to deduce the two filters used by comparing the original image and the filtered image.
[0065] This application's embodiments simplify the zero-knowledge verification process by introducing image filtering technology, reducing a large number of mathematical calculation steps in traditional algorithms and enabling a more efficient proof process. This simplification ensures the authenticity of the verification while significantly reducing computational costs.
[0066] Specifically, in this embodiment of the application, the method further includes the step of obtaining a complete filtered image by image filtering based on the original proof image.
[0067] The steps to obtain the complete filtered image from the original proof image after image filtering include:
[0068] Step S201: Input the original proof image into the preset first filter for image filtering to obtain the initial filtered image.
[0069] Step S202: Input the initial filtered image into the preset second filter for image filtering to obtain a complete filtered image; wherein the filtering parameters of the preset first filter and the preset second filter are randomly generated.
[0070] For example, such as Figures 3-5 As shown, two filters (filter 1 and filter 2) of the same size but with randomly generated filtering parameters are generated using a random number generator. The original image is then input into filter 1 and filter 2 sequentially for filtering to obtain the filtered image. The filtering process is defined as follows:
[0071]
[0072] In the formula, , These are filter 1 and filter 2, respectively. For the filtering process, , Two different random parameters are used to generate different filters. Then, the original image... Apply in sequence and Generate filtered image :
[0073]
[0074] Here, As the filtered image, compared with the original image It has sufficient visual difference, but it is difficult to see from The original filter parameters are derived from the reverse process. and .
[0075] It is understood that the "irreversible encrypted" image structure generated by the embodiments of this application through image filtering, that is, the message is encoded into the image through random filtering. The verifier can use this image structure for verification without obtaining specific numerical or character information, thereby more effectively protecting information privacy.
[0076] Step S3: The message receiver compares the complete filtered image with the pre-stored filtered image to verify the credibility of the communication information sent by the message generator based on the comparison results. The pre-stored filtered image is a partial filtered image obtained by filtering the original proof image.
[0077] In some embodiments, to improve verification efficiency, this application also pre-allocates information. Specifically, such as... Figure 6 As shown, after the system is ready, filter 1 and filter 2 are pre-assigned to the message generator, and the original image and filtered image are pre-assigned to the message receiver.
[0078] Zero-knowledge proof technology has unique advantages in scenarios that require a large amount of frequent verification, such as blockchain, cryptocurrency, and cloud computing. However, high-frequency use scenarios will face the pressure of data computation and transmission.
[0079] To address the challenges of data computation and transmission in high-frequency usage scenarios, embodiments of this application include:
[0080] Step S31: Perform image segmentation on the complete filtered image to obtain multiple partially filtered images.
[0081] Step S32: Assign the original proof image and at least one partially filtered image to the message receiver.
[0082] For example, the original image and partially filtered images Distributed to the message receiver. Among them, yes A subset of this, used to reduce data volume and decrease the information that the verifier needs to store. Let's assume we... Winning The subregion as , can be represented as:
[0083]
[0084] In the formula, These are the starting coordinates of the sub-region. This sub-region is compared with the filtered image provided by the proof party during the verification process.
[0085] It is understood that the image filtering zero-knowledge proof algorithm used in the embodiments of this application only needs to store limited image information and filtering parameters, which can greatly reduce the amount of data that needs to be transmitted and stored, simplify the data verification process, and improve the system's response speed and adaptability.
[0086] It should be noted that traditional zero-knowledge proof algorithms require specialized algorithmic structures and multiple verification steps to ensure the authenticity of the information. This operational complexity places high demands on the user's technical skills, making the deployment and application of zero-knowledge proofs quite difficult.
[0087] In this embodiment of the application, by organically combining image filtering and zero-knowledge proof, the verification operation is simplified by utilizing the random filtering process of the image. The verifier can complete the verification through simple image comparison, thereby reducing the application threshold of zero-knowledge proof and improving the operability and popularity of the application.
[0088] Specifically, step S3 involves the message receiver comparing the complete filtered image with the pre-stored filtered image to verify the credibility of the communication information sent by the message generator based on the comparison results. This includes:
[0089] Step S301: The message receiver calculates the difference between the pixels of the pre-stored filtered image and the corresponding position of the pre-stored filtered image in the complete filtered image to obtain the pixel difference.
[0090] The pre-stored filtered image is a partial filtered image obtained by segmenting the complete filtered image. Therefore, the pre-stored filtered image can be located in the complete filtered image to determine the corresponding position of the pre-stored filtered image in the complete filtered image.
[0091] Step S302: Determine whether the pixel difference meets the preset difference error range.
[0092] Step S303: If the pixel difference does not meet the preset difference error range, then the communication information sent by the message generator is deemed unreliable.
[0093] Step S304: If the pixel difference is determined to meet the preset difference error range, then the communication information sent by the message generator is deemed credible.
[0094] As a preferred approach, after receiving the result, the message receiver can compare the differences between the corresponding positions of its portion of the filtered image. If the pixel difference is zero, it proves that the pre-stored filtered image is identical to the pre-stored filtered image in the complete filtered image at the corresponding positions, confirming that the message generator is indeed the correct sender and has not obtained specific information about the filter used in the image. If there is a difference, it proves that the pre-stored filtered image differs from the pre-stored filtered image in the complete filtered image at the corresponding positions, confirming that the sender is not the original message generator and the received message is unreliable.
[0095] For example, after receiving the information, the message recipient will store the original image it holds. Return the image to the message generator, requesting them to provide the fully filtered image. The verifier will and The corresponding parts are used to calculate the pixel difference. If the two are consistent, it can be verified that the prover is indeed the sender of the information.
[0096] set up for and The pixel difference is:
[0097] .
[0098] The verification conditions for confirming that the certifier is indeed the sender of the information are as follows:
[0099] .
[0100] It should be noted that in this embodiment, the message receiver receives the communication information sent by the message generator and verifies it. By introducing image filtering technology, a proof instruction matching the instruction to be proved is generated from the complete filtered image obtained after image filtering of the original proof image. The message receiver then compares the complete filtered image with the pre-stored filtered image to verify the credibility of the communication information sent by the message generator. This simplifies the zero-knowledge verification process, reduces computational complexity, and makes it suitable for scenarios requiring high efficiency and frequent verification. The verification process only requires image comparison, improving computational efficiency and making it suitable for real-time applications. At the same time, there is no need to transmit sensitive data, making the verification process simple and effective, avoiding the risk of information leakage, and improving the effectiveness of privacy protection.
[0101] Based on the same inventive concept, embodiments of this application also provide a zero-knowledge proof encryption system for implementing the zero-knowledge proof encryption method involved above.
[0102] The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations of one or more zero-knowledge proof encryption system embodiments provided below can be found in the limitations of the zero-knowledge proof encryption method above, and will not be repeated here.
[0103] like Figure 7 As shown in the embodiments of this application, a zero-knowledge proof encryption system is also provided, including:
[0104] The message receiving module 100 is used to send a proof instruction to the message generating module 200 when it receives communication information sent by the message generating module 200; wherein, the proof instruction includes the original proof diagram generated corresponding to the communication information;
[0105] The message generation module 200 is used to generate a proof instruction that matches the proof instruction in response to the proof instruction sent by the message receiving module 100, and send the proof instruction to the message receiving module 100. The proof instruction includes the complete filtered image obtained after image filtering of the original proof image.
[0106] The message receiving module 100 is also used to compare the complete filtered image with the pre-stored filtered image, and to verify the credibility of the communication information sent by the message generating module 200 based on the difference comparison result. The pre-stored filtered image is a partial filtered image obtained by image filtering of the original proof image.
[0107] In some embodiments, the system further includes a proof diagram generation module 300, used to generate an original proof diagram, specifically including:
[0108] The communication information is hashed to generate a hash value;
[0109] Convert the hash value to a decimal number;
[0110] The original proof diagram is generated using decimal numbers.
[0111] In some embodiments, the system further includes a random filter generation module 400, which is used to obtain a complete filtered image based on the original proof image after image filtering.
[0112] The complete filtered image, obtained by filtering the original proof image, includes:
[0113] The original proof image is input into the preset first filter for image filtering to obtain the initial filtered image;
[0114] The initial filtered image is input into a preset second filter for image filtering to obtain a complete filtered image; wherein the filtering parameters of the preset first filter and the preset second filter are randomly generated.
[0115] In some embodiments, the system further includes a pre-allocation module 500 for allocating a preset first filter and a preset second filter to the message generator.
[0116] The pre-allocation module is also used to perform image segmentation on the complete filtered image to obtain multiple partially filtered images; and to allocate the original proof image and at least one partially filtered image to the message receiver.
[0117] In some embodiments, the message receiving module 100 includes a zero-knowledge proof module 600. The zero-knowledge proof module 600 is used to calculate the difference between the pixels of the pre-stored filtered image and the corresponding position of the pre-stored filtered image in the complete filtered image by the message receiver to obtain a pixel difference; determine whether the pixel difference is greater than a preset difference threshold; if the pixel difference is greater than the preset difference threshold, it is determined that the communication information sent by the message generator is not credible; if the pixel difference is not greater than the preset difference threshold, it is determined that the communication information sent by the message generator is credible.
[0118] like Figure 8 As shown in the embodiments of this application, an electronic device is also provided. The electronic device 10 includes a memory 20 and a processor 30. The memory 20 stores a computer program. When the computer program is executed by the processor 30, the processor 30 performs the steps of the zero-knowledge proof encryption method as described in the above embodiments.
[0119] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed, implements the steps of the zero-knowledge proof encryption method as described in the above embodiments.
[0120] This application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the zero-knowledge proof encryption method as described in the above embodiments.
[0121] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, electronic devices, computer storage media, and computer program products described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0122] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0123] In the several embodiments provided by this invention, it will be understood that each block in the flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
[0124] In the several embodiments provided by this invention, it should be understood that the disclosed systems, electronic devices, computer storage media, computer program products, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.
[0125] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0126] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0127] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for executing all or part of the steps of the methods described in the various embodiments of the present invention through a computer device (which may be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0128] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A zero-knowledge proof encryption method, characterized in that, include: When the message receiver receives the communication information sent by the message generator, it sends a proof instruction to the message generator; wherein the proof instruction includes the original proof diagram generated corresponding to the communication information; In response to the instruction to be proved sent by the message receiver, the message generator generates a proof instruction that matches the instruction to be proved and sends the proof instruction to the message receiver. The proof instruction includes the complete filtered image obtained after image filtering of the original proof image. It also includes the step of obtaining the complete filtered image by image filtering based on the original proof image; the step of obtaining the complete filtered image by image filtering based on the original proof image includes: The original proof image is input into a preset first filter for image filtering to obtain an initial filtered image; The initial filtered image is input into a preset second filter for image filtering to obtain the complete filtered image; wherein the filtering parameters of the preset first filter and the preset second filter are randomly generated. The message receiver compares the complete filtered image with the pre-stored filtered image to verify the credibility of the communication information sent by the message generator based on the comparison results. The pre-stored filtered image is a partial filtered image obtained by image filtering the original proof image.
2. The zero-knowledge proof encryption method according to claim 1, characterized in that, The process of generating the original proof diagram includes: The communication information is hashed to generate a hash value; Convert the hash value to a decimal number; The original proof diagram is generated using the decimal number.
3. The zero-knowledge proof encryption method according to claim 1, characterized in that, Also includes: The preset first filter and the preset second filter are assigned to the message generator.
4. The zero-knowledge proof encryption method according to claim 1, characterized in that, Also includes: The complete filtered image is segmented to obtain multiple partially filtered images; The original proof image and at least one of the partially filtered images are assigned to the message receiver.
5. The zero-knowledge proof encryption method according to claim 1, characterized in that, The step of comparing the complete filtered image with a pre-stored filtered image by the message receiver, and verifying the credibility of the communication information sent by the message generator based on the comparison result, includes: The message receiver calculates the difference between the pixels of the pre-stored filtered image and the corresponding position of the pre-stored filtered image in the complete filtered image to obtain the pixel difference. Determine whether the pixel difference meets the preset difference error range; If the pixel difference does not meet the preset difference error range, then the communication information sent by the message generator is deemed unreliable. If the pixel difference is determined to meet the preset difference error range, then the communication information sent by the message generator is deemed credible.
6. A zero-knowledge proof encryption system, characterized in that, include: A message receiving module is used to send a proof instruction to the message generating module when it receives communication information sent by the message generating module; wherein the proof instruction includes the original proof diagram generated corresponding to the communication information; The message generation module is used to respond to the instruction to be proved sent by the message receiving module, generate a proof instruction that matches the instruction to be proved, and send the proof instruction to the message receiving module. The proof instruction includes the complete filtered image obtained after image filtering of the original proof image. The random filtering generation module is used to obtain a complete filtered image based on the original proof image after image filtering. The complete filtered image, obtained by filtering the original proof image, includes: The original proof image is input into the preset first filter for image filtering to obtain the initial filtered image; The initial filtered image is input into a preset second filter for image filtering to obtain a complete filtered image; wherein the filtering parameters of the preset first filter and the preset second filter are randomly generated. The message receiving module is also used to compare the complete filtered image with the pre-stored filtered image, and verify the credibility of the communication information sent by the message generating module based on the difference comparison result. The pre-stored filtered image is a partial filtered image obtained by image filtering of the original proof image.
7. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the zero-knowledge proof encryption method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the steps of the zero-knowledge proof encryption method as described in any one of claims 1-5.
9. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, wherein when the program instructions are executed by a computer, the computer performs the steps of the zero-knowledge proof encryption method as described in any one of claims 1-5.
Citation Information
Patent Citations
Image encryption method based on graph wavelet transform
CN111917933A
Image file security multi-party computing method and system
CN114119021A