CN109359476A - A kind of two side's method for mode matching and device of hiding input - Google Patents
A kind of two side's method for mode matching and device of hiding input Download PDFInfo
- Publication number
- CN109359476A CN109359476A CN201811258454.3A CN201811258454A CN109359476A CN 109359476 A CN109359476 A CN 109359476A CN 201811258454 A CN201811258454 A CN 201811258454A CN 109359476 A CN109359476 A CN 109359476A
- Authority
- CN
- China
- Prior art keywords
- mode
- holder
- text
- matching
- input
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Bioethics (AREA)
- Document Processing Apparatus (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses kind of a kind of two side's method for mode matching and device of hiding input, this method comprises: mode holder receive user it is to be found to mould-fixed, text holder receives the text set of database;Mode holder calls Shamir Secret Sharing Scheme, generates the mode array formed by several Duis;According to every number pair in mode array, mode holds the random number that direction text holder sends evaluator value, and mode holder and text holder run one time 2 and take 1 ignorant transport protocol, and text holder obtains text array;According to the numerical value in text array, one group of test data is calculated line by line;The test data that text holder sequentially inputs judges whether the random number of input corresponding with mode holder is equal, after the completion of test, the output of text holder forms Bit String, wherein 1 position occurred and the position to mould-fixed in text set, if the string is full 0, it fails to match.
Description
Technical field
The disclosure belongs to the technical field of pattern match, is related to the two side's method for mode matching and dress of a kind of hiding input
It sets.
Background technique
Only there is provided background technical informations relevant to the disclosure for the statement of this part, it is not necessary to so constitute first skill
Art.
Pattern match is one important underlying issue of computer science, gives a substring, it is desirable that in some word
All substrings identical with the substring are found out in symbol string.It is substantially one and searches problem, that is, searches a given substring
(referred to as mode) p ∈ ∑mIn main string (referred to as text) t ∈ ∑nThe position of middle appearance, wherein ∑ is a character set.If p and t
It is string of binary characters, then ∑={ 0,1 }.For example, p=" 0100111001 ", t=" 001 ", then the position that t occurs in p
It is set to 3 and 8.
Pattern match is in fields extensive applications such as information retrieval, gene matching, recognitions of face.In current distribution
In network environment, pattern match generally requires to carry out between different entities.For example, storing all kinds of bases in gene database
Because of data, user wishes to search whether that there are some genetic fragments in gene database.Traditional lookup process is generally, and is used
The genetic fragment (i.e. mode) that family is searched needed for submitting, gene database return to lookup in local operating mode matching algorithm
As a result.However, looked into content must be informed database by the privacy of traditional lookup process and unprotected user, i.e. user.When
When carrying out the entity of pattern match has secret protection demand, traditional pattern matching mode will be unable to meet.
Summary of the invention
For the deficiencies in the prior art, asking for privacy of user can not be protected by solving traditional method for mode matching
Topic, one or more other embodiments of the present disclosure provide the two side's method for mode matching and device of a kind of hiding input, realize and use
Family is to be found to maintain secrecy to data library to mould-fixed, and user only obtains and gives mould-fixed appearance position in the database, can not
Other any information about database are obtained, while protecting privacy of user and database information.
According to the one aspect of one or more other embodiments of the present disclosure, a kind of two side's pattern match of hiding input are provided
Method.
A kind of two side's method for mode matching of hiding input, this method comprises:
Mode holder receive user it is to be found give mould-fixed, text holder receive database text set;
It will be matched to mould-fixed with substring identical with given modal length in text set, until completing in text set
All the matching of substring identical with given modal length, matched specific method include:
Mode holder calls Shamir Secret Sharing Scheme, chooses random number and multinomial is arranged, and calculated by random number
Polynomial value generates the mode array formed by several Duis according to the bit value of corresponding position in mode;
According to every number pair in mode array, mode holds direction text holder and sends the random of evaluator value
Number, the input of text holder are the bit value of substring corresponding position, and mode holder and text holder run one time 2 and take
1 ignorant transport protocol, text holder obtain text array;
According to the numerical value in text array, one group of test data is calculated line by line;
The test data that text holder sequentially inputs, judge corresponding with mode holder input random number whether phase
Deng, if equal text holder output 1,0, after the completion of test is otherwise exported, the output of text holder forms Bit String, wherein
1 position occurred and the position to mould-fixed in text set, if the string is full 0, it fails to match.
Further, in the method, the mode in mode holder is p ∈ { 0,1 }m, m is the length of p;Text is held
Text in side is t ∈ { 0,1 }n, n is the length of t, and n >=m, by method for mode matching, mode holder only obtains p in t
The position of middle appearance, while mode p maintains secrecy to text holder P.
Further, in the method, it is given in text holder in mould-fixed p and text t in i-th of m eldest son's String matching,
The specific method of mode array formed by several Duis that generates includes:
Mode holder calls Shamir Secret Sharing Scheme, randomly selects random number a in set { 1,2 ..., q }i,0,
ai,1,ai,2,..,ai,m-1, q is Big prime, enables si=ai,0, multinomial is set:
fi(x)=ai,m-1xm-1+ai,m-2xm-2+...+ai,1x+simod q;
For j ∈ { 1,2 ..., m }, x is randomly selected in set { 1,2 ..., q }i,j, calculate
It is randomly selected in set { 1,2 ..., q }Wherein, σ ∈ { 0,1 } is the bit value of jth position in p;
Mode holder generates the mode array that is formed by several Duis, and as in ignorant transport protocol mode holder it is defeated
Enter information, the mode array are as follows:
Further, in the method, it is given in text holder in mould-fixed p and text t in i-th of m eldest son's String matching,
Several right for each of the mode array, mode holder and text holder run one time 2 and take 1 ignorant transmission association
View, runs (n-m+1) m times altogether.
Further, in the method, it is given in text holder in mould-fixed p and text t in i-th of m eldest son's String matching,
Described 2 take the specific method of 1 ignorant transport protocol to include:
Text holder each run 2 takes the input of 1 ignorant transport protocol are as follows: i-th of m long substring t in ti=σi,1
σi,2...σi,mIn j-th of bit value σi,j;
Mode holder each run 2 takes the input of 1 ignorant transport protocol for the current number pair of mode array:
It has executed one time 2 after taking 1 ignorant transport protocol, text holder obtains
It has executed after (n-m+1) take 1 ignorant transport protocol m times, text holder obtains text array:
Further, in the method, it is given in text holder in mould-fixed p and text t in i-th of m eldest son's String matching,
According to the numerical value in text array, calculate line by line:Obtain n-m+1 value
Form one group of test data.
Further, in the method, it is given in text holder in mould-fixed p and text t in i-th of m eldest son's String matching,
Mode holder and text holder execute n-m+1 two side's equivalence test protocols of safety jointly, wherein text holder's conduct
Sender, mode holder execute in two side's equivalence test protocols of safety, text holder's is defeated as recipient in i-th
Enter forThe input of mode holder is si;According to the function of two side's equivalence test protocol of safety, ifThen mode is held
Side's output 1, otherwise exports 0;Text holder does not export in the agreement;
N-m+1 times safety two side's equivalence test protocols be finished after, mode holder by output valve form a n-m+1
Long Bit String, 1 position that occurs is the position that p occurs in t in the string;If the string is full 0 string, it fails to match.
Further, this method further includes supporting the matching with asterisk wildcard, contains wildcard in the mode p of mode holder
Symbol, i.e. mode p ∈ { 0,1, * }m, in generating the mode array formed by several Duis, if jth position is wildcard bit,
X is randomly selected in set { 1,2 ..., q }i,j,It calculatesWherein σ ∈
It { 0,1 } is the bit value of jth position in p;
Mode holder generates following several right:
Further, this method further includes supporting approximate match, and the mode p length of mode holder is m, m' therein
(m'≤m) is mutually all successful match with text substring, and the specific method for generating the mode array formed by several Duis includes:
Mode holder calls Shamir Secret Sharing Scheme, randomly selects random number a in set { 1,2 ..., q }i,0,
ai,1,ai,2,..,ai,m'-1, q is Big prime, enables si=ai,0, multinomial is set:
fi(x)=ai,m'-1xm'-1+ai,m'-2xm'-2+...+ai,1x+simod q;
For j ∈ { 1,2 ..., m }, x is randomly selected in set { 1,2 ..., q }i,j, calculate
It is randomly selected in set { 1,2 ..., q }Wherein, σ ∈ { 0,1 } is the bit value of jth position in p;
Mode holder generates the mode array that is formed by several Duis, and as in ignorant transport protocol mode holder it is defeated
Enter information, the mode array are as follows:
According to the other side of one or more other embodiments of the present disclosure, a kind of computer-readable storage medium is also provided
Matter.
A kind of computer readable storage medium, wherein being stored with a plurality of instruction, described instruction is suitable for by terminal device
Reason device loads and executes a kind of two side's method for mode matching of hiding input.
According to the other side of one or more other embodiments of the present disclosure, a kind of terminal device is also provided.
A kind of terminal device, using internet terminal equipment, including processor and computer readable storage medium, processor
For realizing each instruction;Computer readable storage medium is suitable for by processor load simultaneously for storing a plurality of instruction, described instruction
Execute a kind of two side's method for mode matching of hiding input.
The disclosure the utility model has the advantages that
(1) the two side's method for mode matching and device of a kind of hiding input of the present invention, are held by this method mode
The side of having can obtain the position that p occurs in t, while mode p maintains secrecy to text holder, and mode holder is in addition to obtaining p
Except the position occurred in t, other any information about text t can not be obtained.
(2) the two side's method for mode matching and device of a kind of hiding input of the present invention can be used in and need privacy
The pattern match scene of protection, if patient is in the DNA database of medical research mechanism, whether the genetic fragment for inquiring oneself is wrapped
Containing some cancer gene.Under this scene, patient was not intended to reveal the gene of oneself to mechanism for the considerations of secret protection
Segment, and be even more that patient is not intended to obtain additional DNA information the considerations of mechanism is for intellectual property.
Detailed description of the invention
The accompanying drawings constituting a part of this application is used to provide further understanding of the present application, and the application's shows
Meaning property embodiment and its explanation are not constituted an undue limitation on the present application for explaining the application.
Fig. 1 is two side's method for mode matching flow charts according to a kind of hiding input of one or more embodiments;
Fig. 2 is two side's pattern matching system structure charts according to a kind of hiding input of one or more embodiments.
Specific embodiment:
Below in conjunction with the attached drawing in one or more other embodiments of the present disclosure, to one or more other embodiments of the present disclosure
In technical solution be clearly and completely described, it is clear that described embodiments are only a part of the embodiments of the present invention,
Instead of all the embodiments.Based on one or more other embodiments of the present disclosure, those of ordinary skill in the art are not being made
Every other embodiment obtained, shall fall within the protection scope of the present invention under the premise of creative work.
It is noted that following detailed description is all illustrative, it is intended to provide further instruction to the application.Unless another
It indicates, all technical and scientific terms that the present embodiment uses have and the application person of an ordinary skill in the technical field
Normally understood identical meanings.
It should be noted that term used herein above is merely to describe specific embodiment, and be not intended to restricted root
According to the illustrative embodiments of the application.As used herein, unless the context clearly indicates otherwise, otherwise singular
Also it is intended to include plural form, additionally, it should be understood that, when in the present specification using term "comprising" and/or " packet
Include " when, indicate existing characteristics, step, operation, device, component and/or their combination.
It should be noted that flowcharts and block diagrams in the drawings show according to various embodiments of the present disclosure method and
The architecture, function and operation in the cards of system.It should be noted that each box in flowchart or block diagram can represent
A part of one module, program segment or code, a part of the module, program segment or code may include one or more
A executable instruction for realizing the logic function of defined in each embodiment.It should also be noted that some alternately
Realization in, function marked in the box can also occur according to the sequence that is marked in attached drawing is different from.For example, two connect
The box even indicated can actually be basically executed in parallel or they can also be executed in a reverse order sometimes,
This depends on related function.It should also be noted that each box and flow chart in flowchart and or block diagram
And/or the combination of the box in block diagram, the dedicated hardware based system that functions or operations as defined in executing can be used are come
It realizes, or the combination of specialized hardware and computer instruction can be used to realize.
In the absence of conflict, the feature in the embodiment and embodiment in the disclosure can be combined with each other, and tie below
It closes attached drawing and embodiment is described further the disclosure.
Fig. 1 is two side's method for mode matching processes according to a kind of hiding input of one or more other embodiments of the present disclosure
Figure, as shown in Figure 1, providing a kind of two side's method for mode matching of hiding input.
It specifically, include two participants --- text holder P in agreement1With mode holder P2。
P1Hold text t ∈ ∑n, P2Hold a mode p ∈ ∑m, wherein n and m respectively represents the length of t and p, n >=m.
By executing agreement, P2The position that p occurs in t can be obtained, while meeting following safety:
1) mode p is to text holder P1Secrecy;
2) mode holder P2Other than obtaining the position that p occurs in t, other about text t can not be obtained
What information.
A kind of two side's method for mode matching of hiding input, this method comprises:
Step (1): in view of P1Input t in have n-m+1 length be m substring, for i-th of m long substring (i=in t
1 ..., n-m+1),
P2Shamir Secret Sharing Scheme is called, randomly selects a in set { 1,2 ..., q } (q is Big prime)i,0,
ai,1,ai,2,..,ai,m-1, enable si=ai,0, multinomial is set
fi(x)=ai,m-1xm-1+ai,m-2xm-2+...+ai,1x+si mod q
For j ∈ { 1,2 ..., m }, x is randomly selected in set { 1,2 ..., q }i,j, calculateAnd
It is randomly selected in set { 1,2 ..., q }Wherein σ ∈ { 0,1 } is the bit value of jth position in p.
P2It is following several right to generate:
These several pairs as sender P in ignorant transport protocol in next step2Input information.
Step (2): for each number pair generated in previous step, participant P1And P2Need to run take for one time 2 it is 1 boundless and indistinct
Right transport protocolOperation (n-m+1) m times altogether.It is taken in 1 ignorant transport protocol every time 2, P1Reception as the agreement
Side, P2Sender as the agreement.Agreement is carried out as follows:
P1Each run 2 takes the input of 1 ignorant transport protocol are as follows: i-th of m long substring t in ti=σi,1σi,2...σi,mIn
J-th of bit value σi,j;
It is corresponding to it, P2Operation 2 takes the input of 1 ignorant transport protocol to be
It has executed one time 2 after taking 1 ignorant transport protocol, participant P1It can obtainAll (n-m+1) is executed m times 2
After taking 1 ignorant transport protocol, P1It can obtain:
Note: all and si,jCorresponding xi,jBy P2P is transmitted directly to clear-text way1。
Ignorant transport protocol is one and is related to the calculating agreement of two participants, one of them is sender S, the other is
Recipient R.The agreement are as follows: sender S transmits one group of message and gives recipient R, and recipient can obtain some in this group of message
Subset, but sender does not know which message he has received.1 ignorant transport protocol is taken in 2 used of the inventionAgreement
In, there are two secret input x by sender S0And x1, recipient R has a selection bit i ∈ { 0,1 }.After both sides have executed agreement,
Recipient R obtains output xi, and sender S is not exported.Security requirement R cannot obtain x simultaneously1-i, and S does not know the choosing of R
Select information.It is shown belowThe detailed description of protocol function function:
Power function
Input: sender S inputs (x0,x1);Recipient R inputs a selection bit i ∈ { 0,1 };
Output: recipient exports xi, sender's output ⊥.
Step (3): participant P1The numerical value obtained from step 2 according to it calculates line by line:
Obtain n-m+1 value
Step (4): participant P1And P2N-m+1 two side's equivalence test protocols of safety are executed jointly, wherein P1As transmission
Side, P2As recipient.During i-th executes, P1Input beP2Input be si.According to two side's equivalence test protocol of safety
Function, ifThen P2Output 1, otherwise exports 0.P1It is not exported in the agreement.
N-m+1 times safety two side's equivalence test protocols be finished after, P2Output valve is formed to the bit of a n-m+1 long
It goes here and there, the position of 1 appearance is the position that p occurs in t in the string.If the string is full 0 string, it fails to match.
Two side's equivalence test protocols of safety are the agreement of two sides, wherein having input character string x0Sender S with
Such as under type and with input character string x1Recipient R interact: recipient R can only be received and be represented x0=x1Output 1 or
Represent x0≠x1Output 0, in addition to this do not know other any information;Sender S does not know about x yet1Any information.The survey
The power function F of examinationSSETIt is described as follows:
FSSETPower function
Input: sender S inputs x0∈{0,1}*, recipient R input x1∈{0,1}*;
Output: recipient R, which is received, represents x0=x1Output 1 or represent x0≠x1Output 0, sender S export ⊥.
Pass through above 4 steps, mode holder P2The position that p occurs in t can be obtained, while mode p is to text
Holder P1Secrecy, and P2Other than obtaining the position that p occurs in t, other any information about text t can not be obtained.
This method can be used in the pattern match scene for needing secret protection, if patient is in the DNA number of medical research mechanism
It whether include some cancer gene according to oneself genetic fragment in library, is inquired.Under this scene, patient is for secret protection
The considerations of consideration is not intended to reveal the genetic fragment of oneself to mechanism, and mechanism is for intellectual property is even more that patient is not intended to obtain
Additional DNA information.
A kind of two side's method for mode matching of hiding input of one or more other embodiments of the present disclosure are also supported to support logical
Matching with symbol.
Above scheme can support the matching with asterisk wildcard after suitably extending.Asterisk wildcard means that it can be by word
Any character that symbol is concentrated is replaced, and wildcard bit is arranged in mode can play the role of bulk lookup.Mode holder
P2Mode p in contain asterisk wildcard, i.e. mode p ∈ { 0,1, * }m, alternative solution is compared with former scheme, and only step 1 is different, specifically
It is as follows:
Step 1. is in view of P1Input t in have n-m+1 length be m substring, for i-th of m long substring (i=in t
1 ..., n-m+1),
P2Shamir Secret Sharing Scheme is called, randomly selects a in set { 1,2 ..., q } (q is Big prime)i,0,
ai,1,ai,2,..,ai,m-1, enable si=ai,0, multinomial is set
fi(x)=ai,m-1xm-1+ai,m-2xm-2+...+ai,1x+si mod q
For j ∈ { 1,2 ..., m },
(1) if jth position is non-wildcard bit, operation is identical as former scheme
X is randomly selected in set { 1,2 ..., q }i,j, calculateAnd it is random in set { 1,2 ..., q }
It choosesWherein σ ∈ { 0,1 } is the bit value of jth position in p.
(2) if jth position is wildcard bit,
X is randomly selected in set { 1,2 ..., q }i,j,It calculatesWherein σ ∈
It { 0,1 } is the bit value of jth position in p.
P2It is following several right to generate:
These several pairs as sender P in ignorant transport protocol in next step2Input information.
A kind of two side's method for mode matching of hiding input of one or more other embodiments of the present disclosure are also supported to support close
Like matching
Compared with the accurate matching in former scheme, approximate match require nothing more than pattern string and text substring several are matched,
When match bit is higher than certain proportion, it is meant that successful match.The length of pattern string remains as m in alternative solution, but only
There need to be (m'≤m) m' therein identical as text substring, as successful match.
Compared with former scheme, only step 1 is different, specific as follows:
Step 1. is in view of P1Input t in have n-m+1 length be m substring, for i-th of m long substring (i=in t
1 ..., n-m+1), P2Shamir Secret Sharing Scheme is called, is randomly selected in set { 1,2 ..., q } (q is Big prime)
ai,0,ai,1,ai,2,..,ai,m'-1, wherein m'≤m.
Enable si=ai,0, multinomial is set
fi(x)=ai,m'-1xm'-1+ai,m'-2xm'-2+...+ai,1x+si mod q
For j ∈ { 1,2 ..., m }, x is randomly selected in set { 1,2 ..., q }i,j, calculateAnd
It is randomly selected in set { 1,2 ..., q }Wherein σ ∈ { 0,1 } is the bit value of jth position in p.
P2It is following several right to generate:
These several pairs as sender P in ignorant transport protocol in next step2Input information.
As shown in Fig. 2, being the two side's modes for hiding input according to the another kind of one or more other embodiments of the present disclosure
Match system structure chart.
According to the other side of one or more other embodiments of the present disclosure, a kind of computer-readable storage medium is also provided
Matter.
A kind of computer readable storage medium, wherein being stored with a plurality of instruction, described instruction is suitable for by terminal device
Reason device loads and executes a kind of two side's method for mode matching of hiding input.
According to the other side of one or more other embodiments of the present disclosure, a kind of terminal device is also provided.
A kind of terminal device, using internet terminal equipment, including processor and computer readable storage medium, processor
For realizing each instruction;Computer readable storage medium is suitable for by processor load simultaneously for storing a plurality of instruction, described instruction
Execute a kind of two side's method for mode matching of hiding input.
These computer executable instructions execute the equipment according to each reality in the disclosure
Apply method or process described in example.
In the present embodiment, computer program product may include computer readable storage medium, containing for holding
The computer-readable program instructions of row various aspects of the disclosure.Computer readable storage medium, which can be, can keep and store
By the tangible device for the instruction that instruction execution equipment uses.Computer readable storage medium for example can be-- but it is unlimited
In-- storage device electric, magnetic storage apparatus, light storage device, electric magnetic storage apparatus, semiconductor memory apparatus or above-mentioned
Any appropriate combination.The more specific example (non exhaustive list) of computer readable storage medium includes: portable computing
Machine disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or
Flash memory), static random access memory (SRAM), Portable compressed disk read-only memory (CD-ROM), digital versatile disc
(DVD), memory stick, floppy disk, mechanical coding equipment, the punch card for being for example stored thereon with instruction or groove internal projection structure, with
And above-mentioned any appropriate combination.Computer readable storage medium used herein above is not interpreted instantaneous signal itself,
The electromagnetic wave of such as radio wave or other Free propagations, the electromagnetic wave propagated by waveguide or other transmission mediums (for example,
Pass through the light pulse of fiber optic cables) or pass through electric wire transmit electric signal.
Computer-readable program instructions described herein can be downloaded to from computer readable storage medium it is each calculate/
Processing equipment, or outer computer or outer is downloaded to by network, such as internet, local area network, wide area network and/or wireless network
Portion stores equipment.Network may include copper transmission cable, optical fiber transmission, wireless transmission, router, firewall, interchanger, gateway
Computer and/or Edge Server.Adapter or network interface in each calculating/processing equipment are received from network to be counted
Calculation machine readable program instructions, and the computer-readable program instructions are forwarded, for the meter being stored in each calculating/processing equipment
In calculation machine readable storage medium storing program for executing.
Computer program instructions for executing present disclosure operation can be assembly instruction, instruction set architecture (ISA)
Instruction, machine instruction, machine-dependent instructions, microcode, firmware instructions, condition setup data or with one or more programmings
The source code or object code that any combination of language is write, the programming language include the programming language-of object-oriented such as
C++ etc., and conventional procedural programming languages-such as " C " language or similar programming language.Computer-readable program refers to
Order can be executed fully on the user computer, partly be executed on the user computer, as an independent software package
Execute, part on the user computer part on the remote computer execute or completely on a remote computer or server
It executes.In situations involving remote computers, remote computer can include local area network by the network-of any kind
(LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize internet
Service provider is connected by internet).In some embodiments, by being believed using the state of computer-readable program instructions
Breath comes personalized customization electronic circuit, such as programmable logic circuit, field programmable gate array (FPGA) or programmable logic
Array (PLA), the electronic circuit can execute computer-readable program instructions, to realize the various aspects of present disclosure.
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this field
For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair
Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.Therefore, the present invention is not intended to be limited to this
These embodiments shown in text, and it is to fit to the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. a kind of two side's method for mode matching of hiding input, which is characterized in that this method comprises:
Mode holder receive user it is to be found give mould-fixed, text holder receive database text set;
It will be matched to mould-fixed with substring identical with given modal length in text set, until completing in text set all
The matching of substring identical with given modal length, matched specific method include:
Mode holder calls Shamir Secret Sharing Scheme, chooses random number and multinomial is arranged, and calculated by random number multinomial
Formula value generates the mode array formed by several Duis according to the bit value of corresponding position in mode;
According to every number pair in mode array, mode holds the random number that direction text holder sends evaluator value,
The input of text holder is the bit value of substring corresponding position, mode holder and text holder run take for one time 2 it is 1 boundless and indistinct
Right transport protocol, text holder obtain text array;
According to the numerical value in text array, one group of test data is calculated line by line;
The test data that text holder sequentially inputs judges whether the random number of input corresponding with mode holder is equal, if
Otherwise equal text holder output 1 exports 0, after the completion of test, the output of text holder forms Bit String, wherein 1 occurs
Position and position to mould-fixed in text set, if the string is full 0, it fails to match.
2. a kind of two side's method for mode matching of hiding input as described in claim 1, which is characterized in that in the method,
Mode in mode holder is p ∈ { 0,1 }m, m is the length of p;Text in text holder is t ∈ { 0,1 }n, n is t's
Length, and n >=m, by method for mode matching, mode holder only obtains the position that p occurs in t, while mode p is to text
Holder P secrecy.
3. a kind of two side's method for mode matching of hiding input as claimed in claim 2, which is characterized in that in the method,
To the mode array that in i-th of m eldest son's String matching in mould-fixed p and text t, the generation is formed by several Duis in text holder
Specific method include:
Mode holder calls Shamir Secret Sharing Scheme, randomly selects random number a in set { 1,2 ..., q }i,0,ai,1,
ai,2,..,ai,m-1, q is Big prime, enables si=ai,0, multinomial is set:
fi(x)=ai,m-1xm-1+ai,m-2xm-2+...+ai,1x+simod q;
For j ∈ { 1,2 ..., m }, x is randomly selected in set { 1,2 ..., q }i,j, calculate
It is randomly selected in set { 1,2 ..., q }Wherein, σ ∈ { 0,1 } is the bit value of jth position in p;
Mode holder generates the mode array formed by several Duis, and the input letter as mode holder in ignorant transport protocol
Breath, the mode array are as follows:
4. a kind of two side's method for mode matching of hiding input as claimed in claim 2, which is characterized in that in the method,
To in i-th of m eldest son's String matching in mould-fixed p and text t in text holder, counted for each of described mode array
Right, mode holder and text holder run one time 2 and take 1 ignorant transport protocol, run (n-m+1) altogether m times.
Further, in i-th of m eldest son's String matching in mould-fixed p and text t in text holder, described 2 take 1 ignorant biography
The specific method of defeated agreement includes:
Text holder each run 2 takes the input of 1 ignorant transport protocol are as follows: i-th of m long substring t in ti=σi,1σi,2...σi,m
In j-th of bit value σi,j;
Mode holder each run 2 takes the input of 1 ignorant transport protocol for the current number pair of mode array:
It has executed one time 2 after taking 1 ignorant transport protocol, text holder obtains
It has executed after (n-m+1) take 1 ignorant transport protocol m times, text holder obtains text array:
5. a kind of two side's method for mode matching of hiding input as claimed in claim 2, which is characterized in that in the method,
To in i-th of m eldest son's String matching in mould-fixed p and text t in text holder, according to the numerical value in text array, count line by line
It calculates:Obtain n-m+1 valueForm one group of test data.
6. a kind of two side's method for mode matching of hiding input as claimed in claim 2, which is characterized in that in the method,
To in i-th of m eldest son's String matching in mould-fixed p and text t in text holder, mode holder and text holder hold jointly
The two side's equivalence test protocols of safety of row n-m+1 times, wherein text holder as sender, mode holder as recipient,
It is executed in two side's equivalence test protocols of safety in i-th, the input of text holder isThe input of mode holder is si;Root
According to the function of two side's equivalence test protocol of safety, ifThen mode holder output 1, otherwise exports 0;Text holder exists
It is not exported in the agreement;
After n-m+1 times two side's equivalence test protocols of safety are finished, output valve is formed n-m+1's long by mode holder
Bit String, 1 position that occurs is the position that p occurs in t in the string;If the string is full 0 string, it fails to match.
7. a kind of two side's method for mode matching of hiding input as claimed in claim 2, which is characterized in that this method further includes
It supports the matching with asterisk wildcard, contains asterisk wildcard, i.e. mode p ∈ { 0,1, * } in the mode p of mode holderm, generating by counting
To in the mode array of composition, if jth position is wildcard bit,
X is randomly selected in set { 1,2 ..., q }i,j,It calculatesWherein { 0,1 } σ ∈
For the bit value of jth position in p;
Mode holder generates following several right:
8. a kind of two side's method for mode matching of hiding input as claimed in claim 2, which is characterized in that this method further includes
Support approximate match, the mode p length of mode holder is m, and (m'≤m) m' therein is mutually all to match into text substring
Function, the specific method for generating the mode array formed by several Duis include:
Mode holder calls Shamir Secret Sharing Scheme, randomly selects random number a in set { 1,2 ..., q }i,0,ai,1,
ai,2,..,ai,m'-1, q is Big prime, enables si=ai,0, multinomial is set:
fi(x)=ai,m'-1xm'-1+ai,m'-2xm'-2+...+ai,1x+simod q;
For j ∈ { 1,2 ..., m }, x is randomly selected in set { 1,2 ..., q }i,j, calculate
It is randomly selected in set { 1,2 ..., q }Wherein, σ ∈ { 0,1 } is the bit value of jth position in p;
Mode holder generates the mode array formed by several Duis, and the input letter as mode holder in ignorant transport protocol
Breath, the mode array are as follows:
9. a kind of computer readable storage medium, wherein being stored with a plurality of instruction, which is characterized in that described instruction is suitable for by terminal
The processor of equipment loads and executes a kind of two side's pattern match of hiding input according to claim 1 to 8
Method.
10. a kind of terminal device, using internet terminal equipment, including processor and computer readable storage medium, processor
For realizing each instruction;Computer readable storage medium is for storing a plurality of instruction, which is characterized in that described instruction be suitable for by
Reason device loads and executes a kind of two side's method for mode matching of hiding input according to claim 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811258454.3A CN109359476B (en) | 2018-10-26 | 2018-10-26 | Hidden input two-party mode matching method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811258454.3A CN109359476B (en) | 2018-10-26 | 2018-10-26 | Hidden input two-party mode matching method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109359476A true CN109359476A (en) | 2019-02-19 |
CN109359476B CN109359476B (en) | 2020-12-25 |
Family
ID=65347065
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811258454.3A Active CN109359476B (en) | 2018-10-26 | 2018-10-26 | Hidden input two-party mode matching method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109359476B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110414567A (en) * | 2019-07-01 | 2019-11-05 | 阿里巴巴集团控股有限公司 | Data processing method, device and electronic equipment |
CN110569659A (en) * | 2019-07-01 | 2019-12-13 | 阿里巴巴集团控股有限公司 | data processing method and device and electronic equipment |
CN112019333A (en) * | 2020-09-04 | 2020-12-01 | 支付宝(杭州)信息技术有限公司 | Data processing method and device for OTA protocol |
CN112732776A (en) * | 2020-12-25 | 2021-04-30 | 山东师范大学 | Secure approximate pattern matching method and system and electronic equipment |
CN116132029A (en) * | 2022-12-22 | 2023-05-16 | 泉城省实验室 | Wild card symbol pattern matching method and system based on three-choice-one-blank transmission protocol |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103178965A (en) * | 2008-01-07 | 2013-06-26 | 安全第一公司 | Systems and methods for securing data using multi-factor or keyed dispersal |
US10108807B2 (en) * | 2005-11-18 | 2018-10-23 | Security First Corp. | Secure data parser method and system |
-
2018
- 2018-10-26 CN CN201811258454.3A patent/CN109359476B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10108807B2 (en) * | 2005-11-18 | 2018-10-23 | Security First Corp. | Secure data parser method and system |
CN103178965A (en) * | 2008-01-07 | 2013-06-26 | 安全第一公司 | Systems and methods for securing data using multi-factor or keyed dispersal |
Non-Patent Citations (1)
Title |
---|
魏晓超 等: ""一个高效安全三方带通配符模式匹配协议"", 《计算机研究与发展》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110414567A (en) * | 2019-07-01 | 2019-11-05 | 阿里巴巴集团控股有限公司 | Data processing method, device and electronic equipment |
CN110569659A (en) * | 2019-07-01 | 2019-12-13 | 阿里巴巴集团控股有限公司 | data processing method and device and electronic equipment |
CN110414567B (en) * | 2019-07-01 | 2020-08-04 | 阿里巴巴集团控股有限公司 | Data processing method and device and electronic equipment |
TWI729697B (en) * | 2019-07-01 | 2021-06-01 | 開曼群島商創新先進技術有限公司 | Data processing method, device and electronic equipment |
CN112019333A (en) * | 2020-09-04 | 2020-12-01 | 支付宝(杭州)信息技术有限公司 | Data processing method and device for OTA protocol |
CN112732776A (en) * | 2020-12-25 | 2021-04-30 | 山东师范大学 | Secure approximate pattern matching method and system and electronic equipment |
CN112732776B (en) * | 2020-12-25 | 2022-08-26 | 山东师范大学 | Secure approximate pattern matching method and system and electronic equipment |
CN116132029A (en) * | 2022-12-22 | 2023-05-16 | 泉城省实验室 | Wild card symbol pattern matching method and system based on three-choice-one-blank transmission protocol |
CN116132029B (en) * | 2022-12-22 | 2023-09-26 | 泉城省实验室 | Wild card symbol pattern matching method and system based on three-choice-one-blank transmission protocol |
Also Published As
Publication number | Publication date |
---|---|
CN109359476B (en) | 2020-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109359476A (en) | A kind of two side's method for mode matching and device of hiding input | |
ES2957843T3 (en) | Verification of data processes in a network of computing resources | |
CN104731842B (en) | For electronic communication data to be used to carry out the method and system of mapping relations | |
CN110168523A (en) | Change monitoring to inquire across figure | |
CN110189131A (en) | The implementation method and device traded using the secret block chain of ring signatures | |
CN107196840B (en) | Data processing method, device and equipment | |
CN108667717A (en) | Block chain processing method, medium, device and computing device based on instant communication message record | |
CN111753324B (en) | Private data processing method, private data computing method and applicable equipment | |
CN110009349A (en) | The method and device of linkable ring signature is generated and verified in block chain | |
CN110472974A (en) | Assets transfer method, apparatus and system based on block chain intelligence contract | |
CN108038128A (en) | A kind of search method, system, terminal device and storage medium for encrypting file | |
CN104798052A (en) | Method and apparatus for matching consumers | |
US20230186049A1 (en) | Training method and apparatus for a neural network model, device and storage medium | |
CN110400217A (en) | The regular changing process method and device of intelligent contract | |
CN113722744A (en) | Data processing method, device, equipment and medium for federal characteristic engineering | |
WO2018103830A1 (en) | A method and system for searchable encrypted cloud storage of media data | |
CN109901987A (en) | A kind of method and apparatus generating test data | |
CN112598138A (en) | Data processing method and device, federal learning system and electronic equipment | |
CN112182109A (en) | Distributed data coding storage method based on block chain and electronic equipment | |
CN114254353A (en) | Data processing method and device based on privacy protection and server | |
CN112468521B (en) | Data processing method and device based on privacy protection and server | |
CN110349021A (en) | The method and device of secret transaction is realized in block chain | |
CN109617789B (en) | Method, system, electronic device and storage medium for processing session message | |
US20200145200A1 (en) | Attribute-based key management system | |
CN110059097A (en) | Data processing method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220411 Address after: 250102 floor 17, building 4, future entrepreneurship Plaza, north section of Gangxing Third Road, Jinan area, China (Shandong) pilot Free Trade Zone, Jinan City, Shandong Province Patentee after: Confident Information Co.,Ltd. Address before: No.1 Daxue Road, University Science Park, Changqing District, Jinan City, Shandong Province Patentee before: SHANDONG NORMAL University |