CN114117491A - Questionnaire method, device and medium based on block chain and homomorphic encryption - Google Patents

Questionnaire method, device and medium based on block chain and homomorphic encryption Download PDF

Info

Publication number
CN114117491A
CN114117491A CN202111435934.4A CN202111435934A CN114117491A CN 114117491 A CN114117491 A CN 114117491A CN 202111435934 A CN202111435934 A CN 202111435934A CN 114117491 A CN114117491 A CN 114117491A
Authority
CN
China
Prior art keywords
questionnaire
information
module
ciphertext
reply
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111435934.4A
Other languages
Chinese (zh)
Inventor
刘知胜
黄泼
罗桦槟
肖佳威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Storlead Technology Co ltd
Original Assignee
Shenzhen Storlead Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Storlead Technology Co ltd filed Critical Shenzhen Storlead Technology Co ltd
Priority to CN202111435934.4A priority Critical patent/CN114117491A/en
Publication of CN114117491A publication Critical patent/CN114117491A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0203Market surveys; Market polls
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption

Abstract

The invention provides a questionnaire method, a device and a medium based on block chain and homomorphic encryption, wherein the method comprises the following steps: the method comprises the steps that a questionnaire filling module obtains reply information of a user on an electronic questionnaire, the questionnaire filling module conducts encryption processing on the reply information to obtain ciphertext information corresponding to the reply information, the questionnaire filling module sends the ciphertext information to a block chain intelligent contract module, and the block chain intelligent contract module sends the ciphertext information to a questionnaire providing module based on a preset intelligent contract rule. Therefore, the questionnaire filling module, the block chain intelligent contract module and the questionnaire providing module assist in decrypting and separating result statistics and results, and the filling information of the user is prevented from being known by the questionnaire provider, so that the privacy information of the user is protected, and the safety of the reply information of the user in the transmission process is effectively improved. Meanwhile, the ciphertext information is guaranteed not to be falsified based on the intelligent contract setting of the block chain, and cheating is prevented due to the traceability characteristic.

Description

Questionnaire method, device and medium based on block chain and homomorphic encryption
Technical Field
The invention relates to the technical field of questionnaire survey, in particular to a questionnaire survey method, a questionnaire survey device and a questionnaire survey medium based on block chain and homomorphic encryption.
Background
Currently, with the development of big data, electronic questionnaires become an important way of market research. In order to protect private information of a respondent, an anonymous form is generally adopted, but when the system collects questionnaires, user information is exposed to the collecting system, so that the technical problem of low safety exists, and after the questionnaires are collected, the respondent cannot confirm whether the questionnaires are truly counted, so that the technical problem that cheating of the collecting system cannot be eliminated exists.
Therefore, the prior art is to be improved.
Disclosure of Invention
The invention mainly aims to provide a questionnaire method, a device and a medium based on block chain and homomorphic encryption, so as to at least solve the technical problem of low security in the existing electronic questionnaire survey method.
The invention provides a questionnaire method based on block chain and homomorphic encryption, which is applied to a user information processing system with a questionnaire filling module, a block chain intelligent contract module and a questionnaire providing module, and comprises the following steps:
the questionnaire filling module acquires the reply information of the user on the electronic questionnaire;
the questionnaire filling module encrypts the reply information to obtain ciphertext information corresponding to the reply information;
the questionnaire filling module sends the ciphertext information to the block chain intelligent contract module;
and the block chain intelligent contract module sends the ciphertext information to the questionnaire providing module based on a preset intelligent contract rule.
In a second aspect of the present invention, an electronic device is provided, which includes a memory, a processor, and a bus;
the bus is used for realizing connection communication between the memory and the processor;
the processor is configured to execute a computer program stored on the memory;
the processor, when executing the computer program, implements the steps in the message processing method provided by the first aspect.
In a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program is configured to implement the steps in the message processing method provided in the first aspect when executed by a processor.
The invention provides a questionnaire method, a device and a medium based on block chain and homomorphic encryption. Therefore, the questionnaire filling module, the block chain intelligent contract module and the questionnaire providing module assist in decrypting and separating result statistics and results, and the filling information of the user is prevented from being known by the questionnaire provider, so that the privacy information of the user is protected, and the safety of the reply information of the user in the transmission process is effectively improved. Meanwhile, the ciphertext information is guaranteed not to be falsified based on the intelligent contract setting of the block chain, and cheating is prevented due to the traceability characteristic.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of a customer information handling system according to the present invention;
fig. 2 is a schematic flowchart of a questionnaire method based on block chain and homomorphic encryption according to a first embodiment of the present invention;
FIG. 3 is a diagram of a text reply message in accordance with the present invention;
fig. 4 is a schematic flowchart of a questionnaire method based on block chain and homomorphic encryption according to a second embodiment of the present invention;
fig. 5 is a schematic flowchart of a questionnaire method based on block chain and homomorphic encryption according to a third embodiment of the present invention;
fig. 6 is a schematic diagram illustrating module connection inside an electronic device according to a fourth embodiment of the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It is noted that relative terms such as "first," "second," and the like may be used to describe various components, but these terms are not intended to limit the components. These terms are only used to distinguish one component from another component. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the present invention. The term "and/or" refers to a combination of any one or more of the associated items and the descriptive items.
As shown in fig. 1-2, the questionnaire method based on block chain and homomorphic encryption of the present invention is applied to a user information processing system having a questionnaire filling module, a block chain intelligent contract module, and a questionnaire providing module. The questionnaire method based on block chain and homomorphic encryption comprises the following steps:
step S201, a questionnaire filling module acquires reply information of a user on an electronic questionnaire;
specifically, the electronic questionnaire may be a simulated questionnaire with a plurality of survey questions (the simulated questionnaire may be displayed on a questionnaire filling module), and the user may answer in the questionnaire filling module to generate the reply information, wherein the questionnaire filling module may be a mobile terminal;
step S202, the questionnaire filling module encrypts the reply information to obtain ciphertext information corresponding to the reply information;
step S203, the questionnaire filling module sends the ciphertext information to the block chain intelligent contract module;
step S204, the block chain intelligent contract module sends the ciphertext information to the questionnaire providing module based on a preset intelligent contract rule; wherein, the questionnaire providing module can be a client.
In this embodiment, the blockchain intelligent contract module represents a blockchain integrated with a contract module, and the contract module may be a program running on the blockchain (for example, the program is a piece of computer code which is programmed in advance), and the program is stored in the blockchain, and once called by a user, the execution of the computing code is started immediately through the blockchain virtual execution environment. That is, after the block chain intelligent contract module receives the ciphertext information, the ciphertext information is sent to the questionnaire providing module based on the preset intelligent contract rule (automatic sending rule). It can be seen that the blockchain intelligent contract module has the characteristics of being necessary to execute, not easy to tamper and traceable. Therefore, the transmission process of the ciphertext information among the block chain intelligent contract module, the questionnaire filling module and the questionnaire providing module can ensure that the ciphertext information is not falsified, has the characteristic of traceability and prevents cheating.
After a user fills in reply information on an electronic questionnaire, a questionnaire filling module acquires the reply information of the user on the electronic questionnaire and encrypts the reply information to obtain ciphertext information corresponding to the reply information, the questionnaire filling module sends the ciphertext information to a block chain intelligent contract module, and the block chain intelligent contract module sends the ciphertext information to a questionnaire providing module based on a preset intelligent contract rule. Therefore, the questionnaire filling module, the block chain intelligent contract module and the questionnaire providing module assist in separating the result statistics and the result decryption, preventing the filling information of the user from being known by the questionnaire provider and separating the encryption and the decryption, thereby protecting the privacy information of the user,
specifically, after the result statistics and the result decryption are separated, the questionnaire is counted by using homomorphic addition, so that the specific content of the questionnaire is kept secret, the specific content of the statistical result is kept secret, and the homomorphic statistical result is sent to a questionnaire provider; and the questionnaire provider decrypts the homomorphic statistical result to obtain a statistical result, and does not know the content filled by each questionnaire filler. The privacy of the writer is completely protected. The questionnaire provider also can not modify the content of the survey, and the survey result is guaranteed to be free from cheating.
The safety of the reply information of the user in the transmission process is effectively improved. Meanwhile, the ciphertext information is guaranteed not to be falsified based on the intelligent contract setting of the block chain, and cheating is prevented due to the traceability characteristic.
In this embodiment, the reply information includes option reply information and text reply information, and the step of encrypting the reply information by the questionnaire filling module to obtain ciphertext information corresponding to the reply information includes: the questionnaire filling module performs first encryption processing on the option reply information to obtain first ciphertext information, and performs second encryption processing on the text reply information to obtain second ciphertext information; the first ciphertext information and the second ciphertext information form ciphertext information.
Specifically, the option reply information may refer to table 1 below, and the electronic questionnaire may have a plurality of items, each of which requires the user to check one selection, and the selection performed by the user for each item represents the option reply information.
TABLE 1
Figure BDA0003377300970000041
The survey selectable item is an option designed by a designer, the option is selected by the surveyor, the selected code is 1, the unselected code is 0, and the final statistical result of the option is the result selected by all the surveyors. That is, the option reply information is the code information (the code information is binary code information, which generally includes binary 0 and binary 1).
For example, a questionnaire designer first specifies items to be investigated, designs a questionnaire in a style of the items to be investigated, and arranges the items on the questionnaire in order. For example, if there are N survey items and each item has m options, the questionnaire has N — N × m options. The questionnaire designer sets the manner of extracting options according to the position of the survey item on the questionnaire. And designing an intelligent contract to carry out statistics on each project according to the mode of extracting the options. For example, option 1 for extracting the first item is the first column of row 1 of the questionnaire table. If the respondent selects this option, the selection of this respondent on this option is 1; if the candidate has not selected this option, the candidate's selection on this option is 0. the whole questionnaire is extracted as a sequence of 01N, m 0110.
Specifically, as shown in fig. 3, the electronic questionnaire may have a plurality of events (e.g., events for how spam is handled), and the text response information is text information to which the user responds for each event.
After the questionnaire filling module obtains the option reply information and the text reply information, different encryption processing is executed according to different reply information, so that ciphertext information consisting of the first ciphertext information and the second ciphertext information is obtained, and the safety of the user reply information is improved based on the execution of different encryption processing on different reply information. For example, the questionnaire is divided into two parts, namely option reply information and text reply information, and privacy protection is performed by adopting GSW homomorphic encryption and elliptic curve ECC encryption respectively.
Fig. 4 shows a questionnaire method based on block chaining and homomorphic encryption according to a second embodiment of the present invention, where the first encryption process includes a GSW homomorphic encryption process, and the questionnaire filling module performs a first encryption process on the option reply information to obtain a first ciphertext information, and includes:
step S401, the questionnaire filling module generates a selection parameter set according to the option reply information;
in the present embodiment, parameters are selectedThe set s ═ N, q, χ, m, N denotes the dimension of the lattice, q denotes the modulus, χ denotes the distribution of the errors, m ═ o (nlogq), the parameter N ═ N +1 ×, the modulus, the dimension of the lattice, the distribution of the errors can be obtained from the option reply information, and
Figure BDA0003377300970000051
wherein n, q, χ represent the preset safety parameter (the specific numerical value of these safety parameters is preset by the questionnaire setter), generally speaking, the more the digit of the specific numerical value, the higher the safety level, the more difficult it is to be cracked.
Step S402, the questionnaire filling module generates a first private key according to the selection parameter set;
in the present embodiment, parameters are selected
Figure BDA0003377300970000052
Generating a first private key
Figure BDA0003377300970000053
Order to
Figure BDA0003377300970000054
Wherein the content of the first and second substances,
Figure BDA0003377300970000055
representation and first private key
Figure BDA0003377300970000061
Is predetermined. Z is a finite group, Zq ═ 0,1, q-1, that is, only q integers can be taken,
Figure BDA0003377300970000062
comprises n numbers, wherein each number is an integer (q modulus) with one value from 0 to q-1.
Step S403, the questionnaire filling module generates a first public key according to a preset first selection uniform distribution matrix;
in the present embodiment, the uniform distribution matrix is selected based on a preset first selection
Figure BDA0003377300970000063
Error vector
Figure BDA0003377300970000064
Computing
Figure BDA0003377300970000065
Generating a first public key
Figure BDA0003377300970000066
The first public key a and the first private key can be known
Figure BDA0003377300970000067
There is a relationship:
Figure BDA0003377300970000068
step S404, the questionnaire filling module respectively carries out GSW homomorphic encryption processing on each reply information in the option reply information according to the first public key and a preset second selection uniform distribution matrix to obtain a plurality of first actual ciphertext information, and obtains the first ciphertext information according to the plurality of first actual ciphertext information; each reply message is a reply message corresponding to each bit in the option reply message.
In the present embodiment, the plaintext m ∈ ZqBased on the second selection uniform distribution matrix R ∈ {0,1}N×mCalculating the first actual ciphertext information
Figure BDA0003377300970000069
Wherein, flat is an arithmetic rule (a fifth calculation formula described later), and BitDecomp is an arithmetic rule (a second calculation formula described later). For example, the first ciphertext information may comprise C1And C2. In general, a plaintext is a string of characters. I isNThe unit matrix is an N-N matrix, only the diagonal is 1, and the rest is 0.
Specifically, the GSW homomorphic encryption in the technical scheme can only encrypt one bit each time, and an RAO _ GSW homomorphic scheme that can encrypt multiple bits once can be adopted, so that a designer can use one public key and private key pair. GSW homomorphic encryption can also be replaced with second generation RLWE (loop-based LWE).
Fig. 5 shows a questionnaire method based on block chaining and homomorphic encryption according to a third embodiment of the present invention, where the second encryption process includes an elliptic curve ECC encryption process, and the questionnaire filling module performs a second encryption process on the text reply information to obtain a second ciphertext information, and the method includes:
step S501, the questionnaire filling module determines coordinate value information corresponding to a base point based on a preset elliptic curve expression;
specifically, the predetermined elliptic curve expression Ep (a, b) may be y2=x3+ ax + b, the base point G may be a point on the elliptic curve corresponding to the elliptic curve expression, and the coordinate value information of the base point G is (x, y);
step S502, the questionnaire filling module generates a second public key according to the coordinate value information and the second private key; specifically, the second public key pk is the second private key sk with the base point G;
step S503, the questionnaire filling module generates a random number according to the text reply information and the elliptic curve expression; specifically, the text reply message m is encoded into an elliptic curve expression Ep (a, b), and a random number r is generated;
step S504, the questionnaire filling module performs elliptic curve ECC encryption processing on each reply message in the text reply message according to the random number and the second public key, to obtain a plurality of second actual ciphertext messages, where the plurality of second actual ciphertext messages constitute the second ciphertext message.
Specifically, the second actual ciphertext information may include C3And C4Wherein, C3=m+r*pk,C4R G. The above embodiment implements the elliptic curve ECC encryption processing on the text reply information through steps S501 to S504, and has the characteristics of small calculation amount and high security strength.
In this embodiment, the step of the block chain intelligent contract module sending the ciphertext information to the questionnaire providing module based on the preset intelligent contract rule includes: the block chain intelligent contract module performs homomorphic addition operation on the first ciphertext information to obtain first ciphertext information to be transmitted, the block chain intelligent contract module randomly scrambles a plurality of second actual ciphertext information in the second ciphertext information to obtain second ciphertext information to be transmitted, and the block chain intelligent contract module transmits the first ciphertext information to be transmitted and the second ciphertext information to be transmitted to the questionnaire providing module.
Wherein the homomorphic addition operation comprises a first calculation formula as follows:
Figure BDA0003377300970000071
specifically, in the first encryption processing, the second calculation formula is
Figure BDA0003377300970000072
Order to
Figure BDA0003377300970000073
Wherein the content of the first and second substances,
Figure BDA0003377300970000074
comprises k numbers, wherein each number is an integer with one value from 0 to q-1.
The third calculation formula is
Figure BDA0003377300970000075
Wherein a isi,jBit aiThe j-th bit of the binary expansion;
Figure BDA0003377300970000076
for the inverse operation of BitDecomp, for
Figure BDA0003377300970000077
The fourth calculation formula is
Figure BDA0003377300970000081
The fifth calculation formula is
Figure BDA0003377300970000082
After the Flatten operation, a {0,1} sequence {0,1} with the length of N is obtainedN(first ciphertext information to be transmitted). The second calculation formula, the third calculation formula, the fourth calculation formula, and the fifth calculation formula are operation rules in the first encryption processing.
Specifically, homomorphic addition operation is performed on the first ciphertext information, the obtained first ciphertext information to be sent can be placed on an untrusted third party platform for calculation, and privacy cannot be revealed. And the second ciphertext information is scrambled randomly, so that a designer cannot distinguish which respondent's survey opinion specifically is because the second ciphertext information is scrambled after being encrypted, and the privacy image of the respondent is protected.
In this embodiment, the user information processing system further has a statistical announcement module;
after the step of sending the first ciphertext information to be sent and the second ciphertext information to be sent to the questionnaire providing module by the block chain intelligent contract module, the method further comprises the following steps: the questionnaire providing module is used for respectively decrypting the first ciphertext information to be transmitted and the second ciphertext information to be transmitted by adopting a first private key to obtain total statistical information and actual text reply information related to option reply information; wherein the ordering of the actual text reply information is different from the ordering of the text reply information; the questionnaire providing module sends the overall statistical information and the actual text reply information to the statistical bulletin module.
Specifically, when the questionnaire providing module decrypts, for the first ciphertext information to be sent, the decryption process is as follows:
Figure BDA0003377300970000083
the first l coordinates of (1, 2., 2)l-1,vi=2i∈(q/4,q/2],CiIs line i of C, calculate
Figure BDA0003377300970000084
Obtaining overall statistical information
Figure BDA0003377300970000085
When the questionnaire providing module decrypts, aiming at the second ciphertext information to be sent, the decryption process is as follows: the questionnaire providing module receives the second ciphertext message (C)3,C4) Then, C is calculated3-sk*C4Thus obtaining the actual text reply information. The statistical bulletin module can display the overall statistical information and the actual text reply information.
Before the step of the questionnaire filling module acquiring the reply information of the user on the electronic questionnaire, the method further comprises the following steps: the questionnaire filling module receives a questionnaire request instruction of a user; wherein, the request questionnaire instruction carries user registration information; the questionnaire filling module sends a request questionnaire instruction to the questionnaire providing module, the questionnaire providing module detects whether the user does not answer the questionnaire according to the user registration information, and the questionnaire providing module sends the electronic questionnaire to the questionnaire filling module when the questionnaire providing module detects that the user does not answer the questionnaire. Specifically, before the user replies, the user needs to input a questionnaire request instruction (the questionnaire request instruction may carry user registration information of the user, such as identity card information), so that the questionnaire providing module may verify the user registration information to detect whether the user does not reply to the questionnaire, and when the questionnaire providing module detects that the user does not reply to the questionnaire, the questionnaire providing module sends the electronic questionnaire to the questionnaire filling module.
In this embodiment, the questionnaire request instruction further carries a questionnaire type, and before the step of sending the electronic questionnaire to the questionnaire filling module by the questionnaire providing module, the method further includes: the questionnaire providing module obtains the corresponding electronic questionnaire and the corresponding reply time limit according to the questionnaire type, and the questionnaire providing module displays the electronic questionnaire and the reply time limit in the same display interface. The questionnaire providing module can provide different types of electronic questionnaires for the user, the electronic questionnaires with different types have different response time limits, and the user who answers can be prompted by the electronic questionnaire providing module through displaying the electronic questionnaire with different types in the same display interface, so that overtime is avoided.
Fig. 6 shows an electronic device provided in a fourth embodiment of the present invention, which can be used to implement the questionnaire method based on block chain and homomorphic encryption in any of the foregoing embodiments. The electronic device includes:
memory 601, processor 602, bus 603, and computer programs stored on memory 601 and executable on processor 602, memory 601 and processor 602 connected by bus 603. The processor 602, when executing the computer program, implements the questionnaire method based on blockchain and homomorphic encryption in the foregoing embodiments. Wherein the number of processors may be one or more.
The Memory 601 may be a high-speed Random Access Memory (RAM) Memory, or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 601 is used for storing executable program code, and the processor 602 is coupled with the memory 601.
Further, an embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium may be provided in the electronic device in the foregoing embodiments, and the computer-readable storage medium may be a memory.
The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the block chain and homomorphic encryption based questionnaire method in the foregoing embodiments. Further, the computer-readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a readable storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned readable storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A questionnaire method based on block chain and homomorphic encryption is applied to a user information processing system with a questionnaire filling module, a block chain intelligent contract module and a questionnaire providing module, and comprises the following steps:
the questionnaire filling module acquires the reply information of the user on the electronic questionnaire;
the questionnaire filling module encrypts the reply information to obtain ciphertext information corresponding to the reply information;
the questionnaire filling module sends the ciphertext information to the block chain intelligent contract module;
and the block chain intelligent contract module sends the ciphertext information to the questionnaire providing module based on a preset intelligent contract rule.
2. The questionnaire method based on blockchain and homomorphic encryption of claim 1, wherein the reply information comprises option reply information and text reply information;
the step of encrypting the reply information by the questionnaire filling module to obtain ciphertext information corresponding to the reply information includes:
the questionnaire filling module performs first encryption processing on the option reply information to obtain first ciphertext information;
the questionnaire filling module carries out second encryption processing on the text reply information to obtain second ciphertext information; and the first ciphertext information and the second ciphertext information form the ciphertext information.
3. The questionnaire method based on blockchain and homomorphic encryption of claim 2, wherein the first encryption process comprises a GSW homomorphic encryption process;
the questionnaire filling module is used for carrying out first encryption processing on the option reply information to obtain first ciphertext information, and the method comprises the following steps of:
the questionnaire filling module generates a selection parameter set according to the option reply information;
the questionnaire filling module generates a first private key according to the selection parameter set;
the questionnaire filling module generates a first public key according to a preset first selection uniform distribution matrix;
the questionnaire filling module is used for respectively carrying out GSW homomorphic encryption processing on each reply message in the option reply messages according to the first public key and a preset second selection uniform distribution matrix to obtain a plurality of first actual ciphertext messages, and obtaining first ciphertext messages according to the plurality of first actual ciphertext messages; each reply message is a reply message corresponding to each bit in the option reply message.
4. The questionnaire method based on blockchain and homomorphic encryption of claim 3, wherein the second encryption process comprises an elliptic curve ECC encryption process;
the step of the questionnaire filling module performing second encryption processing on the text reply information to obtain second ciphertext information comprises the following steps:
the questionnaire filling module determines coordinate value information corresponding to a base point based on a preset elliptic curve expression;
the questionnaire filling module generates a second public key according to the coordinate value information and a second private key;
the questionnaire filling module generates a random number according to the text reply information and the elliptic curve expression;
and the questionnaire filling module is used for respectively carrying out elliptic curve ECC (error correction code) encryption processing on each reply message in the text reply message according to the random number and a second public key to obtain a plurality of second actual ciphertext messages, wherein the plurality of second actual ciphertext messages form the second ciphertext message.
5. The questionnaire method based on blockchain and homomorphic encryption of claim 4, wherein the step of sending the ciphertext information to the questionnaire providing module by the blockchain intelligent contract module based on a preset intelligent contract rule comprises:
the block chain intelligent contract module performs homomorphic addition operation on the first ciphertext information to obtain first ciphertext information to be sent;
the block chain intelligent contract module randomly scrambles a plurality of second actual ciphertext information in second ciphertext information to obtain second ciphertext information to be sent;
and the block chain intelligent contract module sends the first ciphertext information to be sent and the second ciphertext information to be sent to the questionnaire providing module.
6. The block chain and homomorphic encryption based questionnaire method of claim 5, wherein said user information processing system further has a statistical bulletin module;
after the step of sending the first ciphertext information to be sent and the second ciphertext information to be sent to the questionnaire providing module by the block chain intelligent contract module, the method further includes:
the questionnaire providing module is used for respectively decrypting the first ciphertext information to be sent and the second ciphertext information to be sent by adopting a first private key to obtain total statistical information and actual text reply information related to the option reply information; wherein the actual text reply information has a different ranking than the text reply information;
and the questionnaire providing module sends the overall statistical information and the actual text reply information to the statistical bulletin module.
7. The questionnaire method based on blockchain and homomorphic encryption of any one of claims 1-6, wherein before the step of the questionnaire filling module obtaining the reply information of the user on the electronic questionnaire, further comprising:
the questionnaire filling module receives a questionnaire request instruction of a user; wherein, the request questionnaire instruction carries user registration information;
the questionnaire filling module sends the request questionnaire instruction to a questionnaire providing module;
the questionnaire providing module detects whether the user does not answer the questionnaire according to the user registration information;
and when the questionnaire providing module detects that the user does not answer the questionnaire, the questionnaire providing module sends the electronic questionnaire to the questionnaire filling module.
8. The blockchain and homomorphic encryption based questionnaire method of claim 7, wherein the request questionnaire instruction further carries a questionnaire type;
before the step of sending the electronic questionnaire to the questionnaire filling module, the questionnaire providing module further comprises:
the questionnaire providing module acquires a corresponding electronic questionnaire and a reply time limit according to the questionnaire type;
and the questionnaire providing module displays the electronic questionnaire and the reply time limit in the same display interface.
9. An electronic device, comprising a memory, a processor and a bus;
the bus is used for realizing connection communication between the memory and the processor;
the processor is configured to execute a computer program stored on the memory;
the processor, when executing the computer program, performs the steps of the method of any one of claims 1 to 8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202111435934.4A 2021-11-26 2021-11-26 Questionnaire method, device and medium based on block chain and homomorphic encryption Pending CN114117491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111435934.4A CN114117491A (en) 2021-11-26 2021-11-26 Questionnaire method, device and medium based on block chain and homomorphic encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111435934.4A CN114117491A (en) 2021-11-26 2021-11-26 Questionnaire method, device and medium based on block chain and homomorphic encryption

Publications (1)

Publication Number Publication Date
CN114117491A true CN114117491A (en) 2022-03-01

Family

ID=80367860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111435934.4A Pending CN114117491A (en) 2021-11-26 2021-11-26 Questionnaire method, device and medium based on block chain and homomorphic encryption

Country Status (1)

Country Link
CN (1) CN114117491A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114969211A (en) * 2022-07-28 2022-08-30 中航信移动科技有限公司 Civil aviation data processing system based on block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114969211A (en) * 2022-07-28 2022-08-30 中航信移动科技有限公司 Civil aviation data processing system based on block chain
CN114969211B (en) * 2022-07-28 2022-09-30 中航信移动科技有限公司 Civil aviation data processing system based on block chain

Similar Documents

Publication Publication Date Title
US11038679B2 (en) Secure multi-party computation method and apparatus, and electronic device
EP3779751B1 (en) Multi-party security computing method and apparatus, and electronic device
CN109067528B (en) Password operation method, work key creation method, password service platform and equipment
Hao et al. Deleting secret data with public verifiability
CN111107066A (en) Sensitive data transmission method and system, electronic equipment and storage medium
CN103023657B (en) Security verification system based on distributed network transaction
CN111314069A (en) Block chain-based shaking system and method, electronic device and storage medium
CN111291122B (en) Bidding method and device based on block chain
CN112199697A (en) Information processing method, device, equipment and medium based on shared root key
CN114117491A (en) Questionnaire method, device and medium based on block chain and homomorphic encryption
CN111368322B (en) File decryption method and device, electronic equipment and storage medium
JP4708713B2 (en) Confidential information management system, confidential information management method, and confidential information management program
CN114500044A (en) Data verification method and device, storage medium and electronic equipment
CN111092721B (en) Method and device for setting access password
CN114036546A (en) Identity verification method and device based on mobile phone number, computer equipment and medium
CN112800479A (en) Multi-party combined data processing method and device by using trusted third party
CN114006689B (en) Data processing method, device and medium based on federal learning
CN110598486B (en) Virtual keyboard encryption method and device and readable storage medium
CN111191272A (en) Data desensitization method, electronic device and storage medium
CN117061128B (en) Verification method and device for data replacement, storage medium and electronic equipment
US11874950B1 (en) Protecting membership for secure computation and communication
CN112165383B (en) Encryption method, device, equipment and medium based on shared root key
CN111669348B (en) Account number retrieving method and computer readable storage medium
CN117014229B (en) Service data safety transmission method and system
US20210250337A1 (en) Method and device for matching evaluation of structured data sets protected by encryption

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination