Summary of the invention
In order to overcome the above-mentioned shortcoming of prior art, the invention provides a kind of encryption and immediate processing method of electronics ballot paper information, ballot paper object information is substituted by character, every kind of character represents different selection meanings, construct a ballot paper matrix, and ballot paper matrix is chosen to multinomial at random and carry out piecemeal calculating, and send to
nthe count of votes computer of platform independent, realized ballot paper information safety transmit, even and if anyone obtain in advance election the partitioning of matrix also cannot therefrom obtain any vote information; Only need merge wherein in the count of votes stage
kplatform (
k≤
n) count of votes machine can this ballot paper matrix of fast quick-recovery.
The technical solution adopted for the present invention to solve the technical problems is: a kind of encryption and immediate processing method of electronics ballot paper information, comprise the following steps:
1) computer is according to candidate's figure place and name structure
×
lballot paper matrix, wherein
mfor candidate's figure place,
lfor every a line candidate's figure place, when last column is less than
lwhen row, not enough figure place is with 0 polishing;
2) the digitlization binary system that every voter ballot paper matrix that vote is selected on ballot equipment is carried out 0/1 form by ballot equipment transforms;
3) burst of ballot paper matrix calculates:
According to the number of units of count of votes machine
n, arrange one (
k,
n) threshold structure,
kfor threshold parameter, with the data of every a line in ballot paper matrix
s i , wherein
i=1,2 ...,
as secret information, it is carried out to the secret sharing based on Lagrange interpolation polynomial:
Get a prime number
p, meet
p>
nand
p> 2
l -1, construct finite field
gF(
p)={ 0,1,2 ...,
p-1} mod
p, in finite field
gF(
p) in choose at random
nindividual different open numerical value
x 1,
x 2...,
x n , in this finite field, choose at random
k-the value of 1 need to be keep secret
a 1,
a 2...,
a k-1
, and construct
k-1 order polynomial
(1)
The element in ballot paper matrix
s i , wherein
i=1,2 ...,
, in substitution multinomial (1)
s, simultaneously respectively
x 1,
x 2...,
x n substitution multinomial (1)
xin, calculate
4) burst matrix construction:
Utilize the 3rd) step obtains
, build
× 1 burst matrix
, and by burst matrix
be distributed to
jthe storage of platform count of votes machine, then destroy original ballot paper information, multinomial and
k-the value of 1 need to be keep secret
a 1,
a 2...,
a k-1
;
5) ballot paper reconstruct:
In the count of votes stage, take out at least successively
kthe each row of data of the burst matrix of platform count of votes machine, utilizes following Lagrange interpolation polynomial:
(2)
Determine multinomial (1), multinomial (1) determine after in numerical value 0 substitution multinomial (1)
x, obtain secret information
s=
f(0),
schange into string of binary characters, and insert the corresponding row in the blank ballot transforming through matrix;
6) ballot equipment to all voters' ballot paper information according to above-mentioned 3) to 5) step method of operation carries out the corresponding operating of ballot paper matrix, after all recovering, all ballot papers directly carry out the decimal addition on matrix, the gained vote information that calculates each candidate, finally counts election results.
Described ballot equipment is made up of touch-screen type all-in-one and corresponding ballot software, voter obtains after electronics ballot paper, on touch-screen, click its wish candidate and complete submission, the opposition to every candidate or agree with selecting to convert 0/1 form to according to voter of ballot software.
Compared with prior art, good effect of the present invention is:
1) ballot paper confidentiality: the transmission of ballot paper information does not adopt cleartext information, is divided into ballot paper after multi-disc is calculated and is distributed to count of votes machine, and anyone obtains any raw information that cannot obtain ballot paper after ballot paper.Use point sheet mode to send ballot paper, also avoided loaded down with trivial details cryptographic calculations and protocol interaction process.
2) ballot paper fail safe: ballot paper burst usage threshold mechanism, at least k platform count of votes machine just can recover ballot paper raw information, ensure that in election process, anyone cannot obtain election results in advance, realize the fail safe of ballot paper, and the mode that adopts threshold mechanism, also makes ballot paper have disaster tolerance speciality to a certain extent.
3) count of votes rapidity: the burst matrix that all count of votes machines are collected by election mechanism recovers after original ballot paper, by using decimal addition to calculate to the each coordinate of ballot paper matrix, can realize fast to every candidate's and whole ballot paper statistics.
Embodiment
Might as well suppose to carry out
mchoosing
telection form, have
mposition candidate, need to select
tthe final candidate in position.For a ballot paper of being filled in by legal voter, the candidate's gained vote information on ballot paper is considered as to an element (as corresponding in " agreeing with " numerical value " 1 ", " opposition " is " 0 "), extract these elements, with
lindividual element is a line, total
oK, last not enough figure place, with 0 polishing, is configured to the form of a matrix.
To the ballot paper information of matrix form implement based on interpolation polynomial (
k,
n) threshold secret sharing technology, every ballot paper is split into
nindividual share, each share is and the matrix form of ballot paper same structure, is distributed to
nplatform count of votes computer, is only more than or equal to
kthe share of platform count of votes computer just can recover ballot paper information, can also prevent like this fraud such as non-honest grade in count of votes process in ensureing ballot paper information security.
Encryption and the immediate processing method of describing electronics ballot paper information below in detail, comprise the steps:
1) computer is according to candidate's figure place structure ballot paper matrix
Supposing has
mposition candidate, number of people due to be elected is
tposition, the count of votes machine that needs acceptance to share secret information has
nplatform.Might as well candidate with
lposition is a line, total
oK, when last column is less than
lwhen row, not enough figure place, with 0 polishing, is so just configured to one
×
lmatrix form, the pie graph of ballot paper matrix is as shown in Figure 1.
2) the digitlization binary system that every voter ballot paper matrix that vote is selected on ballot equipment is carried out 0/1 form by ballot equipment transforms
Definition election only has the option of opposing/agreeing with (0/1) form, participation in the election voter uses electronic ballot equipment to every selection that candidate agrees with or opposes on this ballot paper, ballot equipment, after popular ballot finishes, changes into every voter ballot paper matrix that vote is selected on ballot equipment the digitlization binary-coded character of 0/1 form.The pie graph of the ballot paper matrix after digitlization binary system transforms as shown in Figure 2.
Described ballot equipment is made up of touch-screen type all-in-one and corresponding ballot software, and voter obtains after electronics ballot paper, clicks its wish candidate and complete submission on touch-screen.Ballot software according to voter the opposition to every candidate or agree with select convert 0/1 form to, successively all candidates of this ballot paper are carried out to aforesaid operations, completed ballot paper matrix digitlization binary system transform.
3) burst of ballot paper matrix calculates
If directly to the each element secret sharing in matrix, every ballot paper will carry out
×
linferior sharing, amount of calculation increases considerably.Might as well be with in matrix
lclassify one group as, can be this
row data form one
× 1 matrix,
×
lmatrix conversion become
× 1 matrix, is wherein considered as a binary number (0 and 1) candidate's gained vote information, and the data of every a line will be one
l(this numerical value is 0 ~ 2 for the binary number of position
l in-1 scope), fill up successively new matrix, the pie graph of the ballot paper matrix of neotectonics is as shown in Figure 3.
Because count of votes machine is total
nplatform, might as well arrange one (
k,
n) threshold structure,
kfor threshold parameter, (based on Shamir Secret Sharing Scheme, the value of k is arbitrarily, is less than or equal to the n) data with every a line in matrix as long as meet
s i (
i=1,2 ...,
) as secret information, it is carried out to the secret sharing based on Lagrange interpolation polynomial:
This ballot paper matrix is total
individual element
, 0≤
s i ≤ 2
l -1, wherein
i=1,2 ...,
.Get a prime number
p, meet
p>
nand
p> 2
l -1.Selected
pafter construct finite field
gF(
p)={ 0,1,2 ...,
p-1} mod
p, in finite field
gF(
p) choose at random
nindividual different open numerical value
x 1,
x 2...,
x n , above parameter can disclose.
In this finite field, choose at random
k-the value of 1 need to be keep secret
a 1,
a 2...,
a k-1
, and construct
k-1 order polynomial
(1)
The element in ballot paper matrix
s i (
i=1,2 ...,
) in substitution multinomial (1)
s, simultaneously respectively
x 1,
x 2...,
x n substitution multinomial (1)
xin, calculating can obtain
4) burst matrix construction:
Utilize the 3rd) step obtains
, build
× 1 burst matrix
:
By burst matrix
be distributed to
jthe storage of platform count of votes machine, then destroy original ballot paper information, multinomial and
k-the value of 1 need to be keep secret
a 1,
a 2...,
a k-1
.
So just complete the encryption distribute work of every electronics ballot paper information, whole count of votes machines (
nplatform) the ballot paper share matrix received is as shown in Figure 4.
5) ballot paper reconstruct
In the count of votes stage, use
nin platform count of votes machine at least
kplatform count of votes machine is combined the burst matrix of receiving separately the ballot paper order that can recover line by line every row, and is less than
kplatform count of votes machine cannot obtain any ballot paper information.Take out at least successively
kthe each row of data of the burst matrix of platform count of votes machine, utilizes Lagrange interpolation polynomial
Determine multinomial (1).For example: multinomial is
q(
x)=
a 0+
a 1 x+
a 2 x 2, can calculate by the concrete numerical value of substitution,
q(
x 1)=
s 1,
q(
x 2)=
s 2,
q(
x 3)=
s 3, then, even if destroy multinomial
q(
x), and still can reconstruct multinomial by these three dual points
q(
x), as follows:
Multinomial (1) is determined rear numerical value 0 substitution, obtains secret information
s=
f(0),
schange into string of binary characters, and insert the corresponding row in the blank ballot transforming through matrix, successively each row of data being carried out to above-mentioned calculating is each ballot paper of restructural.
6) ballot equipment to all voters' ballot paper information according to above-mentioned 3) to 5) step method of operation carries out the corresponding operating of ballot paper matrix, after all recovering, all ballot papers directly carry out the decimal addition on matrix, calculate each candidate's gained vote information, finally count after election results are all recovered all ballot papers and directly carry out the decimal addition on matrix, the gained vote information that calculates each candidate, finally counts election results.
Now said method is illustrated as follows:
Suppose and have an election, have 25 candidates, need to select 10 people, this ballot paper might as well be configured to the matrix of 5 × 5,
l=5,
m/
l=5, certain legal voter fills in complete ballot paper information structure figure as shown in Figure 5, wherein 1 agrees, and 0 makes difficulties.
Therefore the matrix A of this ballot paper is:
,
Further, the splicing of all elements of every a line, be considered as a binary character string, then be converted to decimal representation mode, we can be the matrix of matrix 5 × 5
abe converted into 5 × 1 matrix
b, represent as follows:
Suppose to have 5 count of votes machines, selected threshold parameter is 4, and threshold structure is (4,5).Due to 2
5-1=31,31>5, selected prime number
p=37>31, thus be configured with confinement
gF(37)=0,1,2 ..., 36}mod 37.In this finite field, choosing at random 5 can disclosed numerical value
x 1,
x 2...,
x 5, simple for narrating, there is no harm in value
x 1=1,
x 2=2,
x 3=3,
x 4=4,
x 5=5.
In finite field
gF(37) on, choose at random again 3 numerical value
a 1=15,
a 2=26,
a 3=9.Construct 3 order polynomials
f(
x)=(9
x 3+26
x 2+15
x+
s) mod 37
In order matrix
beach row element respectively substitute
s, obtain 5 multinomials
f 1(
x) = (9
x 3+26
x 2+15
x+8) mod 37
f 2(
x) = (9
x 3+26
x 2+15
x+5) mod 37
f 3(
x) = (9
x 3+26
x 2+15
x+22) mod 37
f 4(
x) = (9
x 3+26
x 2+15
x+9) mod 37
f 5(
x) = (9
x 3+26
x 2+15
x+12) mod 37
Will
x 1=1,
x 2=2,
x 3=3,
x 4=4,
x 5=5 substitutions respectively
f 1(
x), obtain
f 1(1)=21,
f 1(2)=29,
f 1(3)=12,
f 1(4)=24,
f 1(5)=8, are placed in respectively the first row of 55 × 1 corresponding burst matrixes.Method calculates according to this
f 2(1) ~
f 2(5),
f 3(1) ~
f 3(5),
f 4(1) ~
f 4(5),
f 5(1) ~
f 5(5).Finally obtain:
be distributed to the 1st count of votes machine,
be distributed to the 2nd ...,
be distributed to the 5th count of votes machine.Store completely, original ballot paper information and multinomial are all destroyed.
Need to add up ballot paper time, must there be at least 4 count of votes machines on the scene, be less than 4, cannot obtain any information.Might as well suppose to have obtained the information of front 4 count of votes machines.
By the given value 21,29,12 and 24 of the first row, obtain
f 1(1)=21,
f 1(2)=29,
f 1(3)=12,
f 1(4)=24, substitution formula
Thereby obtain secret information
s=
f(0)=8, the first row data in ballot paper matrix are 8, same method is obtained the secret data of residue 4 row, construct ballot paper matrix, be converted into again binary representation form, this binary-coded character inserted successively in 5 × 5 blank ballot matrix, as shown in the table:
So just, completed the reconstruct (being recovery process) of this ballot paper.