JP5397858B2 - Electronic voting media - Google Patents

Electronic voting media Download PDF

Info

Publication number
JP5397858B2
JP5397858B2 JP2009260370A JP2009260370A JP5397858B2 JP 5397858 B2 JP5397858 B2 JP 5397858B2 JP 2009260370 A JP2009260370 A JP 2009260370A JP 2009260370 A JP2009260370 A JP 2009260370A JP 5397858 B2 JP5397858 B2 JP 5397858B2
Authority
JP
Japan
Prior art keywords
voting
electronic voting
data
electronic
code
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.)
Expired - Fee Related
Application number
JP2009260370A
Other languages
Japanese (ja)
Other versions
JP2011107842A (en
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.)
Kanagawa University
Original Assignee
Kanagawa University
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 Kanagawa University filed Critical Kanagawa University
Priority to JP2009260370A priority Critical patent/JP5397858B2/en
Publication of JP2011107842A publication Critical patent/JP2011107842A/en
Application granted granted Critical
Publication of JP5397858B2 publication Critical patent/JP5397858B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、電子投票に利用される電子投票媒体に関する。   The present invention relates to an electronic voting medium used for electronic voting.

近年、コンピュータの発達に伴い、コンピュータを利用した電子投票は、安全で迅速な処理が期待できることから関心が高まっている。コンピュータを利用した電子投票には、集計においてコンピュータを利用する電子投票や、投票する方法においてコンピュータを利用する電子投票、遠隔地からの投票においてネットワークコンピュータを利用する電子投票等が存在する。   In recent years, with the development of computers, electronic voting using computers has been attracting attention because it can be expected to perform safe and quick processing. Electronic voting using a computer includes electronic voting using a computer for counting, electronic voting using a computer for voting, electronic voting using a network computer for voting from a remote location, and the like.

このような電子投票は、どの投票者が誰に投票したのかは誰にも分からない、いわゆる秘匿性と、投票結果が正しく集計されたことが、集計後いつでも誰でも確認できること、等が要求される。   Such electronic voting requires that no one knows who voted to whom, so-called confidentiality, and that anyone can confirm that the voting results have been correctly counted at any time after counting. The

このような要求を考慮したシステムとして、特許文献1に開示された、認証機関と集計機関とを備える電子投票システムが知られている。   As a system that considers such a requirement, an electronic voting system that is disclosed in Patent Document 1 and that includes a certification authority and a counting authority is known.

この特許文献1が開示するシステムにおいて、投票装置は、投票者のディジタル証明書を認証機関の公開鍵によって暗号化し、所定の情報(自己の投票が正しく集計されていることを知るための投票者のみが知る情報)を含む投票メッセージを集計機関の公開鍵によって暗号化し、暗号化されたディジタル証明書と、暗号化された投票メッセージとを連結して投票装置の秘密鍵によって暗号化した署名ブロックを認証機関に送る。認証機関は、投票装置の公開鍵によって署名ブロックを復号し、認証機関の秘密鍵によってディジタル証明書を復号して認証後、集計組織に転送する。集計組織は、投票装置の公開鍵によって署名ブロックを復号し、集計組織の秘密鍵によって投票メッセージを復号して集計する。したがって、特許文献1が開示するシステムにおいて、認証機関は投票メッセージを復号できず、集計機関はディジタル証明書を復号できないので、どの投票者が誰に投票したのかは誰にも分からない。そして、集計組織が公表した投票メッセージのうち所定の情報によって、投票者は自己の投票が正しく集計されたことを知ることができる。   In the system disclosed in Patent Document 1, a voting device encrypts a voter's digital certificate with a public key of a certification authority, and gives predetermined information (a voter for knowing that his / her votes are correctly counted). A signature block that encrypts a voting message containing information known only by the public key of the tallying agency, concatenates the encrypted digital certificate and the encrypted voting message, and encrypts it with the secret key of the voting device To the certification body. The certificate authority decrypts the signature block with the public key of the voting device, decrypts the digital certificate with the secret key of the certificate authority, authenticates it, and transfers it to the aggregation organization. The aggregation organization decrypts the signature block with the public key of the voting device, and decrypts and aggregates the voting message with the secret key of the aggregation organization. Therefore, in the system disclosed in Patent Document 1, since the certification authority cannot decrypt the voting message and the aggregation authority cannot decrypt the digital certificate, no one knows who voted to whom. The voter can know that his / her votes have been correctly counted based on predetermined information in the voting message published by the counting organization.

特表2005−509366号公報JP 2005-509366 A

しかしながら、特許文献1が開示するシステムは、ディジタル証明書と投票メッセージとを連結させている。よって、認証機関が集計組織の秘密鍵を入手したり、集計組織が認証機関の秘密鍵を入手したりすると、特許文献1が開示するシステムは、どの投票者が誰に投票したのかが分かってしまう。すなわち、特許文献1が開示するシステムは、秘匿性を確保することができない。   However, the system disclosed in Patent Document 1 links a digital certificate and a voting message. Therefore, when the certification authority obtains the secret key of the aggregation organization or the aggregation organization obtains the secret key of the certification organization, the system disclosed in Patent Document 1 knows which voter voted to whom. End up. That is, the system disclosed in Patent Document 1 cannot ensure confidentiality.

また、特許文献1が開示するシステムにおいて、認証機関は投票者に一意のシリアル番号を発行する。そして、特許文献1が開示するシステムは、不正な投票を防ぐために、シリアル番号によって投票が1回しかできないようにしている。このようなシステムは、一意のシリアル番号を発行するために、投票者を一人一人認証する必要があるので、煩雑になりかねない。   Moreover, in the system disclosed in Patent Document 1, the certification authority issues a unique serial number to the voter. And the system which patent document 1 discloses makes it possible to vote only once by the serial number in order to prevent an illegal vote. Such a system can be cumbersome because it is necessary to authenticate each voter in order to issue a unique serial number.

そこで、電子投票において、不正な投票を防止することができ、かつ、同一人であるならば定められた開票日までに何度でも投票をすることができる装置が望まれている。   Therefore, there is a demand for an apparatus that can prevent illegal voting in electronic voting and can vote as many times as possible within a predetermined date of vote if the same person.

本発明は、電子投票において、同一人であるならば定められた開票日までに何度でも投票をすることができ、かつ、不正な投票を容易に防止することができる装置を提供することを目的とする。   It is an object of the present invention to provide a device capable of voting as many times as possible within a predetermined vote date in the electronic voting, and easily preventing illegal voting. Objective.

本発明では、以下のような解決手段を提供する。   The present invention provides the following solutions.

(1) 投票の内容を書き込むための電子投票媒体であって、電子投票媒体を識別するための媒体識別情報を記憶する媒体識別情報記憶手段と、現在の時刻を取得する時刻取得手段と、前記媒体識別情報記憶手段によって記憶された前記媒体識別情報と、前記時刻取得手段によって取得された時刻を含むシリアル番号とに基づいて、投票ごとに投票識別コードを作成する投票識別コード作成手段と、前記投票識別コードのうち最新の前記投票識別コードを出力する投票識別コード出力手段と、公開鍵が所定の方法によって書き込まれた電子投票データと、受け付けられた候補者を示す投票内容とを入力する投票データ入力手段と、前記投票内容に対応付けて確認コードを作成する確認コード作成手段と、前記投票内容及び前記確認コードを抽出するためのパスワードを作成するパスワード作成手段と、前記電子投票データに、前記パスワード作成手段によって作成されたパスワードに基づいて、前記投票内容及び前記確認コードを埋め込む投票内容書込手段と、前記投票データ入力手段によって入力された前記電子投票データから前記公開鍵を取得する公開鍵取得手段と、前記電子投票データに、前記公開鍵取得手段によって取得された前記公開鍵に基づいて前記パスワードを暗号化して埋め込む暗号化書込手段と、前記暗号化書込手段によって書き込まれた電子投票データを出力する電子投票データ出力手段と、を備える電子投票媒体。   (1) An electronic voting medium for writing the contents of a vote, medium identification information storage means for storing medium identification information for identifying the electronic voting medium, time acquisition means for acquiring the current time, Voting identification code creating means for creating a voting identification code for each vote based on the medium identification information stored by the medium identification information storage means and the serial number including the time obtained by the time obtaining means; Voting for inputting the vote identification code output means for outputting the latest vote identification code among the vote identification codes, the electronic voting data in which the public key is written by a predetermined method, and the contents of the vote indicating the accepted candidate A data input means; a confirmation code creating means for creating a confirmation code in association with the voting content; and extracting the voting content and the confirmation code. Password creating means for creating a password for performing, voting content writing means for embedding the voting content and the confirmation code in the electronic voting data based on the password created by the password creating means, and the voting data Public key acquisition means for acquiring the public key from the electronic voting data input by the input means; and encrypting the password based on the public key acquired by the public key acquisition means in the electronic voting data. An electronic voting medium comprising: an embedded encryption writing means; and an electronic voting data output means for outputting electronic voting data written by the encrypted writing means.

(1)の構成によれば、本発明に係る電子投票媒体は、投票の内容を書き込むための電子投票媒体であって、電子投票媒体を識別するための媒体識別情報を記憶する媒体識別情報記憶手段を有する。そして、本発明に係る電子投票媒体は、現在の時刻を取得し、媒体識別情報記憶手段によって記憶された媒体識別情報と、取得された時刻を含むシリアル番号とに基づいて、投票ごとに投票識別コードを作成し、投票識別コードのうち最新の投票識別コードを出力する。そして、本発明に係る電子投票媒体は、公開鍵が所定の方法によって書き込まれた電子投票データと、受け付けられた候補者を示す投票内容とを入力し、投票内容に対応付けて確認コードを作成し、投票内容及び確認コードを抽出するためのパスワードを作成し、電子投票データに、作成されたパスワードに基づいて、投票内容及び確認コードを埋め込み、入力された電子投票データから公開鍵を取得し、電子投票データに、取得された公開鍵に基づいてパスワードを暗号化して埋め込み、書き込まれた電子投票データを出力する。   According to the configuration of (1), the electronic voting medium according to the present invention is an electronic voting medium for writing the contents of voting, and a medium identification information storage for storing medium identification information for identifying the electronic voting medium Have means. The electronic voting medium according to the present invention acquires the current time, and identifies the vote for each vote based on the medium identification information stored by the medium identification information storage unit and the serial number including the acquired time. A code is created, and the latest vote identification code among the vote identification codes is output. The electronic voting medium according to the present invention inputs the electronic voting data in which the public key is written by a predetermined method and the voting content indicating the accepted candidate, and creates a confirmation code in association with the voting content. Create a password for extracting the voting content and confirmation code, embed the voting content and confirmation code in the electronic voting data based on the created password, and obtain the public key from the input electronic voting data The password is encrypted and embedded in the electronic voting data based on the acquired public key, and the written electronic voting data is output.

すなわち、本発明に係る電子投票媒体は、媒体を識別する媒体識別情報と、投票内容及び確認コード並びに暗号化したパスワードを埋め込んだ電子投票データと、を出力する。よって、電子投票データを開票するシステムは、媒体識別情報と共に出力された電子投票データを識別することができ、同一人が同じ電子投票媒体から開票日までに何度も投票した電子投票データを媒体識別情報によって一の投票とみなすことができる。したがって、本発明に係る電子投票媒体は、電子投票において、同一人であるならば定められた開票日までに何度でも投票をすることができる電子投票データを作成することができ、かつ、不正な投票を容易に防止することができる電子投票データを作成することができる。   That is, the electronic voting medium according to the present invention outputs medium identification information for identifying the medium, and electronic voting data in which the voting contents and confirmation code and the encrypted password are embedded. Therefore, the system for counting electronic voting data can identify the electronic voting data output together with the medium identification information, and the electronic voting data voted many times by the same person from the same electronic voting medium until the date of voting. It can be regarded as one vote by the identification information. Therefore, the electronic voting medium according to the present invention is capable of creating electronic voting data that can be voted as many times as possible within the electronic voting by the determined date of vote, and is illegal. It is possible to create electronic voting data that can easily prevent voting.

さらに、電子投票データには投票内容及び確認コードがパスワードに基づいて埋め込まれているので、本発明に係る電子投票媒体は、秘密鍵による復号とは別に、本人の了承のもとに入手したパスワードによって投票内容を抽出することができる電子投票データを作成することができる。したがって、本発明に係る電子投票媒体は、投票後の集計が正しく行われたことを確認し、検証することができる電子投票データを作成することができる。   Furthermore, since the contents of the vote and the confirmation code are embedded in the electronic voting data based on the password, the electronic voting medium according to the present invention is a password obtained with the consent of the principal, apart from decryption with the private key. It is possible to create electronic voting data from which voting content can be extracted. Therefore, the electronic voting medium according to the present invention can create electronic voting data that can confirm and verify that the counting after voting is correctly performed.

(2) 前記投票内容及び前記確認コードに、前記パスワードと、前記投票識別コードとを対応付けて記憶する投票データ記憶手段と、前記投票データ記憶手段に記憶された前記投票内容及び前記確認コードと、前記パスワードと、前記投票識別コードとを対応付けて表示する表示手段と、をさらに備える(1)に記載の電子投票媒体。   (2) Voting data storage means for storing the voting contents and the confirmation code in association with the password and the voting identification code; the voting contents and the confirmation code stored in the voting data storage means; The electronic voting medium according to (1), further comprising display means for displaying the password and the voting identification code in association with each other.

(2)の構成によれば、(1)に記載の電子投票媒体は、さらに、投票内容及び確認コードに、パスワードと、投票識別コードとを対応付けて記憶し、記憶された投票内容及び確認コードと、パスワードと、投票識別コードとを対応付けて表示する。   According to the configuration of (2), the electronic voting medium described in (1) further stores a voting content and a confirmation code in association with a password and a voting identification code, and stores the stored voting content and confirmation. A code, a password, and a vote identification code are displayed in association with each other.

したがって、(2)に記載の電子投票媒体は、投票内容を確認するための確認コードと、投票内容を検証するためのパスワードとを容易に投票者に提供することができる。   Therefore, the electronic voting medium described in (2) can easily provide a voter with a confirmation code for confirming the voting content and a password for verifying the voting content.

本発明によれば、電子投票媒体は、電子投票において、同一人であるならば定められた開票日までに何度でも投票をすることができ、かつ、不正な投票を容易に防止することができる電子投票データを作成することができる。   According to the present invention, in the electronic voting medium, the electronic voting medium can vote as many times as possible within a predetermined date of vote, and can easily prevent illegal voting. Electronic voting data can be created.

さらに、電子投票媒体が作成した投票識別コードは、投票内容と対になった確認コードとは別に作成されるので、公表される確認コードから投票識別コードが関連付けられることはない。よって、電子投票媒体は、投票識別コードによって特定することができる電子投票データを作成することができると共に、投票者の匿名性を満たした電子投票データを作成することができる。   Furthermore, since the voting identification code created by the electronic voting medium is created separately from the confirmation code paired with the voting content, the voting identification code is not associated with the published confirmation code. Therefore, the electronic voting medium can create electronic voting data that can be specified by the voting identification code, and can create electronic voting data that satisfies the anonymity of the voter.

さらに、電子投票媒体は、秘密鍵による復号とは別に、本人の了承のもとに入手したパスワードによって投票内容を抽出することができる電子投票データを作成することができる。よって、電子投票媒体は、投票後の集計が正しく行われたことを確認し、検証することができる電子投票データを作成することができる。   Further, the electronic voting medium can create electronic voting data that can extract the voting contents by a password obtained with the consent of the person, apart from the decryption by the secret key. Therefore, the electronic voting medium can create electronic voting data that can confirm and verify that the counting after voting is correctly performed.

本発明の一実施形態に係る電子投票システムの実施形態1の特徴を示す特徴図である。It is a characteristic view which shows the characteristic of Embodiment 1 of the electronic voting system which concerns on one Embodiment of this invention. 本発明の一実施形態に係る全体画像データの例を示す図である。It is a figure which shows the example of the whole image data which concerns on one Embodiment of this invention. 本発明の一実施形態に係る分割画像データの例を示す図である。It is a figure which shows the example of the division | segmentation image data which concerns on one Embodiment of this invention. 本発明の一実施形態に係る分割画像データを構成する画素の階調値と、擬似乱数の生成とについて説明する説明図である。It is explanatory drawing explaining the gradation value of the pixel which comprises the divided image data based on one Embodiment of this invention, and generation | occurrence | production of a pseudorandom number. 本発明の一実施形態に係る分割画像データにおいて、データのバイナリ値をビットに分解して埋め込むことを説明する図である。It is a figure explaining disassembling and embedding the binary value of data into bits in divided image data concerning one embodiment of the present invention. 本発明の一実施形態に係る分割画像データの別の例を示す図である。It is a figure which shows another example of the division | segmentation image data which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票データのデータを埋め込むための複数の画素の位置を算出するために設定される領域の例を示す図である。It is a figure which shows the example of the area | region set in order to calculate the position of the several pixel for embedding the data of the electronic voting data based on one Embodiment of this invention. 本発明の一実施形態に係る電子投票システムの実施形態2の特徴を示す特徴図である。It is a characteristic diagram which shows the characteristic of Embodiment 2 of the electronic voting system which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票データ作成装置の機能を示す機能ブロック図である。It is a functional block diagram which shows the function of the electronic voting data creation apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票装置の機能を示す機能ブロック図である。It is a functional block diagram which shows the function of the electronic voting apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子開票装置の機能を示す機能ブロック図である。It is a functional block diagram which shows the function of the electronic ticketing apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票データ作成装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the electronic voting data creation apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る暗号化処理の内容を示すフローチャートである。It is a flowchart which shows the content of the encryption process which concerns on one Embodiment of this invention. 本発明の一実施形態に係るGetPosの処理内容を示すフローチャートである。It is a flowchart which shows the processing content of GetPos which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the electronic voting apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子開票装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the electronic ticketing apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係るビットの対応付けテーブルを示す図である。It is a figure which shows the correspondence table of the bit which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票データ作成装置において、電子投票データ521を作成する例を示す図である。It is a figure which shows the example which produces the electronic voting data 521 in the electronic voting data creation apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票装置において、電子投票データを表示する例を示す図である。It is a figure which shows the example which displays electronic voting data in the electronic voting apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子開票装置において、電子投票データを集計し、公表する例を示す図である。It is a figure which shows the example which totals and announces electronic voting data in the electronic vote counting device which concerns on one Embodiment of this invention. 本発明の一実施形態に係る暗号化装置の機能を示す機能ブロック図である。It is a functional block diagram which shows the function of the encryption apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票媒体の機能を示す機能ブロック図である。It is a functional block diagram which shows the function of the electronic voting medium which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票媒体の例を示す図である。It is a figure which shows the example of the electronic voting medium which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票媒体を利用した電子投票システムの例を示す図である。It is a figure which shows the example of the electronic voting system using the electronic voting medium which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票媒体を利用する投票プログラムの処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the voting program using the electronic voting medium based on one Embodiment of this invention. 本発明の一実施形態に係る電子投票媒体の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the electronic voting medium which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子投票媒体を利用する場合の電子投票データ作成装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the electronic voting data creation apparatus in the case of using the electronic voting medium based on one Embodiment of this invention. 本発明の一実施形態に係る電子投票媒体を利用する場合の電子開票装置の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the electronic vote counting apparatus when using the electronic voting medium which concerns on one Embodiment of this invention.

以下、本発明の実施形態について図を参照しながら説明する。すなわち、実施形態1において、本発明に係る電子投票媒体700が前提とする電子投票システム10について説明し、実施形態2において、本発明に係る電子投票媒体700が前提とする、パスワードを用いる電子投票システム10について説明し、実施形態3において、本発明に係る電子投票媒体700において利用する暗号化方法を実行する暗号化装置400について説明し、実施形態4において、本発明に係る電子投票媒体700について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. That is, the electronic voting system 10 premised on the electronic voting medium 700 according to the present invention is described in the first embodiment, and the electronic voting using a password is premised on the electronic voting medium 700 according to the present invention in the second embodiment. The system 10 will be described. In the third embodiment, the encryption device 400 that executes the encryption method used in the electronic voting medium 700 according to the present invention will be described. In the fourth embodiment, the electronic voting medium 700 according to the present invention will be described. explain.

[実施形態1]
実施形態1は、電子投票システム10の実施例である。実施形態1の電子投票システム10は、電子投票データ作成装置100と、電子投票装置200と、電子開票装置300とを備えている。そして、電子投票データ作成装置100は、全体画像データ501に基づいて作成した鍵ペア(公開鍵と秘密鍵)のうち公開鍵を分割画像データ511に埋め込んで、電子投票データ521を作成する。電子投票装置200は、受け付けた投票内容及び確認コードを、電子投票データ521に埋め込まれた公開鍵を用いて暗号化し電子投票データ521に埋め込む。電子開票装置300は、収集した分割画像データ511に基づいて作成した鍵ペア(公開鍵と秘密鍵)のうち秘密鍵を用いて、電子投票データ521に埋め込まれた暗号化された投票内容及び確認コードを復号し、公表する。
[Embodiment 1]
The first embodiment is an example of the electronic voting system 10. The electronic voting system 10 according to the first embodiment includes an electronic voting data creation device 100, an electronic voting device 200, and an electronic voting device 300. Then, the electronic voting data creation apparatus 100 creates the electronic voting data 521 by embedding the public key in the divided image data 511 among the key pair (public key and private key) created based on the entire image data 501. The electronic voting apparatus 200 encrypts the received voting content and confirmation code using the public key embedded in the electronic voting data 521 and embeds it in the electronic voting data 521. The electronic voting apparatus 300 uses the private key of the key pair (public key and private key) created based on the collected divided image data 511, and the encrypted voting content and confirmation embedded in the electronic voting data 521 Decode and publish the code.

本実施形態は、コンピュータ及びその周辺装置に適用される。本実施形態における電子投票データ作成装置100、電子投票装置200及び電子開票装置300は、コンピュータ及びその周辺装置が備えるハードウェア並びに該ハードウェアを制御するソフトウェアによって構成される。   This embodiment is applied to a computer and its peripheral devices. The electronic voting data creation device 100, the electronic voting device 200, and the electronic voting device 300 in the present embodiment are configured by hardware included in a computer and its peripheral devices, and software that controls the hardware.

上記ハードウェアには、制御部としてのCPU(Central Processing Unit)の他、記憶部、通信装置、表示装置及び入力装置が含まれる。記憶部としては、例えば、メモリ(RAM:Random Access Memory、ROM:Read Only Memory等)、ハードディスクドライブ(HDD:Hard Disk Drive)及び光ディスク(CD:Compact Disk、DVD:Digital Versatile Disk等)ドライブが挙げられる。通信装置としては、例えば、各種有線及び無線インターフェース装置が挙げられる。表示装置としては、例えば、液晶ディスプレイやプラズマディスプレイ等の各種ディスプレイが挙げられる。入力装置としては、例えば、キーボード及びポインティング・デバイス(マウス、トラッキングボール等)が挙げられる。   The hardware includes a storage unit, a communication device, a display device, and an input device in addition to a CPU (Central Processing Unit) as a control unit. Examples of the storage unit include a memory (RAM: Random Access Memory, ROM: Read Only Memory, etc.), a hard disk drive (HDD: Hard Disk Drive), and an optical disk (CD: Compact Disc, DVD: Digital Versatile Drive, etc.). It is done. Examples of the communication device include various wired and wireless interface devices. Examples of the display device include various displays such as a liquid crystal display and a plasma display. Examples of the input device include a keyboard and a pointing device (mouse, tracking ball, etc.).

上記ソフトウェアには、上記ハードウェアを制御するコンピュータ・プログラムやデータが含まれる。コンピュータ・プログラムやデータは、記憶部により記憶され、制御部により適宜実行、参照される。また、コンピュータ・プログラムやデータは、通信回線を介して配布されることも可能であり、CD−ROM等のコンピュータ可読媒体に記録して配布されることも可能である。   The software includes a computer program and data for controlling the hardware. The computer program and data are stored in the storage unit, and are appropriately executed and referenced by the control unit. The computer program and data can be distributed via a communication line, or can be recorded on a computer-readable medium such as a CD-ROM and distributed.

図1は、本発明の一実施形態に係る電子投票システム10の実施形態1の特徴を示す特徴図である。特徴図に従って、電子投票システム10の概要を各装置ごとに説明する。   FIG. 1 is a feature diagram showing features of Embodiment 1 of an electronic voting system 10 according to an embodiment of the present invention. The outline of the electronic voting system 10 will be described for each device according to the feature diagram.

電子投票データ作成装置100は、全体画像データ501を分割し、当該分割された分割画像データ511に、全体画像データ501に基づいて作成した公開鍵を埋め込むことにより複数の電子投票データ521を固有に作成する。すなわち、電子投票データ作成装置100は、分割画像データ511を構成する画素値に基づいて、電子投票データ521ごとに異なる位置に公開鍵を埋め込んで、電子投票データ521を作成する。   The electronic voting data creation apparatus 100 divides the whole image data 501 and embeds a plurality of pieces of electronic voting data 521 uniquely by embedding a public key created based on the whole image data 501 in the divided divided image data 511. create. That is, the electronic voting data creation apparatus 100 creates the electronic voting data 521 by embedding a public key in a different position for each electronic voting data 521 based on the pixel values constituting the divided image data 511.

ここで、全体画像データ501は、画像の最小要素である画素によって構成されたデジタル画像データである。デジタル画像データは、画素の輝度や色をデジタル化した画素値によって構成される。画素値は、例えば、色の3原色のうち赤色をデジタル化した階調値を記憶するRチャネル、緑色をデジタル化した階調値を記憶するGチャネル、青色をデジタル化した階調値を記憶するBチャネル等から構成される。そして、例えば、デジタル画像データは、画素値が2次元配列形式でメインメモリや、補助記憶装置等に記憶されている。分割画像データ511は、全体画像データ501を所定の数で分割した画像データである。   Here, the entire image data 501 is digital image data composed of pixels which are the minimum elements of the image. Digital image data is composed of pixel values obtained by digitizing luminance and color of pixels. The pixel value is, for example, an R channel that stores gradation values obtained by digitizing red among the three primary colors, a G channel that stores gradation values obtained by digitizing green, and a gradation value obtained by digitizing blue. The B channel is configured. For example, in the digital image data, pixel values are stored in a main memory, an auxiliary storage device, or the like in a two-dimensional array format. The divided image data 511 is image data obtained by dividing the entire image data 501 by a predetermined number.

ここで、人間の視覚は、画像を構成する3原色のうち青色の変化に気づきにくい、という特徴がある。そこで、本発明は、画像を構成する3原色の階調値のうちBチャネルにデータを隠すことによって、画像に暗号化ブックの役割をさせつつ、画像が視認されても違和感を与えないようにすることができる。   Here, human vision is characterized in that it is difficult to notice a change in blue among the three primary colors constituting the image. Therefore, the present invention hides data in the B channel among the gradation values of the three primary colors constituting the image so that the image does not feel uncomfortable even when the image is visually recognized while serving as an encrypted book. can do.

電子投票データ作成装置100は、全体画像データ501を構成する画素値に基づいて所定の演算を行い、公開鍵を作成する。所定の演算とは、例えば、全体画像データ501を構成する画素値のうち、公開鍵を書き込む所定のチャネル(格納用チャネルといい、例えば、Bチャネル)以外のチャネル(算出用チャネルといい、例えば、Rチャネル及び/又はGチャネル)の階調値を、加算することやビット演算を行うこと等である。そして、電子投票データ作成装置100は、所定の演算の演算結果である全体画像コードに基づいて、例えば、RSA暗号方式によって作成される鍵ペア(公開鍵と秘密鍵)を作成する。   The electronic voting data creation apparatus 100 creates a public key by performing a predetermined calculation based on the pixel values constituting the entire image data 501. The predetermined calculation is, for example, a channel (calculation channel) other than a predetermined channel (storage channel, for example, B channel) into which a public key is written out of pixel values constituting the entire image data 501. , R channel and / or G channel) are added, bit operations are performed, and the like. Then, the electronic voting data creation device 100 creates a key pair (public key and secret key) created by, for example, the RSA encryption method, based on the entire image code that is a calculation result of a predetermined calculation.

例えば、電子投票データ作成装置100は、まず、適当な正整数e(例えば、60001)を選択する。次に、電子投票データ作成装置100は、全体画像コードをパラメータにランダムに大きい素数の組み(p、q)を求め、pとqとの積であるNを求める。そして、電子投票データ作成装置100は、得られた(e、N)を公開鍵とする。この場合、秘密鍵dは、d=e−1(mod(lcm(p−1)(q−1)))によって求められる。 For example, the electronic voting data creation device 100 first selects an appropriate positive integer e (for example, 60001). Next, the electronic voting data creation device 100 obtains a set of large prime numbers (p, q) at random using the entire image code as a parameter, and obtains N, which is the product of p and q. The electronic voting data creation apparatus 100 uses the obtained (e, N) as a public key. In this case, the secret key d is obtained by d = e −1 (mod (lcm (p−1) (q−1))).

さらに、電子投票データ作成装置100は、全体画像コードと、入力されたコード(例えば、図9で後述する秘密コード)とに基づいて算出したコード(例えば、図9で後述する暗号秘密コード)に基づいて大きい素数の組み(p、q)を求め、鍵ペア(公開鍵と秘密鍵)を作成するとしてもよい。   Furthermore, the electronic voting data creation device 100 converts the whole image code and a code (for example, a secret code described later in FIG. 9) calculated based on the input code (for example, a secret code described later in FIG. 9). A large prime number pair (p, q) may be obtained based on the key pair (public key and secret key).

そして、電子投票データ作成装置100は、データを埋め込む方法によって、公開鍵を分割画像データ511に埋め込む。   Then, the electronic voting data creation device 100 embeds the public key in the divided image data 511 by a method of embedding data.

データを埋め込む方法は、次の(1)から(3)の方法によってデータを埋め込む。
(1)データを埋め込むための複数の画素を算出する。複数の画素は次の様に算出される。
(1−1)分割画像データ511を構成する画素の各算出用チャネルの階調値に基づいて所定の演算を行う。すなわち、分割画像データ511を構成する各画素の階調値のビットの重みを用いて所定の個数の擬似乱数を生成する。所定の個数の擬似乱数は、分割画像データ511内に設定された領域内の画素に基づいて所定の演算によって算出されるとしてもよい。
(1−2)生成された所定の個数の擬似乱数に基づいて、分割画像データ511内の所定の個数の位置を算出する。例えば、位置の算出は、生成した擬似乱数を、分割画像データ511の総画素数(縦の画素数×横の画素数)で除算した剰余によって、分割画像データ511内の位置(縦及び横の位置)を算出することができる。このように、各画素の階調値から生成した擬似乱数に基づいて算出した位置は、分割画像データ511が異なると異なる位置になる。よって、位置の算出は、分割画像データ511ごとに、予測できない分散された位置を算出することができる。
Data is embedded by the following methods (1) to (3).
(1) A plurality of pixels for embedding data are calculated. A plurality of pixels are calculated as follows.
(1-1) A predetermined calculation is performed based on the gradation value of each calculation channel of the pixels constituting the divided image data 511. That is, a predetermined number of pseudo-random numbers are generated using the bit weight of the gradation value of each pixel constituting the divided image data 511. The predetermined number of pseudo-random numbers may be calculated by a predetermined calculation based on the pixels in the area set in the divided image data 511.
(1-2) A predetermined number of positions in the divided image data 511 are calculated based on the generated predetermined number of pseudo-random numbers. For example, the position is calculated by calculating the position (vertical and horizontal) in the divided image data 511 by the remainder obtained by dividing the generated pseudo-random number by the total number of pixels of the divided image data 511 (vertical pixel number × horizontal pixel number). Position) can be calculated. As described above, the position calculated based on the pseudo random number generated from the gradation value of each pixel is different when the divided image data 511 is different. Therefore, the position can be calculated for each divided image data 511 in a distributed position that cannot be predicted.

(2)算出した複数の画素の各格納用チャネルの所定のビットに、ビットの重みを対応付ける。すなわち、各格納用チャネルの所定のビット(例えば、公開鍵を埋め込むビットは3)に、(1)で算出した順にビットの重みを対応付ける。例えば、最初に算出した画素の格納用チャネルの所定のビット(例えば、ビット3)にビットの重み「2」を対応付ける。同様にして、n番目に算出した画素の格納用チャネルの所定のビット(例えば、ビット3)にビットの重み「2」を対応付ける。 (2) A bit weight is associated with a predetermined bit of each storage channel of the calculated plurality of pixels. That is, bit weights are associated with predetermined bits (for example, 3 for embedding a public key) of each storage channel in the order calculated in (1). For example, a bit weight “2 0 ” is associated with a predetermined bit (for example, bit 3) of the pixel storage channel calculated first. Similarly, a bit weight “2 n ” is associated with a predetermined bit (for example, bit 3) of the n-th calculated pixel storage channel.

(3)ビットの重みが対応付けられた所定のビットに、データのバイナリ値をビットに分解して書き込むことによりデータを埋め込む。すなわち、例えば、「2」が対応付けられた、最初に算出された画素の格納用チャネルのビット3に、公開鍵のバイナリ値を構成するビットのうち「2」ビットの値を書き込む。次に、「2」が対応付けられた、次に算出された画素の格納用チャネルのビット3に、公開鍵のバイナリ値を構成するビットのうち「2」ビットの値を書き込む。このように順次、「2」が対応付けられた、算出された画素の格納用チャネルのビット3に、公開鍵のバイナリ値を構成するビットのうち「2」ビットの値を書き込むことによって公開鍵を埋め込む。 (3) The data is embedded by decomposing the binary value of the data into bits and writing them in predetermined bits associated with bit weights. Thus, for example, "2 0" are associated to bit 3 of the storage channels of the initially calculated pixel writes "2 0" bit value among the bits forming the binary value of the public key. Then, "2 1" is associated, then the bit 3 of the storage channel of the pixel is calculated, and writes "2 1" bit value among the bits forming the binary value of the public key. By sequentially writing the value of “2 n ” bits among the bits constituting the binary value of the public key to bit 3 of the calculated pixel storage channel associated with “2 n ” sequentially in this way. Embed the public key.

格納用チャネルの所定のビットは、例えば、ビット1が暗号化された投票内容及び確認コードを埋め込むビット、ビット2が暗号化されたパスワードを埋め込むビット、ビット3が公開鍵を埋め込むビット、ビット4が画像の固有コード(MD5)を埋め込むビット、ビット5が全体画像コードの冗長情報を埋め込むビット、ビット6が電子投票データ521の投票状態(例えば、白票状態を0、投票済み状態を1で示す)についての情報を埋め込むビットである。   The predetermined bits of the storage channel are, for example, a bit for embedding the voting content and confirmation code in which bit 1 is encrypted, a bit for embedding an encrypted password in bit 2, a bit for embedding a public key, bit 4 Is a bit for embedding the unique code (MD5) of the image, bit 5 is a bit for embedding redundant information of the entire image code, and bit 6 indicates the voting state of the electronic voting data 521 (for example, 0 for the white vote state and 1 for the voted state) ) Is a bit to embed information about.

データを埋め込む方法によって埋め込まれたデータは、データを復元する方法によって埋め込まれたデータを復元することができる。   The data embedded by the data embedding method can restore the data embedded by the data restoring method.

データを復元する方法は、上述したデータを埋め込む方法の(3)において、埋め込まれたビットの値を、格納チャネルの所定のビットに対応付けられたビットの重みに従って、バイナリ値に合成することによってデータを復元する。   The method of restoring data is by combining the value of the embedded bit with a binary value according to the bit weight associated with the predetermined bit of the storage channel in (3) of the method of embedding data described above. Restore data.

このように、データを埋め込む方法は、画像データによって異なる画素の位置にデータを埋め込む。そして、データを復元する方法は、データを埋め込む方法によって埋め込まれた画像データに基づいてデータを復元する。すなわち、データを埋め込む方法は、画像データを暗号ブックとしてデータを暗号化し、データを復元する方法は、暗号ブックである画像データに基づいてデータを復元する。したがって、画像データである電子投票データ521を用いる電子投票システム10は、電子投票データ521ごとの異なる位置にデータを秘匿するという、従来の暗号化をさらに安全にした暗号化を実行する。   As described above, the method of embedding data embeds data at different pixel positions depending on the image data. As a method for restoring the data, the data is restored based on the image data embedded by the data embedding method. That is, the method of embedding data encrypts data using image data as an encryption book, and the method of restoring data restores data based on image data that is an encryption book. Therefore, the electronic voting system 10 using the electronic voting data 521 that is image data executes encryption that makes the conventional encryption more secure, that is, concealing data at different positions for each electronic voting data 521.

このように、電子投票データ作成装置100は、分割画像データ511に公開鍵を埋め込むことにより複数の電子投票データ521をそれぞれ固有に作成できる。   As described above, the electronic voting data creation device 100 can uniquely create a plurality of electronic voting data 521 by embedding the public key in the divided image data 511.

ここで、電子投票データ521における鍵ペア(公開鍵と秘密鍵)による暗号化と復号とに付いて説明する。電子投票データ作成装置100によって全体画像コードに基づいて作成された鍵ペア(公開鍵と秘密鍵)のうちの公開鍵を用いて暗号化されたデータ(例えば、投票内容及び確認コード)は、作成された鍵ペア(公開鍵と秘密鍵)のうちの秘密鍵を用いて復号される。   Here, encryption and decryption using the key pair (public key and secret key) in the electronic voting data 521 will be described. Data encrypted by using the public key of the key pair (public key and private key) created based on the entire image code by the electronic voting data creation device 100 (for example, voting content and confirmation code) is created. The decryption is performed using the secret key of the key pair (public key and secret key).

例えば、電子投票データ作成装置100は、投票率が棄権票や白紙票を含めて100パーセントであれば復号可能であることを条件として電子投票データ521を作成する。この場合には、収集した電子投票データ521によって全体画像データ501を構成する画素の全てを取得することができるので、復号は、電子投票データ作成装置100と同様に、算出された全体画像コードに基づいて作成された鍵ペア(公開鍵と秘密鍵)のうちの秘密鍵を用いることによって可能である。   For example, the electronic voting data creation device 100 creates the electronic voting data 521 on the condition that it can be decrypted if the voting rate is 100% including an abstention vote or a blank paper vote. In this case, since all the pixels constituting the entire image data 501 can be acquired from the collected electronic voting data 521, the decoding is performed on the calculated entire image code in the same manner as the electronic voting data creation device 100. This is possible by using a secret key of a key pair (public key and secret key) created based on the key.

また、例えば、電子投票データ作成装置100は、投票率が一定の割合以上であれば復号可能であることを条件として電子投票データ521を作成する。この場合には、電子投票データ作成装置100は、信号訂正理論を利用して、複数の電子投票データ521に基づいて鍵ペア(公開鍵と秘密鍵)を算出することができるように、全体画像コードの冗長情報を作成し、電子投票データ521ごとに埋め込む。このようにして、複数の電子投票データ521に埋め込まれた冗長情報に基づいて復元された全体画像コードを取得することができるので、復号は、電子投票データ作成装置100と同様に、復元された全体画像コードに基づいて作成された鍵ペア(公開鍵と秘密鍵)のうちの秘密鍵を用いることによって可能である。   Further, for example, the electronic voting data creation device 100 creates the electronic voting data 521 on the condition that it can be decrypted if the voting rate is equal to or higher than a certain ratio. In this case, the electronic voting data creation device 100 uses the signal correction theory to calculate the key pair (public key and private key) based on the plurality of electronic voting data 521. Code redundancy information is created and embedded for each electronic voting data 521. In this way, since the entire image code restored based on the redundant information embedded in the plurality of electronic voting data 521 can be obtained, the decoding is restored in the same manner as the electronic voting data creation device 100. This is possible by using a secret key of a key pair (public key and secret key) created based on the entire image code.

また、例えば、電子投票データ作成装置100は、ビット列をSとする全体画像コードを含んだデータ(例えば、全体画像コードのビット列Sに余分のビット列を補足したデータ、「1010」+Sや、S+「1010」や、「10」+S+「10」等)を作成し、電子投票データ521ごとに埋め込む。そうすると、全体画像コードは、2件の電子投票データ521から必ず取得される(2件の電子投票データ521に書き込まれた全体画像コードを含んだデータを比較することによって同じビット列である全体画像コードSが取得される)。このようにして、複数の電子投票データ521に基づいて全体画像コードを取得することができるので、復号は、電子投票データ作成装置100と同様に、取得された全体画像コードに基づいて作成された鍵ペア(公開鍵と秘密鍵)のうちの秘密鍵を用いることによって可能である。すなわち、電子投票データ作成装置100は、全体画像データ501を分割画像データ511に分割する数を、求められる投票率に従って算出することにより、条件とする投票率に合致した電子投票データ521を作成することができる。   Further, for example, the electronic voting data creation device 100 includes data including an entire image code having a bit string as S (for example, data obtained by supplementing the bit string S of the entire image code with an extra bit string, “1010” + S, S + “ 1010 "," 10 "+ S +" 10 ", etc.) are created and embedded for each electronic voting data 521. Then, the entire image code is necessarily acquired from the two electronic voting data 521 (the entire image code that is the same bit string by comparing the data including the entire image code written in the two electronic voting data 521. S is acquired). In this way, since the entire image code can be acquired based on the plurality of electronic voting data 521, the decoding is generated based on the acquired entire image code in the same manner as the electronic voting data generating device 100. This is possible by using a secret key of a key pair (public key and secret key). That is, the electronic voting data creation device 100 creates the electronic voting data 521 that matches the voting rate as a condition by calculating the number of divisions of the entire image data 501 into the divided image data 511 according to the required voting rate. be able to.

また、例えば、電子投票データ作成装置100は、投票された電子投票データ521が1件でも復号可能であることを条件として電子投票データ521を作成する。この場合には、電子投票データ作成装置100は、全体画像コードを電子投票データ521ごとに埋め込む。埋め込まれた全体画像コードによって、復号は、電子投票データ作成装置100と同様に、埋め込まれた全体画像コードに基づいて作成された鍵ペア(公開鍵と秘密鍵)のうちの秘密鍵を用いることによって可能である。   Further, for example, the electronic voting data creation device 100 creates the electronic voting data 521 on condition that even one voted electronic voting data 521 can be decrypted. In this case, the electronic voting data creation device 100 embeds the entire image code for each electronic voting data 521. As with the electronic voting data creation device 100, decryption is performed using the private key of the key pair (public key and private key) created based on the embedded whole image code, using the embedded whole image code. Is possible.

電子投票装置200は、電子投票データ521に埋め込まれている公開鍵に基づいて、受け付けた投票ごとの投票内容と、投票内容に対応付けた確認コードとを暗号化する。そして、電子投票装置200は、当該暗号化された投票内容及び確認コードを電子投票データ521に埋め込む。ここで、投票内容は、例えば、立候補者を示す番号やコード等である。電子投票装置200は、投票者によって操作された入力装置から投票内容を受け付ける。確認コードは、例えば、電子投票装置200が投票内容に対応付けたコードである。   Based on the public key embedded in the electronic voting data 521, the electronic voting apparatus 200 encrypts the vote content for each accepted vote and the confirmation code associated with the vote content. The electronic voting apparatus 200 embeds the encrypted voting content and confirmation code in the electronic voting data 521. Here, the voting content is, for example, a number or code indicating a candidate. The electronic voting apparatus 200 receives voting content from an input device operated by a voter. The confirmation code is, for example, a code that the electronic voting apparatus 200 associates with the voting content.

電子投票装置200は、電子投票データ521から公開鍵を復元する。すなわち、電子投票装置200は、電子投票データ作成装置100によって埋め込まれた公開鍵を、復元する方法によって復元する。   The electronic voting apparatus 200 restores the public key from the electronic voting data 521. In other words, the electronic voting device 200 restores the public key embedded by the electronic voting data creation device 100 by a method of restoring.

電子投票装置200は、復元した公開鍵によって、投票内容及び確認コードを暗号化する。そして、電子投票装置200は、暗号化した投票内容及び確認コードを、データを埋め込む方法によって電子投票データ521に埋め込む(例えば、格納用チャネルのビット1)。   The electronic voting apparatus 200 encrypts the voting contents and the confirmation code with the restored public key. Then, the electronic voting apparatus 200 embeds the encrypted voting content and confirmation code in the electronic voting data 521 by a method of embedding data (for example, bit 1 of the storage channel).

電子開票装置300は、複数の電子投票装置200によって暗号化された各電子投票データ521を収集する。次に、電子開票装置300は、収集した各電子投票データ521に基づいて秘密鍵を作成し、作成した秘密鍵に基づいて、収集した各電子投票データ521から取得した暗号化された投票内容及び確認コードを復号する。そして、電子開票装置300は、当該復号した投票内容及び確認コードを集計し、公表する。   The electronic vote counting device 300 collects each electronic voting data 521 encrypted by the plurality of electronic voting devices 200. Next, the electronic vote counting device 300 creates a secret key based on each collected electronic voting data 521, and based on the created secret key, the encrypted voting content acquired from each collected electronic voting data 521, and Decrypt the verification code. Then, the electronic vote counting device 300 totals and publishes the decrypted voting contents and confirmation codes.

ここで、秘密鍵は、電子投票データ作成装置100と同様に作成される。すなわち、電子開票装置300は、収集した電子投票データ521に基づいて全体画像コードを取得し、取得した全体画像コードに基づいて、例えば、RSA暗号方式によって作成される鍵ペア(公開鍵と秘密鍵)のうちの秘密鍵を作成する。そして、電子開票装置300は、作成した秘密鍵に基づいて、電子投票データ521から復元した、暗号化された投票内容及び確認コードを復号する。この場合に、正しい秘密鍵を作成することができるように電子投票データ521を収集できなかったり、不正な電子投票データ521が混じっていたりした場合には、作成した秘密鍵では投票内容を正しく復元し、復号することができないので、電子開票装置300は、投票が正しく行われなかったことを検出することができる。   Here, the secret key is created in the same manner as the electronic voting data creation device 100. That is, the electronic vote counting device 300 acquires the entire image code based on the collected electronic voting data 521, and based on the acquired entire image code, for example, a key pair (public key and private key created by the RSA encryption method). ) Is created. Then, the electronic vote counting device 300 decrypts the encrypted voting content and the confirmation code restored from the electronic voting data 521 based on the created secret key. In this case, if the electronic voting data 521 cannot be collected so that a correct private key can be created, or the illegal electronic voting data 521 is mixed, the created private key correctly restores the voting contents. However, since the decryption cannot be performed, the electronic vote counting device 300 can detect that the voting is not correctly performed.

そして、電子開票装置300は、復号した投票内容及び確認コードを集計し、公表する。確認コードは、投票内容に対応付けられたコードであるので、電子開票装置300は、投票内容及び確認コードを公表することによって、確認コードを覚えている投票者に、投票内容が正確に集計されていることを確認させることができる。   Then, the electronic vote counting device 300 tabulates and publishes the decrypted voting contents and confirmation codes. Since the confirmation code is a code associated with the content of the vote, the electronic vote counting device 300 publishes the content of the vote and the confirmation code, so that the vote content is accurately counted for the voter who remembers the confirmation code. Can be confirmed.

このように、電子投票データ作成装置100とは独立して、電子開票装置300が収集した電子投票データ521に基づいて秘密鍵を作成することによって、電子投票システム10は、システムの安全性を向上させることができる。   As described above, the electronic voting system 10 improves the security of the system by creating a secret key based on the electronic voting data 521 collected by the electronic voting apparatus 300 independently of the electronic voting data creating apparatus 100. Can be made.

図2から図7によって電子投票データ521の作成を説明する。
図2は、本発明の一実施形態に係る全体画像データ501の例を示す図である。図2の例は、全体画像データ501を、縦の破線591及び横の破線592によって、16分割する例である。全体画像データ501を分割することによって分割画像データ511が作成される。
Creation of the electronic voting data 521 will be described with reference to FIGS.
FIG. 2 is a diagram showing an example of the entire image data 501 according to an embodiment of the present invention. The example of FIG. 2 is an example in which the entire image data 501 is divided into 16 parts by a vertical broken line 591 and a horizontal broken line 592. The divided image data 511 is created by dividing the entire image data 501.

全体画像データ501を構成する画素値に基づいて、全体画像コードが算出される。例えば、全体画像データ501がX軸方向に640×4画素、Y軸方向に480×4画素であるとする。画素を構成する3原色の階調値を記憶するチャネルのうち、格納用チャネルは、Bチャネルとし、算出用チャネルは、Rチャネル及びGチャネルとする。各チャネルは、例えば、8ビット構成とする。   A whole image code is calculated on the basis of pixel values constituting the whole image data 501. For example, it is assumed that the entire image data 501 is 640 × 4 pixels in the X-axis direction and 480 × 4 pixels in the Y-axis direction. Of the channels storing the gradation values of the three primary colors constituting the pixel, the storage channel is the B channel, and the calculation channels are the R channel and the G channel. Each channel has an 8-bit configuration, for example.

例えば、全体画像コード(例えば、1024ビット)は、Rチャネル及びGチャネルの階調値を加算することにより得られる。加算は、チャネル単位(8ビットずつ)でなくてもよい。例えば、9ビットずつ(Rチャネルの8ビット及びGチャネルのLSBと、Gチャネルの残り7ビット及び次の画素のRチャネルの2ビットとを)加算する。このようにすることで、特定のビットの値が周期的に加算されることを避けることができる。電子投票システム10は、全体画像コードに基づいて鍵ペア(公開鍵及び秘密鍵)を作成する。   For example, the entire image code (for example, 1024 bits) is obtained by adding the gradation values of the R channel and the G channel. The addition may not be performed in units of channels (each 8 bits). For example, 9 bits are added (8 bits for the R channel and LSB for the G channel, the remaining 7 bits for the G channel, and 2 bits for the R channel of the next pixel). By doing so, it is possible to avoid the value of a specific bit being periodically added. The electronic voting system 10 creates a key pair (public key and secret key) based on the entire image code.

図3は、本発明の一実施形態に係る分割画像データ511の例を示す図である。図3が示す例は、分割画像データ511に基づいて、図4のようにデータを埋め込むための複数の画素(例えば、P1からP10)を算出し、図5のようにデータを埋め込んだことを示す例である。   FIG. 3 is a diagram illustrating an example of the divided image data 511 according to the embodiment of the present invention. In the example shown in FIG. 3, a plurality of pixels (for example, P1 to P10) for embedding data as shown in FIG. 4 are calculated based on the divided image data 511, and the data is embedded as shown in FIG. It is an example to show.

図3の分割画像データ511は、図2の全体画像データ501を、例えば16分割した画像データである。分割画像データ511を構成する画素の位置は、二次元座標(例えば、XY平面のX軸及びY軸)を用いて表わされる。例えば、X軸方向の画素数をw(例えば、640画素)、Y軸方向の画素数をh(例えば、480画素)とすると、画素の位置は、開始点(0、0)、終了点(639、479)、任意の画素の位置(x、y)で表わされる。ここで、図4に基づいて、分割画像データ511を構成する画素に基づいて生成した擬似乱数によって所定の個数の画素の位置を算出することについて説明する。   The divided image data 511 in FIG. 3 is image data obtained by dividing the entire image data 501 in FIG. The positions of the pixels constituting the divided image data 511 are represented using two-dimensional coordinates (for example, the X axis and the Y axis on the XY plane). For example, if the number of pixels in the X-axis direction is w (for example, 640 pixels) and the number of pixels in the Y-axis direction is h (for example, 480 pixels), the position of the pixel is the start point (0, 0), the end point ( 639, 479), and is represented by an arbitrary pixel position (x, y). Here, based on FIG. 4, calculation of the positions of a predetermined number of pixels using pseudorandom numbers generated based on the pixels constituting the divided image data 511 will be described.

図4は、本発明の一実施形態に係る分割画像データ511を構成する画素の階調値と、擬似乱数の生成とについて説明する説明図である。   FIG. 4 is an explanatory diagram for explaining the gradation values of the pixels constituting the divided image data 511 and the generation of pseudo-random numbers according to an embodiment of the present invention.

図4(1)は、分割画像データ511を構成する画素の階調値の構成の例を示している。図4(1)が示す例は、各画素を構成する3原色のうち赤色の階調値を記憶するRチャネルと、緑色の階調値を記憶するGチャネルと、青色の階調値を記憶するBチャネルとをメモリ上に記憶していることを示す例である。そして、図4(1)が示す例は、各画素の画像データ内の位置を、XY平面上の位置で表わした場合を示す例である。   FIG. 4A shows an example of the configuration of the gradation values of the pixels constituting the divided image data 511. In the example shown in FIG. 4A, among the three primary colors constituting each pixel, an R channel that stores a red tone value, a G channel that stores a green tone value, and a blue tone value are stored. This is an example showing that the B channel to be stored is stored in the memory. The example shown in FIG. 4A is an example in which the position of each pixel in the image data is represented by a position on the XY plane.

図4(2)は、画素の階調値に基づいて所定の個数の擬似乱数を生成するための所定の演算について説明する図である。電子投票システム10は、所定の演算によって生成した所定の個数の擬似乱数に基づいて、所定の個数の画素の位置を算出することができる。   FIG. 4B is a diagram for explaining a predetermined calculation for generating a predetermined number of pseudo-random numbers based on the gradation value of the pixel. The electronic voting system 10 can calculate the position of a predetermined number of pixels based on a predetermined number of pseudo-random numbers generated by a predetermined calculation.

ここで、1番目の画素のRチャネルのそれぞれのビットの値をP0R0からP0R7で表わし、n番目の画素のRチャネルのそれぞれのビットの値をPnR0からPnR7で表わす。同様に、1番目の画素のGチャネルのそれぞれのビットの値をP0G0からP0G7で表わし、n番目の画素のGチャネルのそれぞれのビットの値をPnG0からPnG7で表わす。すなわち、Rチャネル及びGチャネルのビット値は次の様な並びで表わせる。   Here, the value of each bit of the R channel of the first pixel is represented by P0R0 to P0R7, and the value of each bit of the R channel of the nth pixel is represented by PnR0 to PnR7. Similarly, the value of each bit of the G channel of the first pixel is represented by P0G0 to P0G7, and the value of each bit of the G channel of the nth pixel is represented by PnG0 to PnG7. That is, the R channel and G channel bit values can be expressed in the following sequence.

1番目のRチャネルのビット値=P0R0、P0R1、P0R2、P0R3、P0R4、P0R5、P0R6、P0R7
1番目のGチャネルのビット値=P0G0、P0G1、P0G2、P0G3、P0G4、P0G5、P0G6、P0G7


n番目のRチャネルのビット値=PnR0、PnR1、PnR2、PnR3、PnR4、PnR5、PnR6、PnR7
n番目のGチャネルのビット値=PnG0、PnG1、PnG2、PnG3、PnG4、PnG5、PnG6、PnG7

Bit value of first R channel = P0R0, P0R1, P0R2, P0R3, P0R4, P0R5, P0R6, P0R7
Bit value of first G channel = P0G0, P0G1, P0G2, P0G3, P0G4, P0G5, P0G6, P0G7


nth R channel bit value = PnR0, PnR1, PnR2, PnR3, PnR4, PnR5, PnR6, PnR7
n-th G channel bit value = PnG0, PnG1, PnG2, PnG3, PnG4, PnG5, PnG6, PnG7

所定の演算は、データを埋め込むために必要なn個(例えば、1024個)の擬似乱数を生成する。所定の演算は、例えば、Dat[i]=Dat[i]+X(k)*2のように表わすことができる。ここで、X(k)は、Rチャネル又はGチャネルの階調値のkビット目の値である。データを埋め込むために必要な個数より1個多い変数を用いて演算を実行することで、所定の演算は、ある特定のビットの数値がある特定の変数に演算されるような周期的配置になることを避けることができる。 The predetermined operation generates n (for example, 1024) pseudorandom numbers necessary for embedding data. The predetermined operation can be expressed as, for example, Dat [i] = Dat [i] + X (k) * 2 k . Here, X (k) is the value of the kth bit of the gradation value of the R channel or G channel. By executing the calculation using one more variable than the number necessary for embedding data, the predetermined calculation is periodically arranged so that the numerical value of a specific bit is calculated for a specific variable. You can avoid that.

例えば、1024個の擬似乱数を生成するための所定の演算は次の様に行われる。
1巡目
Dat[0]=Dat[0]+P0R0*2
Dat[1]=Dat[1]+P0G0*2


Dat[1022]=Dat[1022]+P63R7*2
Dat[1023]=Dat[1023]+P63G7*2
Dat[1023+1]=Dat[1023+1]+P64R0*2
2巡目
Dat[0]=Dat[0]+P64G0*2
Dat[1]=Dat[1]+P64R1*2


Dat[1022]=Dat[1022]+P127G7*2
Dat[1023]=Dat[1023]+P128R0*2
Dat[1023+1]=Dat[1023+1]+P128G0*2
このような演算により、例えば、1025個の乱数のうち最初の1024個の疑似乱数を得る。
For example, a predetermined calculation for generating 1024 pseudo random numbers is performed as follows.
1st round Dat [0] = Dat [0] + P0R0 * 2 0
Dat [1] = Dat [1] + P0G0 * 2 0


Dat [1022] = Dat [1022] + P63R7 * 2 7
Dat [1023] = Dat [1023] + P63G7 * 2 7
Dat [1023 + 1] = Dat [1023 + 1] + P64R0 * 2 0
2nd round Dat [0] = Dat [0] + P64G0 * 2 0
Dat [1] = Dat [1] + P64R1 * 2 1


Dat [1022] = Dat [1022] + P127G7 * 2 7
Dat [1023] = Dat [1023] + P128R0 * 2 0
Dat [1023 + 1] = Dat [1023 + 1] + P128G0 * 2 0
By such an operation, for example, the first 1024 pseudo random numbers out of 1025 random numbers are obtained.

次に、生成された所定の個数(例えば、1024個)の擬似乱数に基づいて、分割画像データ511内の所定の個数(例えば、1024個)の画素の位置を算出する。例えば、生成した擬似乱数(Dat[0]からDat[1023])を分割画像データ511の縦の画素数及び横の画素数でそれぞれ除算した剰余(Dat[0] mod w、Dat[0] mod h)によって、分割画像データ511内の位置(縦及び横の位置)を算出することができる。   Next, the positions of a predetermined number (for example, 1024) of pixels in the divided image data 511 are calculated based on the generated predetermined number (for example, 1024) of pseudorandom numbers. For example, remainders (Dat [0] mod w, Dat [0] mod) obtained by dividing the generated pseudo-random numbers (Dat [0] to Dat [1023]) by the number of vertical pixels and the number of horizontal pixels of the divided image data 511, respectively. The position (vertical and horizontal positions) in the divided image data 511 can be calculated by h).

ここで、位置の算出において、剰余演算の法をそれぞれ(w−2)と(h−1)にすることで、Dat[i]に基づく位置の生成は、画像の対角線の近くに集中することを回避することができる。   Here, in the calculation of the position, the generation of the position based on Dat [i] is concentrated near the diagonal of the image by setting the remainder calculation method to (w-2) and (h-1), respectively. Can be avoided.

このようにして算出された位置が重複している場合には、ハッシュ変換が行われる。ハッシュ変換は、算出された位置を重複しない位置に変換する。例えば、分割画像データ511の画素の位置と、使用しているか否かのフラグを対応付けたハッシュテーブルを用いて、ハッシュ変換は、算出された位置が使用されている場合には、使用していない位置に変換することができる。または、ハッシュ変換は、ハッシュ変換のための演算(例えば、新格納位置x=(格納位置x+23)mod(w)、新格納位置y=(格納位置y+11)mod(h)を行うとしてもよい。   If the positions calculated in this way overlap, hash conversion is performed. The hash conversion converts the calculated position into a position that does not overlap. For example, using a hash table in which the pixel position of the divided image data 511 is associated with a flag indicating whether or not the image is used, the hash conversion is used when the calculated position is used. Can be converted to no position. Alternatively, the hash conversion may be performed by calculation for hash conversion (for example, new storage position x = (storage position x + 23) mod (w), new storage position y = (storage position y + 11) mod (h)).

ここで、図3に戻って、図3が示すP1からP10は、上述のようにして算出された分割画像データ511内の画素である。ここで、図5に基づいて、算出された画素にデータを埋め込むことについて説明する。   Here, returning to FIG. 3, P1 to P10 shown in FIG. 3 are pixels in the divided image data 511 calculated as described above. Here, the embedding of data in the calculated pixel will be described with reference to FIG.

図5は、本発明の一実施形態に係る分割画像データ511において、データのバイナリ値をビットに分解して埋め込むことを説明する図である。   FIG. 5 is a diagram for explaining how to divide and embed binary values of data into bits in divided image data 511 according to an embodiment of the present invention.

電子投票システム10は、上述のようにして算出した複数の画素の各格納用チャネルの所定のビットに、ビットの重みを対応付ける。すなわち、電子投票システム10は、各格納用チャネルの所定のビット(例えば、公開鍵を埋め込むビットは3)に、複数の画素を算出した順にビットの重みを対応付ける。例えば、電子投票システム10は、擬似乱数Dat[0]に基づいて位置を算出し、算出した画素P1の格納用チャネルの所定のビット(例えば、ビット3)にビットの重み「2」を対応付ける。同様にして、電子投票システム10は、擬似乱数Dat[n−1]に基づいて位置を算出し、算出した画素Pnの格納用チャネルの所定のビット(例えば、ビット3)にビットの重み「2n−1」を対応付ける。 The electronic voting system 10 associates a bit weight with a predetermined bit of each storage channel of a plurality of pixels calculated as described above. In other words, the electronic voting system 10 associates bit weights with predetermined bits (for example, 3 for embedding a public key) in each storage channel in the order in which a plurality of pixels are calculated. For example, the electronic voting system 10 calculates a position based on the pseudorandom number Dat [0], and associates a bit weight “2 0 ” with a predetermined bit (for example, bit 3) of the storage channel of the calculated pixel P1. . Similarly, the electronic voting system 10 calculates a position based on the pseudorandom number Dat [n−1], and adds a bit weight “2” to a predetermined bit (for example, bit 3) of the calculated storage channel of the pixel Pn. n−1 ”.

電子投票システム10は、ビットの重みが対応付けられた所定のビットに、データのバイナリ値をビットに分解して書き込むことによりデータを埋め込む。すなわち、電子投票システム10は、例えば、ビットの重み「2」が対応付けられた画素P1の格納用チャネルのビット3に、公開鍵のバイナリ値を構成するビットのうち「2」ビットの値を書き込む。次に、電子投票システム10は、「2」が対応付けられた画素P2の格納用チャネルのビット3に、公開鍵のバイナリ値を構成するビットのうち「2」ビットの値を書き込む。このように順次、電子投票システム10は、ビットの重み「2n−1」が対応付けられた画素の格納用チャネルのビット3に、公開鍵のバイナリ値を構成するビットのうち「2n−1」ビットの値を書き込むことによって公開鍵を埋め込む。このようにして、電子投票データ521は、作成される。 The electronic voting system 10 embeds data by decomposing the binary value of data into bits and writing them into predetermined bits associated with bit weights. That is, the electronic voting system 10, for example, the bit 3 of the storage channels of the pixel P1 where the weight of the bit "2 0" are associated, among bits forming the binary value of the public key "2 0" bit Write the value. Then, the electronic voting system 10, the "2 1" is stored for the channel bit 3 of the pixel P2 corresponding writes "2 1" bit value among the bits forming the binary value of the public key. Thus successively, the electronic voting system 10, the bit 3 of the storage channels of the pixels associated with the weight of the bit "2 n-1", among the bits forming the binary value of the public key "2 n- Embed the public key by writing the value of the “ 1 ” bit. In this way, the electronic voting data 521 is created.

ここで、図3に戻って、図3が示すP1からP10は、上述のようにして算出された分割画像データ511内の画素に、データを構成するビットを埋め込んだ画素である。   Here, returning to FIG. 3, P1 to P10 shown in FIG. 3 are pixels in which the bits constituting the data are embedded in the pixels in the divided image data 511 calculated as described above.

図6は、本発明の一実施形態に係る分割画像データ511の別の例を示す図である。図6が示す例は、データを埋め込むための画素が、分割画像データ511内に設定された領域601内の画素の階調値に基づいて算出されることを示す例である。   FIG. 6 is a diagram showing another example of the divided image data 511 according to the embodiment of the present invention. The example shown in FIG. 6 is an example showing that the pixel for embedding data is calculated based on the gradation value of the pixel in the region 601 set in the divided image data 511.

分割画像データ511内に設定された領域601は、XY平面内において、開始点611(a、b)と、終了点612(a+A、b+B)とによって表わされる。ここで、Aは、X方向の幅、Bは、Y方向の高さである。   An area 601 set in the divided image data 511 is represented by a start point 611 (a, b) and an end point 612 (a + A, b + B) in the XY plane. Here, A is the width in the X direction, and B is the height in the Y direction.

分割画像データ511内に設定された領域601を構成する画素の階調値に基づいて、上述の様に擬似乱数が生成され、生成された擬似乱数に基づいてデータを埋め込む複数の画素の位置が、算出される。そして、算出された複数の画素の各格納用チャネルの所定のビットにデータが、埋め込まれる。   Pseudorandom numbers are generated as described above based on the gradation values of the pixels constituting the region 601 set in the divided image data 511, and the positions of a plurality of pixels in which data is embedded based on the generated pseudorandom numbers are determined. Is calculated. Then, data is embedded in predetermined bits of each storage channel of the calculated plurality of pixels.

領域601は、開始位置及び領域の大きさを示すパラメータによって設定される。例えば、領域601を構成する画素に基づいてデータを埋め込むための複数の画素を算出する関数は、GetPos(*pos,num,par)のように表わされる。   The region 601 is set by parameters indicating the start position and the size of the region. For example, a function for calculating a plurality of pixels for embedding data based on the pixels constituting the region 601 is expressed as GetPos (* pos, num, par).

ここで、*posは、データを埋め込むための複数の画素へのポインタを示し、numは、データを埋め込むための複数の画素の個数を示し、parは、開始位置へのパラメータを示す引数である。すなわち、GetPos(*pos,num,par)は、parによって領域の開始位置(a+par、b+par)を求め、領域の大きさ(幅がA、高さがB)を設定する。そして、GetPos(*pos,num,par)は、設定した領域を構成する画素の階調値に基づいて、上述の様にnum個の擬似乱数を生成し、生成した擬似乱数に基づいて複数の画素の位置を算出し、算出した画素へのポインタを返す。ここで、a、b、A及びBは、例えば、パラメータ記憶部(図9、図10及び図11で後述する作成パラメータ記憶部131、投票パラメータ記憶部231及び開票パラメータ記憶部331)に予め記憶されている。また、この値が、a=b=0、A=電子投票データ521の幅、B=電子投票データ521の高さの場合、GetPos(*pos,num,0)は、電子投票データ521全体を構成する画素に基づいてデータを埋め込むための複数の画素を算出する。   Here, * pos indicates a pointer to a plurality of pixels for embedding data, num indicates the number of the plurality of pixels for embedding data, and par is an argument indicating a parameter for the start position. . That is, GetPos (* pos, num, par) obtains the start position (a + par, b + par) of the region by par and sets the size of the region (width is A and height is B). Then, GetPos (* pos, num, par) generates num pseudo random numbers as described above based on the gradation values of the pixels constituting the set region, and a plurality of pseudo random numbers based on the generated pseudo random numbers. The pixel position is calculated, and a pointer to the calculated pixel is returned. Here, a, b, A, and B are stored in advance in, for example, a parameter storage unit (a creation parameter storage unit 131, a voting parameter storage unit 231 and a vote counting parameter storage unit 331, which will be described later with reference to FIGS. 9, 10, and 11). Has been. When this value is a = b = 0, A = width of the electronic voting data 521, and B = height of the electronic voting data 521, GetPos (* pos, num, 0) represents the entire electronic voting data 521. A plurality of pixels for embedding data are calculated based on the constituent pixels.

図7は、本発明の一実施形態に係る電子投票データ521のデータを埋め込むための複数の画素の位置を算出するために設定される領域の例を示す図である。   FIG. 7 is a diagram showing an example of regions set for calculating the positions of a plurality of pixels for embedding the electronic voting data 521 according to an embodiment of the present invention.

図7(1)が示す例は、領域601内の画素に基づいて、公開鍵と、冗長情報と、投票内容及び確認コードとを埋め込むことを示す例である。例えば、電子投票データ作成装置100は、GetPos(*pos,1024,0)によって得られる1024個の画素621のBチャネルのビット3に、1024ビットの公開鍵を構成するビットを、対応付けられたビットの重みに従って書き込むことによって公開鍵を埋め込む。同様に、電子投票データ作成装置100は、Bチャネルのビット5に冗長情報を埋め込む。電子投票装置200は、同様に、GetPos(*pos,1024,0)によって取得した画素のBチャネルのビット3から公開鍵を復元する。そして、電子投票装置200は、Bチャネルのビット1に、復元した公開鍵によって暗号化した投票内容及び確認コードを埋め込む。電子開票装置300は、同様に、GetPos(*pos,1024,0)によって取得した画素のBチャネルのビット5から冗長情報を復元し、複数の電子投票データ521から復元した冗長情報に基づいて全体画像コードを作成し、作成した全体画像コードに基づいて算出した秘密鍵によって、Bチャネルのビット1から復元した投票内容及び確認コードを復号する。   The example illustrated in FIG. 7A is an example of embedding a public key, redundant information, voting contents, and a confirmation code based on the pixels in the region 601. For example, the electronic voting data creation device 100 associates the bits constituting the 1024-bit public key with bit 3 of the B channel of 1024 pixels 621 obtained by GetPos (* pos, 1024, 0). Embed the public key by writing according to the bit weight. Similarly, the electronic voting data creation device 100 embeds redundant information in bit 5 of the B channel. Similarly, the electronic voting apparatus 200 restores the public key from bit 3 of the B channel of the pixel acquired by GetPos (* pos, 1024, 0). Then, the electronic voting apparatus 200 embeds the voting contents and confirmation code encrypted with the restored public key in bit 1 of the B channel. Similarly, the electronic balloting device 300 restores redundant information from bit 5 of the B channel of the pixel acquired by GetPos (* pos, 1024, 0), and based on the redundant information restored from a plurality of electronic voting data 521 An image code is created, and the voting content and the confirmation code restored from bit 1 of the B channel are decrypted with the secret key calculated based on the created overall image code.

図7(2)が示す例は、後述する実施形態2において、領域601内の画素に基づいて、公開鍵と、冗長情報と、暗号化されたパスワードとを埋め込み、領域602内の画素に基づいて、投票内容及び確認コードを埋め込むことを示す例である。ここで、パスワードは、電子投票装置200において受け付けられるコードである(後述する実施形態2の図10参照)。また、領域602は、パスワードに基づいて作成した値(Ci)をパラメータ(par=Ci)とする領域である。例えば、電子投票データ作成装置100は、図7(1)と同様に、公開鍵と、冗長情報とを埋め込む。電子投票装置200は、図7(1)と同様に、公開鍵を復元し、受け付けたパスワードを暗号化する。そして、電子投票装置200は、GetPos(*pos,1024,0)によって取得した画素621のBチャネルのビット2に、暗号化したパスワードを埋め込むと共に、GetPos(*pos,1024,Ci)によって取得した画素622のBチャネルのビット1に、受け付けた投票内容及び確認コードを埋め込む。   The example shown in FIG. 7B is based on the pixels in the region 602 by embedding the public key, the redundant information, and the encrypted password based on the pixels in the region 601 in the second embodiment to be described later. This is an example of embedding voting content and a confirmation code. Here, the password is a code accepted by the electronic voting apparatus 200 (see FIG. 10 of the second embodiment described later). An area 602 is an area having a value (Ci) created based on the password as a parameter (par = Ci). For example, the electronic voting data creation device 100 embeds a public key and redundant information as in FIG. The electronic voting apparatus 200 restores the public key and encrypts the accepted password, as in FIG. Then, the electronic voting apparatus 200 embeds the encrypted password in the bit 2 of the B channel of the pixel 621 acquired by GetPos (* pos, 1024,0) and acquires it by GetPos (* pos, 1024, Ci). The received voting content and confirmation code are embedded in bit 1 of the B channel of the pixel 622.

図7(3)が示す例は、後述する実施形態2において、図7(2)の例に加えて、さらに領域603内の画素に基づいて、固有コード(MD5)を埋め込むことを示す例である。ここで、固有コード(MD5)は、電子投票データ作成装置100が分割画像データ511に基づいて作成したコードである(後述する実施形態2の図9参照)。また、領域603は、電子投票データ作成装置100が受け付けた秘密コードに基づいて作成した値(CAS)を、パラメータ(par=CAS)とする領域である。例えば、電子投票データ作成装置100は、秘密コードを受け付ける(後述する実施形態2の図9参照)。そして、電子投票データ作成装置100は、秘密コードと、全体画像コードとに基づいて公開鍵と、冗長情報とを作成し、埋め込む。そして、電子投票データ作成装置100は、GetPos(*pos,1024,CAS)によって取得した画素623のBチャネルのビット4に、固有コード(MD5)を埋め込む。電子開票装置300は、復元した固有コード(MD5)が同一の電子投票データ521同士を一の電子投票データ521とみなす。   The example shown in FIG. 7 (3) is an example of embedding the unique code (MD5) based on the pixels in the region 603 in addition to the example of FIG. is there. Here, the unique code (MD5) is a code created by the electronic voting data creation device 100 based on the divided image data 511 (see FIG. 9 of Embodiment 2 described later). An area 603 is an area in which a value (CAS) created based on the secret code received by the electronic voting data creation apparatus 100 is used as a parameter (par = CAS). For example, the electronic voting data creation device 100 accepts a secret code (see FIG. 9 of Embodiment 2 described later). The electronic voting data creation device 100 creates and embeds a public key and redundant information based on the secret code and the entire image code. Then, the electronic voting data creation device 100 embeds a unique code (MD5) in bit 4 of the B channel of the pixel 623 acquired by GetPos (* pos, 1024, CAS). The electronic vote counting device 300 regards the electronic voting data 521 having the same restored unique code (MD5) as one electronic voting data 521.

[実施形態2]
実施形態2は、電子投票システム10の実施例であって、実施形態1に加えて、電子投票データ作成装置100は、全体画像コードと受け付けた秘密コードとに基づいて公開鍵を作成し、固有コード(MD5)を作成して電子投票データ521に埋め込む。電子投票装置200は、パスワードを受け付け、投票内容及び確認コードをパスワードに基づいて電子投票データ521に埋め込み、パスワードを暗号化して電子投票データ521に埋め込む。電子開票装置300は、同じ固有コード(MD5)の電子投票データ521を一の電子投票データ521とみなす。そして、電子開票装置300は、開票条件を判断し、電子投票データ作成装置100と同様に、全体画像コードと受け付けた秘密コードとに基づいて作成した秘密鍵に基づいて、電子投票データ521に埋め込まれた暗号化されたパスワードを復号し、復号したパスワードに基づいて投票内容及び確認コードを取得し、公表する。各装置の詳細について、図8から図20に従って、説明する。
[Embodiment 2]
The second embodiment is an example of the electronic voting system 10. In addition to the first embodiment, the electronic voting data creation device 100 creates a public key based on the entire image code and the received secret code, and is unique. A code (MD5) is created and embedded in the electronic voting data 521. The electronic voting apparatus 200 accepts the password, embeds the voting content and the confirmation code in the electronic voting data 521 based on the password, encrypts the password, and embeds it in the electronic voting data 521. The electronic vote counting device 300 regards the electronic voting data 521 having the same unique code (MD5) as one electronic voting data 521. Then, the electronic balloting device 300 determines the vote-voting conditions, and is embedded in the electronic ballot data 521 based on the secret key created based on the entire image code and the accepted secret code, as in the electronic ballot data creation device 100. The decrypted encrypted password is decrypted, and the contents of the vote and the confirmation code are obtained based on the decrypted password and made public. Details of each device will be described with reference to FIGS.

図8は、本発明の一実施形態に係る電子投票システム10の実施形態2の特徴を示す特徴図である。実施形態2の電子投票システム10は、実施形態1に加えて、秘密コードと、パスワードとを受け付け、固有コード(MD5)を作成する。特徴図に従って、電子投票システム10の概要を各装置ごとに説明する。   FIG. 8 is a feature diagram showing features of the second embodiment of the electronic voting system 10 according to one embodiment of the present invention. In addition to the first embodiment, the electronic voting system 10 according to the second embodiment accepts a secret code and a password, and creates a unique code (MD5). The outline of the electronic voting system 10 will be described for each device according to the feature diagram.

電子投票データ作成装置100は、実施形態1に加えて、投票管理委員会によって入力された秘密コードを受け付ける。そして、電子投票データ作成装置100は、全体画像データ501の一部を変更し、受け付けた秘密コードと、全体画像コードとに基づいて算出した暗号秘密コードに基づいて鍵ペア(公開鍵と秘密鍵)を作成する。そして、電子投票データ作成装置100は、分割画像データ511内に設定された領域を構成する画素に基づいて、公開鍵を埋め込む位置を算出し、公開鍵を埋め込む。さらに、電子投票データ作成装置100は、電子投票データ521に基づいて固有コード(MD5)を作成し、電子投票データ521に埋め込む。   In addition to the first embodiment, the electronic voting data creation device 100 accepts a secret code input by the voting management committee. Then, the electronic voting data creation device 100 changes a part of the entire image data 501 and creates a key pair (public key and secret key based on the encrypted secret code calculated based on the received secret code and the entire image code. ). Then, the electronic voting data creation device 100 calculates the position where the public key is embedded based on the pixels constituting the area set in the divided image data 511, and embeds the public key. Further, the electronic voting data creation device 100 creates a unique code (MD5) based on the electronic voting data 521 and embeds it in the electronic voting data 521.

電子投票装置200は、実施形態1に加えて、パスワードを受け付ける。そして、電子投票装置200は、受け付けたパスワードに基づいて作成した値(Ci)をパラメータ(par=Ci)とする電子投票データ521内の領域を設定し、設定した領域を構成する画素に基づいて算出した位置の画素に、受け付けた投票内容及び確認コードを埋め込む。そして、電子投票装置200は、受け付けたパスワードを、復元した公開鍵に基づいて暗号化し、電子投票データ521に埋め込む。   The electronic voting apparatus 200 accepts a password in addition to the first embodiment. Then, the electronic voting apparatus 200 sets an area in the electronic voting data 521 using the value (Ci) created based on the accepted password as a parameter (par = Ci), and based on the pixels constituting the set area. The received voting content and confirmation code are embedded in the pixel at the calculated position. The electronic voting apparatus 200 encrypts the received password based on the restored public key and embeds it in the electronic voting data 521.

電子開票装置300は、実施形態1に加えて、収集した電子投票データ521において、同一の固有コード(MD5)が存在するか否かを判断し、同一の固有コード(MD5)を有する電子投票データ521を一の電子投票データ521とみなす。さらに、電子開票装置300は、秘密コードを受け付け、受け付けた秘密コードと、収集した電子投票データ521に基づいて作成した全体画像コードとに基づいて鍵ペア(公開鍵と秘密鍵)のうち秘密鍵を作成する。そして、電子開票装置300は、復元したパスワードを秘密鍵に基づいて復号し、復号したパスワードに基づいて作成した値(Ci)をパラメータ(par=Ci)とする電子投票データ521内の領域を設定し、設定した領域を構成する画素に基づいて復元した投票内容及び確認コードを集計し、公表する。   In addition to the first embodiment, the electronic vote counting device 300 determines whether or not the same unique code (MD5) exists in the collected electronic voting data 521, and the electronic voting data having the same unique code (MD5) 521 is regarded as one electronic voting data 521. Further, the electronic vote counting device 300 receives the secret code, and the secret key of the key pair (public key and secret key) based on the received secret code and the entire image code created based on the collected electronic voting data 521. Create Then, the electronic vote counting device 300 decrypts the restored password based on the secret key, and sets an area in the electronic voting data 521 using the value (Ci) created based on the decrypted password as a parameter (par = Ci). Then, the contents of the vote and the confirmation code restored based on the pixels constituting the set area are tabulated and announced.

図9は、本発明の一実施形態に係る電子投票データ作成装置100の機能を示す機能ブロック図である。電子投票データ作成装置100は、秘密コード受付部101と、全体画像データ変更部102と、全体画像コード算出部103と、暗号秘密コード算出部104と、暗号鍵作成部105と、分割数設定部106と、全体画像分割部107と、作成領域設定部108と、公開鍵位置算出部109と、固有コード作成部110と、固有コード位置算出部111と、冗長情報書込部112と、電子投票データ作成部113と、電子投票データ出力部114と、作成パラメータ記憶部131とを備えている。このような電子投票データ作成装置100について各部ごとに説明する。   FIG. 9 is a functional block diagram showing functions of the electronic voting data creation apparatus 100 according to an embodiment of the present invention. The electronic voting data creation device 100 includes a secret code reception unit 101, an entire image data change unit 102, an entire image code calculation unit 103, an encryption secret code calculation unit 104, an encryption key generation unit 105, and a division number setting unit. 106, the entire image division unit 107, the creation area setting unit 108, the public key position calculation unit 109, the unique code creation unit 110, the unique code position calculation unit 111, the redundant information writing unit 112, and electronic voting A data creation unit 113, an electronic voting data output unit 114, and a creation parameter storage unit 131 are provided. Such an electronic voting data creation apparatus 100 will be described for each unit.

作成パラメータ記憶部131は、電子投票データ521内に設定する領域についての所定のパラメータを記憶している。例えば、作成パラメータ記憶部131は、図6における、開始点の値(a、b)と、領域の幅Aと、領域の高さBとを記憶している。   The creation parameter storage unit 131 stores predetermined parameters for an area set in the electronic voting data 521. For example, the creation parameter storage unit 131 stores the start point values (a, b), the region width A, and the region height B in FIG.

秘密コード受付部101は、秘密コード(CAS)の入力を受け付ける。秘密コードは、例えば、16桁からなるコードであって、選挙管理委員会によって秘密に管理されている。   The secret code receiving unit 101 receives an input of a secret code (CAS). The secret code is a 16-digit code, for example, and is secretly managed by the election management committee.

全体画像データ変更部102は、全体画像データ501の一部を、乱数に基づいて変更する。全体画像データ変更部102は、例えば、全体画像データ501を構成する画素であって、各分割画像データ511に少なくとも1個入るように乱数に基づいて算出した画素について、その画素の算出用チャネルのビット0を反転する。   The entire image data changing unit 102 changes a part of the entire image data 501 based on a random number. For example, the entire image data changing unit 102 is a pixel constituting the entire image data 501, and for pixels calculated based on random numbers so as to be included in each divided image data 511, the calculation channel of the pixel is changed. Invert bit 0.

全体画像コード算出部103は、全体画像データ501に基づいて全体画像コード(CAI)を算出する。全体画像コードは、例えば、全体画像データ501を構成する3原色のうちの算出用チャネルの各階調値を、加算やビット演算等することによって算出される。   The entire image code calculation unit 103 calculates an entire image code (CAI) based on the entire image data 501. The entire image code is calculated by, for example, adding or bit-calculating each gradation value of the calculation channel among the three primary colors constituting the entire image data 501.

暗号秘密コード算出部104は、秘密コード受付部101によって受け付けられた秘密コード(CAS)と、全体画像コード算出部103によって算出された全体画像コード(CAI)とに基づいて暗号秘密コード(CA)を算出する。暗号秘密コードは、秘密コードと全体画像コードとを、例えば、加算やビット演算等することによって算出される。   The encryption secret code calculation unit 104 is based on the secret code (CAS) received by the secret code reception unit 101 and the entire image code (CAI) calculated by the entire image code calculation unit 103. Is calculated. The encryption secret code is calculated by adding the secret code and the entire image code, for example, by bit operation.

暗号鍵作成部105は、暗号秘密コード算出部104によって算出された暗号秘密コードに基づいて公開鍵(N、e)と、公開鍵(N、e)に対応する秘密鍵(d)とを作成する。   The encryption key creation unit 105 creates a public key (N, e) and a secret key (d) corresponding to the public key (N, e) based on the encryption secret code calculated by the encryption secret code calculation unit 104. To do.

分割数設定部106は、全体画像データ501を分割する数を設定する。分割する数は、例えば、全体画像データ501を等分割することができる整数である。設定は、分割する数を、縦の分割数と横の分割数とによって入力されてもよい。   The division number setting unit 106 sets the number by which the entire image data 501 is divided. The number to be divided is, for example, an integer that can equally divide the entire image data 501. In the setting, the number of divisions may be input by the number of vertical divisions and the number of horizontal divisions.

全体画像分割部107は、分割数設定部106によって設定された数に基づいて全体画像データ501を分割する。例えば、設定された数が3×4の場合、全体画像分割部107は、縦を3分割し、横を4分割する。   The entire image dividing unit 107 divides the entire image data 501 based on the number set by the dividing number setting unit 106. For example, when the set number is 3 × 4, the entire image dividing unit 107 divides the vertical part into three parts and the horizontal part into four parts.

作成領域設定部108は、所定のパラメータに基づいて、全体画像分割部107によって分割された各分割画像データ511内に領域を設定する。例えば、設定する領域の開始位置への所定のパラメータがpar=0である場合、作成領域設定部108は、作成パラメータ記憶部131に記憶された値と、parとに基づいて、図7(3)の領域601を設定する。   The creation area setting unit 108 sets an area in each divided image data 511 divided by the whole image dividing unit 107 based on predetermined parameters. For example, when the predetermined parameter to the start position of the area to be set is par = 0, the creation area setting unit 108 uses the values stored in the creation parameter storage unit 131 and par as shown in FIG. ) Area 601 is set.

公開鍵位置算出部109は、作成領域設定部108によって設定された領域を構成する画素に基づいて、公開鍵を埋め込む公開鍵位置を算出する。すなわち、公開鍵位置算出部109は、上述のように領域601を構成する画素の階調値に基づいて、擬似乱数を生成し、生成した擬似乱数に基づいて複数の画素の位置を算出する。   The public key position calculation unit 109 calculates the public key position in which the public key is embedded based on the pixels constituting the area set by the creation area setting unit 108. That is, the public key position calculation unit 109 generates a pseudo random number based on the gradation values of the pixels constituting the region 601 as described above, and calculates the positions of a plurality of pixels based on the generated pseudo random number.

固有コード作成部110は、電子投票データ521に基づいて固有コード(MD5)を作成する。固有コード作成部110は、例えば、電子投票データ521を構成する画素の算出用チャネルの階調値を、加算やビット演算等し、電子投票データ521ごとに固有の固有コード(MD5)を作成する。   The unique code creation unit 110 creates a unique code (MD5) based on the electronic voting data 521. The unique code creation unit 110 creates a unique unique code (MD5) for each electronic voting data 521 by, for example, adding the gradation values of the calculation channels of the pixels constituting the electronic voting data 521 and performing bit operations. .

固有コード位置算出部111は、作成領域設定部108によって設定された領域を構成する画素に基づいて固有コード(MD5)を埋め込む固有コード位置を算出する。例えば、固有コード位置算出部111は、秘密コード受付部101によって受け付けられた秘密コード(CAS)に基づいて電子投票データ521内に設定された領域(例えば、図7(3)の領域603)を構成する画素に基づいて、固有コード(MD5)を埋め込む固有コード位置を算出する。そして、電子投票データ作成部113は、固有コード位置算出部111によって算出された固有コード位置に、固有コード(MD5)を埋め込む。   The unique code position calculation unit 111 calculates a unique code position in which the unique code (MD5) is embedded based on the pixels constituting the area set by the creation area setting unit 108. For example, the unique code position calculation unit 111 sets an area (for example, the area 603 in FIG. 7 (3)) set in the electronic voting data 521 based on the secret code (CAS) received by the secret code receiving unit 101. Based on the constituent pixels, a unique code position in which the unique code (MD5) is embedded is calculated. Then, the electronic voting data creation unit 113 embeds the unique code (MD5) in the unique code position calculated by the unique code position calculation unit 111.

冗長情報書込部112は、算出された複数の画素の各格納用チャネルの所定のビットに、全体画像コードの冗長情報をビットに分解して埋め込む。   The redundant information writing unit 112 divides the redundant information of the entire image code into bits and embeds them in predetermined bits of each storage channel of the calculated plurality of pixels.

電子投票データ作成部113は、公開鍵位置算出部109によって算出された公開鍵位置に、暗号鍵作成部105によって作成された公開鍵(N、e)を埋め込むことによって複数の電子投票データ521を固有に作成する。すなわち、電子投票データ作成部113は、上述のように、算出された複数の画素の各格納用チャネルの所定のビットに、公開鍵の値をビットに分解して埋め込む。   The electronic voting data creation unit 113 embeds a plurality of electronic voting data 521 by embedding the public key (N, e) created by the encryption key creation unit 105 in the public key position calculated by the public key position calculation unit 109. Create your own. That is, as described above, the electronic voting data creation unit 113 divides the value of the public key into bits and embeds them in the predetermined bits of the calculated storage channels of the plurality of pixels.

電子投票データ出力部114は、電子投票データ作成部113によって作成された電子投票データ521を電子投票装置200に出力する。例えば、電子投票データ出力部114は、コンピュータネットワークを介して電子投票データ521を電子投票装置200に出力する。そして、電子投票データ出力部114は、電子投票データ521の投票状態を投票済み状態にする。   The electronic voting data output unit 114 outputs the electronic voting data 521 created by the electronic voting data creation unit 113 to the electronic voting apparatus 200. For example, the electronic voting data output unit 114 outputs the electronic voting data 521 to the electronic voting apparatus 200 via a computer network. Then, the electronic voting data output unit 114 sets the voting state of the electronic voting data 521 to the voted state.

図10は、本発明の一実施形態に係る電子投票装置200の機能を示す機能ブロック図である。電子投票装置200は、投票入力部201と、投票領域設定部202と、投票公開鍵位置算出部203と、公開鍵取得部204と、投票受付部205と、パスワード受付部206と、投票内容領域設定部207と、投票内容位置算出部208と、パスワード暗号化部209と、パスワード位置算出部210と、投票書込部211と、再投票受付部212と、投票出力部213と、投票パラメータ記憶部231とを備えている。このような電子投票装置200について各部ごとに説明する。   FIG. 10 is a functional block diagram showing functions of the electronic voting apparatus 200 according to an embodiment of the present invention. The electronic voting apparatus 200 includes a voting input unit 201, a voting area setting unit 202, a voting public key position calculating unit 203, a public key acquiring unit 204, a voting receiving unit 205, a password receiving unit 206, and a voting content area. Setting unit 207, vote content position calculation unit 208, password encryption unit 209, password position calculation unit 210, vote writing unit 211, re-voting reception unit 212, vote output unit 213, and vote parameter storage Part 231. Such an electronic voting apparatus 200 will be described for each unit.

投票入力部201は、電子投票データ521を入力する。投票入力部201は、例えば、コンピュータネットワークを介して電子投票データ作成装置100から電子投票データ521を入力する。   The voting input unit 201 inputs electronic voting data 521. The voting input unit 201 inputs the electronic voting data 521 from the electronic voting data creation device 100 via, for example, a computer network.

投票パラメータ記憶部231は、所定のパラメータを記憶する。所定のパラメータは、電子投票データ作成装置100によって電子投票データ521内に公開鍵を埋め込むために設定された領域のパラメータ(作成パラメータ記憶部131の値)と同じである。   The voting parameter storage unit 231 stores predetermined parameters. The predetermined parameter is the same as the parameter (value in the creation parameter storage unit 131) of the area set for embedding the public key in the electronic voting data 521 by the electronic voting data creation device 100.

投票領域設定部202は、投票パラメータ記憶部231に記憶された所定のパラメータに基づいて、投票入力部201によって入力された電子投票データ521を構成する画像データ内に領域を設定する。例えば、設定する領域の開始位置への所定のパラメータがpar=0である場合、投票領域設定部202は、電子投票データ作成装置100と同様に、図7(3)の領域601を設定する。   The voting area setting unit 202 sets an area in the image data constituting the electronic voting data 521 input by the voting input unit 201 based on predetermined parameters stored in the voting parameter storage unit 231. For example, when the predetermined parameter for the start position of the area to be set is par = 0, the voting area setting unit 202 sets the area 601 in FIG.

投票公開鍵位置算出部203は、投票領域設定部202によって設定された領域を構成する画素に基づいて公開鍵位置を算出する。すなわち、投票公開鍵位置算出部203は、電子投票データ作成装置100と同様に、公開鍵位置を算出する。   The voting public key position calculation unit 203 calculates the public key position based on the pixels constituting the area set by the voting area setting unit 202. That is, the voting public key position calculation unit 203 calculates the public key position in the same manner as the electronic voting data creation device 100.

公開鍵取得部204は、投票公開鍵位置算出部203によって算出された公開鍵位置から、電子投票データ作成装置100によって埋め込まれた公開鍵を取得する。   The public key acquisition unit 204 acquires the public key embedded by the electronic voting data creation device 100 from the public key position calculated by the vote public key position calculation unit 203.

投票受付部205は、投票内容と、確認コードとの入力を受け付ける。   The voting accepting unit 205 accepts input of voting contents and a confirmation code.

パスワード受付部206は、パスワードの入力を受け付ける。   The password receiving unit 206 receives a password input.

投票内容領域設定部207は、パスワード受付部206によって受け付けられたパスワードに基づいて、電子投票データ521を構成する画像データ内に領域を設定する。例えば、投票内容領域設定部207は、パスワードに基づいて、設定する領域の開始位置への所定のパラメータ(Ci)を算出し、算出したパラメータによって、図7(3)の領域602を設定する。   The voting content area setting unit 207 sets an area in the image data constituting the electronic voting data 521 based on the password received by the password receiving unit 206. For example, the voting content area setting unit 207 calculates a predetermined parameter (Ci) for the start position of the area to be set based on the password, and sets the area 602 in FIG. 7 (3) based on the calculated parameter.

投票内容位置算出部208は、投票内容領域設定部207によって設定された領域を構成する画素に基づいて投票内容及び確認コードを埋め込む投票内容位置を算出する。   The voting content position calculation unit 208 calculates the voting content position in which the voting content and the confirmation code are embedded based on the pixels constituting the area set by the voting content area setting unit 207.

パスワード暗号化部209は、公開鍵取得部204によって取得された公開鍵に基づいて、パスワード受付部206によって受け付けられたパスワードを暗号化する。   The password encryption unit 209 encrypts the password received by the password reception unit 206 based on the public key acquired by the public key acquisition unit 204.

パスワード位置算出部210は、電子投票データ521を構成する画素に基づいて、パスワード暗号化部209により暗号化されたパスワードを埋め込むパスワード位置を算出する。   The password position calculation unit 210 calculates a password position in which the password encrypted by the password encryption unit 209 is embedded based on the pixels constituting the electronic voting data 521.

投票書込部211は、パスワード位置算出部210によって算出されたパスワード位置に、パスワード暗号化部209によって暗号化されたパスワードを埋め込むと共に、投票内容位置算出部208によって算出された投票内容位置に、投票受付部205によって受け付けられた投票内容及び確認コードを埋め込む。   The voting writing unit 211 embeds the password encrypted by the password encryption unit 209 in the password position calculated by the password position calculation unit 210, and at the voting content position calculated by the voting content position calculation unit 208, The contents of the vote and the confirmation code received by the vote receiving unit 205 are embedded.

再投票受付部212は、再度の投票を受け付ける。例えば、再投票受付部212は、再度の投票であることを受け付けると、電子投票データ521の投票状態を白票状態にする。そして、投票書込部211は、新たに受け付けられた投票内容及び確認コードを、パスワードに基づいて埋め込む。または、後述する電子投票媒体700を用いると、電子投票装置200は、電子投票データ作成装置100に電子投票データ521を要求し、要求した電子投票データ521を受信して電子投票データ521を作成する。   The re-voting accepting unit 212 accepts re-voting. For example, when receiving the vote again, the re-voting accepting unit 212 changes the voting state of the electronic voting data 521 to the white vote state. Then, the voting writing unit 211 embeds the newly accepted voting content and confirmation code based on the password. Alternatively, when an electronic voting medium 700 described later is used, the electronic voting device 200 requests the electronic voting data 521 from the electronic voting data creation device 100, receives the requested electronic voting data 521, and creates the electronic voting data 521. .

投票出力部213は、投票書込部211によって埋め込まれた電子投票データ521を電子開票装置300に出力する。例えば、投票出力部213は、コンピュータネットワークを介して電子投票データ521を電子開票装置300に出力する。   The vote output unit 213 outputs the electronic vote data 521 embedded by the vote writing unit 211 to the electronic vote counting device 300. For example, the voting output unit 213 outputs the electronic voting data 521 to the electronic vote counting device 300 via the computer network.

図11は、本発明の一実施形態に係る電子開票装置300の機能を示す機能ブロック図である。電子開票装置300は、開票入力部301と、開票判断部302と、開票秘密コード受付部303と、開票固有コード位置算出部304と、固有コード取得部305と、電子投票データ検索部306と、電子投票データ決定部307と、開票全体画像コード算出部308と、開票暗号秘密コード算出部309と、秘密鍵作成部310と、開票領域設定部311と、開票パスワード位置算出部312と、暗号パスワード取得部313と、暗号パスワード復号部314と、開票投票内容領域設定部315と、開票投票位置算出部316と、投票データ取得部317と、開票公表部318と、開票パラメータ記憶部331と、電子投票データ記憶部332とを備えている。このような電子開票装置300について各部ごとに説明する。   FIG. 11 is a functional block diagram showing functions of the electronic ticketing device 300 according to an embodiment of the present invention. The electronic balloting device 300 includes a ballot input unit 301, a ballot determination unit 302, a ballot secret code reception unit 303, a ballot unique code position calculation unit 304, a unique code acquisition unit 305, an electronic ballot data search unit 306, Electronic voting data determination unit 307, voted whole image code calculating unit 308, voted cipher secret code calculating unit 309, secret key creating unit 310, voted area setting unit 311, voted password position calculating unit 312, and encryption password An acquisition unit 313, an encryption password decryption unit 314, a vote vote content area setting unit 315, a vote vote position calculation unit 316, a vote data acquisition unit 317, a vote announcement unit 318, a vote parameter storage unit 331, an electronic A voting data storage unit 332; Such an electronic ticketing apparatus 300 will be described for each unit.

開票入力部301は、電子投票装置200から電子投票データ521を入力する。開票入力部301は、例えば、コンピュータネットワークを介して電子投票装置200から電子投票データ521を入力し、入力時の時刻を対応付ける。   The vote counting input unit 301 inputs electronic voting data 521 from the electronic voting apparatus 200. For example, the vote counting input unit 301 inputs the electronic voting data 521 from the electronic voting apparatus 200 via the computer network, and associates the time at the time of input.

電子投票データ記憶部332は、開票入力部301によって入力された電子投票データ521を記憶する。   The electronic voting data storage unit 332 stores the electronic voting data 521 input by the vote counting input unit 301.

開票判断部302は、電子投票データ521を開票するための開票条件を満たすか否かを判断する。開票条件は、例えば、電子投票データ521を開票するために定められた開票日時等である。   The vote counting unit 302 determines whether or not the vote counting condition for counting the electronic voting data 521 is satisfied. The voting condition is, for example, the voting date and time determined for voting the electronic voting data 521.

開票秘密コード受付部303は、開票判断部302が開票条件を満たすと判断した場合に、秘密コード(CAS)の入力を受け付ける。この秘密コード(CAS)は、電子投票データ作成装置100が受け付けた秘密コード(CAS)と同一のコードでなければならない。   The vote-voting secret code receiving unit 303 receives an input of a secret code (CAS) when the vote-determining determination unit 302 determines that the vote-voting condition is satisfied. This secret code (CAS) must be the same code as the secret code (CAS) received by the electronic voting data creation device 100.

開票固有コード位置算出部304は、電子投票データ521を構成する画素に基づいて固有コード(MD5)を埋め込む固有コード位置を算出する。例えば、開票固有コード位置算出部304は、開票秘密コード受付部303によって受け付けられた秘密コード(CAS)に基づいて電子投票データ521内に設定された領域(例えば、図7(3)の領域603)を構成する画素に基づいて、固有コード位置を算出する。   The vote-voting unique code position calculation unit 304 calculates a unique code position in which the unique code (MD5) is embedded based on the pixels constituting the electronic voting data 521. For example, the vote-voting unique code position calculation unit 304 sets the area set in the electronic voting data 521 based on the secret code (CAS) received by the vote-voting secret code receiving unit 303 (for example, the area 603 in FIG. 7 (3)). ) To calculate the unique code position.

固有コード取得部305は、開票固有コード位置算出部304によって算出された固有コード位置から、電子投票データ作成装置100によって埋め込まれた固有コード(MD5)を取得する。すなわち、固有コード取得部305は、上述のデータを復元する方法によって、固有コード(MD5)を復元する。   The unique code acquisition unit 305 acquires the unique code (MD5) embedded by the electronic voting data creation device 100 from the unique code position calculated by the vote-voting unique code position calculation unit 304. That is, the unique code acquisition unit 305 restores the unique code (MD5) by the above-described method for restoring data.

電子投票データ検索部306は、固有コード取得部305によって取得された固有コード(MD5)に基づいて、電子投票データ記憶部332に記憶された電子投票データ521を検索する。   The electronic voting data search unit 306 searches the electronic voting data 521 stored in the electronic voting data storage unit 332 based on the unique code (MD5) acquired by the unique code acquisition unit 305.

電子投票データ決定部307は、電子投票データ検索部306によって固有コード(MD5)と同一の電子投票データ521が検索された場合には、検索された電子投票データ521の内から一の電子投票データ521を決定して電子投票データ記憶部332に記憶する。例えば、電子投票データ決定部307は、電子投票データ検索部306が検索した固有コード(MD5)が同一の複数の電子投票データ521において、開票入力部301が電子投票データ521に対応付けた時刻を比較し、最新の時刻に対応付けられた電子投票データ521を、入力した電子投票データ521として電子投票データ記憶部332に記憶する。なお、電子投票データ決定部307は、固有コード(MD5)が同一の複数の電子投票データ521において、最初に記憶した電子投票データ521のみを記憶するとしてもよい。   When the electronic voting data search unit 306 searches for electronic voting data 521 that is identical to the unique code (MD5), the electronic voting data determination unit 307 selects one electronic voting data from the searched electronic voting data 521. 521 is determined and stored in the electronic voting data storage unit 332. For example, the electronic voting data determination unit 307 determines the time at which the vote-voting input unit 301 associates the electronic voting data 521 with a plurality of electronic voting data 521 having the same unique code (MD5) searched by the electronic voting data search unit 306. The electronic voting data 521 associated with the latest time is stored in the electronic voting data storage unit 332 as the input electronic voting data 521. Note that the electronic voting data determination unit 307 may store only the electronic voting data 521 stored first among the plurality of electronic voting data 521 having the same unique code (MD5).

開票全体画像コード算出部308は、電子投票データ記憶部332によって記憶された電子投票データ521に基づいて、投票後の画像コード(投票後CAI)を算出する。例えば、投票率が100パーセントであることが条件である場合には、投票後の画像コードは、収集した全ての電子投票データ521を構成する画素に基づいて、電子投票データ作成装置100と同様に作成される。例えば、投票率が一定の割合以上であることが条件である場合には、投票後の画像コード(投票後CAI)は、収集した電子投票データ521に電子投票データ作成装置100によって埋め込まれた冗長情報に基づいて、作成される。例えば、電子投票データ521が1件であっても開票できることが条件である場合には、投票後の画像コード(投票後CAI)は、収集した電子投票データ521に電子投票データ作成装置100によって埋め込まれた冗長情報(全体画像コードと同一)に基づいて、作成される。   The vote-voting overall image code calculation unit 308 calculates an image code after voting (post-voting CAI) based on the electronic voting data 521 stored in the electronic voting data storage unit 332. For example, when the condition is that the voting rate is 100%, the image code after voting is based on the pixels constituting all the collected electronic voting data 521, as in the electronic voting data creation device 100. Created. For example, when it is a condition that the voting rate is a certain ratio or more, the image code after voting (post-voting CAI) is a redundancy embedded in the collected electronic voting data 521 by the electronic voting data creation device 100. Created based on information. For example, if it is a condition that even if there is only one electronic voting data 521, the voted image code (post-voting CAI) is embedded in the collected electronic voting data 521 by the electronic voting data creation device 100. It is created based on the redundant information (same as the whole image code).

開票暗号秘密コード算出部309は、開票秘密コード受付部303によって受け付けられた秘密コード(CAS)と、開票全体画像コード算出部308によって算出された投票後の画像コード(投票後CAI)と、に基づいて投票後の暗号秘密コード(投票後CA)を算出する。   The vote-voting encryption secret code calculation unit 309 includes a secret code (CAS) received by the vote-voting secret code reception unit 303 and an image code after voting (post-voting CAI) calculated by the vote-voting overall image code calculation unit 308. Based on this, a cryptographic secret code after voting (CA after voting) is calculated.

秘密鍵作成部310は、開票暗号秘密コード算出部309によって算出された投票後の暗号秘密コード(投票後CA)に基づいて、秘密鍵を作成する。   The secret key creation unit 310 creates a secret key based on the voted cipher secret code (post-voting CA) calculated by the voted cipher secret code calculation unit 309.

開票パラメータ記憶部331は、所定のパラメータを記憶する。所定のパラメータは、電子投票データ作成装置100によって電子投票データ521内に公開鍵を埋め込むために設定された領域のパラメータ(作成パラメータ記憶部131の値)と同じである。   The vote counting parameter storage unit 331 stores predetermined parameters. The predetermined parameter is the same as the parameter (value in the creation parameter storage unit 131) of the area set for embedding the public key in the electronic voting data 521 by the electronic voting data creation device 100.

開票領域設定部311は、開票パラメータ記憶部331に記憶された所定のパラメータに基づいて、開票入力部301によって入力された電子投票データ521を構成する画像データ内に領域を設定する。例えば、設定する領域の開始位置への所定のパラメータがpar=0である場合、開票領域設定部311は、電子投票データ作成装置100と同様に、図7(3)の領域601を設定する。   The vote-voting area setting unit 311 sets an area in the image data constituting the electronic voting data 521 input by the vote-voting input unit 301 based on predetermined parameters stored in the vote-voting parameter storage unit 331. For example, when the predetermined parameter for the start position of the area to be set is par = 0, the vote-voting area setting unit 311 sets the area 601 in FIG.

開票パスワード位置算出部312は、開票領域設定部311によって設定された領域を構成する画素に基づいてパスワード位置を算出する。   The vote-voting password position calculation unit 312 calculates the password position based on the pixels constituting the area set by the vote-voting area setting unit 311.

暗号パスワード取得部313は、開票パスワード位置算出部312によって算出されたパスワード位置から、電子投票装置200によって埋め込まれた暗号化されたパスワードを取得する。   The encryption password acquisition unit 313 acquires the encrypted password embedded by the electronic voting apparatus 200 from the password position calculated by the voted password position calculation unit 312.

暗号パスワード復号部314は、秘密鍵作成部310によって作成された秘密鍵に基づいて、暗号パスワード取得部313によって取得された暗号化されたパスワードを復号する。   The encryption password decryption unit 314 decrypts the encrypted password acquired by the encryption password acquisition unit 313 based on the secret key created by the secret key creation unit 310.

開票投票内容領域設定部315は、暗号パスワード復号部314部によって復号されたパスワードに基づいて、電子投票データ521を構成する画像データ内の領域を設定する。例えば、設定する領域の開始位置への所定のパラメータがpar=Ci(パスワードに基づいて算出した電子投票データ521内の位置)である場合、開票投票内容領域設定部315は、図7(3)の領域602を設定する。   The vote vote content area setting unit 315 sets an area in the image data constituting the electronic voting data 521 based on the password decrypted by the encryption password decryption unit 314. For example, when the predetermined parameter for the start position of the area to be set is par = Ci (position in the electronic voting data 521 calculated based on the password), the vote-voting content setting section 315 displays (3) in FIG. This area 602 is set.

開票投票位置算出部316は、開票投票内容領域設定部315によって設定された領域を構成する画素に基づいて、投票内容位置を算出する。   The vote-voting position calculation unit 316 calculates the vote content position based on the pixels constituting the area set by the vote-voting content area setting unit 315.

投票データ取得部317は、開票投票位置算出部316によって算出された投票内容位置から、電子投票装置200によって埋め込まれた投票内容及び確認コードを取得する。すなわち、投票データ取得部317は、上述のデータを復元する方法によって、投票内容及び確認コードを復元する。   The voting data acquisition unit 317 acquires the voting content and the confirmation code embedded by the electronic voting device 200 from the voting content position calculated by the vote-voting voting position calculation unit 316. In other words, the voting data acquisition unit 317 restores the voting contents and the confirmation code by the method for restoring the above-described data.

開票公表部318は、投票データ取得部317によって取得された投票内容及び確認コードを集計し、公表する。   The vote counting publication unit 318 aggregates and publishes the voting contents and confirmation codes acquired by the voting data acquisition unit 317.

図12は、本発明の一実施形態に係る電子投票データ作成装置100の処理内容を示すフローチャートである。   FIG. 12 is a flowchart showing the processing contents of the electronic voting data creation apparatus 100 according to an embodiment of the present invention.

ステップS101において、電子投票データ作成装置100のCPU(以下、作成CPUという)は、秘密コード(CAS)の入力を受け付ける。より具体的には、作成CPUは、入力端末150(図9参照)から秘密コード(CAS)を受け付ける。そして、作成CPUは、全体画像データ501の一部を、乱数に基づいて変更する(例えば、秘密コード(CAS)の値に基づいて作成した位置の算出用チャネルのビット0を反転する)。その後、作成CPUは、処理をステップS102に移す。   In step S101, the CPU of the electronic voting data creation apparatus 100 (hereinafter referred to as creation CPU) receives an input of a secret code (CAS). More specifically, the creation CPU receives a secret code (CAS) from the input terminal 150 (see FIG. 9). Then, the creation CPU changes a part of the entire image data 501 based on a random number (for example, inverts bit 0 of the position calculation channel created based on the value of the secret code (CAS)). Thereafter, the creation CPU moves the process to step S102.

ステップS102において、作成CPUは、全体画像データ501に基づいて全体画像コード(CAI)を算出する。より具体的には、作成CPUは、全体画像データ501を構成する3原色のうちの算出用チャネルの各階調値を、加算して全体画像コード(CAI)を算出する。その後、作成CPUは、処理をステップS103に移す。   In step S102, the creation CPU calculates a whole image code (CAI) based on the whole image data 501. More specifically, the creation CPU calculates the entire image code (CAI) by adding the gradation values of the calculation channels among the three primary colors constituting the entire image data 501. Thereafter, the creation CPU moves the process to step S103.

ステップS103において、作成CPUは、秘密コード(CAS)と全体画像コード(CAI)とに基づいて暗号秘密コード(CA)を算出する。より具体的には、作成CPUは、受け付けられた秘密コード(CAS)と、算出された全体画像コード(CAI)とを加算して暗号秘密コード(CA)を算出する。その後、作成CPUは、処理をステップS104に移す。   In step S103, the creation CPU calculates an encryption secret code (CA) based on the secret code (CAS) and the entire image code (CAI). More specifically, the creation CPU calculates the encryption secret code (CA) by adding the accepted secret code (CAS) and the calculated entire image code (CAI). Thereafter, the creation CPU moves the process to step S104.

ステップS104において、作成CPUは、暗号秘密コード(CA)に基づいて公開鍵及び秘密鍵を作成する。より具体的には、作成CPUは、正整数e(例えば、60001)を選択する。次に、暗号秘密コード(CA)に基づいて大きい素数の組(p、q)を求め、pとqとの積であるNを求める。そして、作成CPUは、得られた(e、N)を公開鍵とする。その後、作成CPUは、処理をステップS105に移す。   In step S104, the creation CPU creates a public key and a secret key based on the cryptographic secret code (CA). More specifically, the creation CPU selects a positive integer e (for example, 60001). Next, a large prime number pair (p, q) is obtained based on the cryptographic secret code (CA), and N, which is the product of p and q, is obtained. Then, the creation CPU uses the obtained (e, N) as a public key. Thereafter, the creation CPU moves the process to step S105.

ステップS105において、作成CPUは、全体画像データ501を分割する。より具体的には、作成CPUは、設定によって入力された値に従って、全体画像データ501の縦及び横を分割し、分割画像データ511を作成する。その後、作成CPUは、処理をステップS106に移す。   In step S105, the creation CPU divides the entire image data 501. More specifically, the creation CPU divides the whole image data 501 in the vertical and horizontal directions according to the values input by the settings, and creates divided image data 511. Thereafter, the creation CPU moves the process to step S106.

ステップS106において、作成CPUは、暗号化処理(後述する図13参照)によって、公開鍵を電子投票データ521に埋め込む。より具体的には、作成CPUは、作成パラメータ記憶部131に記憶したパラメータによって、GetPos処理(後述する図14参照)へのパラメータがpar=0である領域を設定し、設定された領域を構成する画素に基づいて、公開鍵を書き込む公開鍵位置を算出する。そして、作成CPUは、算出された複数の公開鍵位置の画素の各格納用チャネルのビット3に、公開鍵の値をビットに分解して埋め込む。ここで、設定された領域は、作成パラメータ記憶部131に記憶されたa、b、A及びBによって設定され、電子投票データ521全体の場合や、電子投票データ521内に設定された領域(例えば図7)の場合がある。その後、作成CPUは、処理をステップS107に移す。   In step S106, the creation CPU embeds the public key in the electronic voting data 521 by an encryption process (see FIG. 13 described later). More specifically, the creation CPU sets an area where the parameter to the GetPos process (see FIG. 14 described later) is par = 0 by the parameters stored in the creation parameter storage unit 131, and configures the set area. Based on the pixel to be calculated, a public key position to write the public key is calculated. Then, the creation CPU decomposes and embeds the value of the public key into bits in bit 3 of each storage channel of the calculated plurality of pixels at the public key position. Here, the set area is set by a, b, A, and B stored in the creation parameter storage unit 131. For the entire electronic voting data 521, an area set in the electronic voting data 521 (for example, There is a case of FIG. Thereafter, the creation CPU moves the process to step S107.

ステップS107において、作成CPUは、全体画像コードの冗長情報を作成し、電子投票データ521に埋め込む。より具体的には、ステップS106と同様に、作成CPUは、作成した全体画像コードの冗長情報をビットに分解して各格納用チャネルのビット5に埋め込む。その後、作成CPUは、処理をステップS108に移す。   In step S107, the creation CPU creates redundant information of the entire image code and embeds it in the electronic voting data 521. More specifically, as in step S106, the creation CPU breaks down the redundant information of the created overall image code into bits and embeds them in bit 5 of each storage channel. Thereafter, the creation CPU moves the process to step S108.

ステップS108において、作成CPUは、電子投票データ521の固有コード(MD5)を作成し、電子投票データ521に埋め込む。より具体的には、ステップS106と同様に、作成CPUは、作成した固有コード(MD5)をビットに分解して各格納用チャネルのビット4に埋め込む。その後、作成CPUは、処理をステップS109に移す。   In step S108, the creation CPU creates a unique code (MD5) of the electronic voting data 521 and embeds it in the electronic voting data 521. More specifically, as in step S106, the creation CPU decomposes the created unique code (MD5) into bits and embeds them in bit 4 of each storage channel. Thereafter, the creation CPU moves the process to step S109.

ステップS109において、作成CPUは、電子投票データ521を出力する。より具体的には、作成CPUは、コンピュータネットワークを介して電子投票データ521を電子投票装置200に出力する。そして、作成CPUは、電子投票データ521の投票状態を投票済み状態(算出された複数の画素の各格納用チャネルのビット6の例えば、2から2を1)にする。その後、作成CPUは、処理を終了する。 In step S109, the creation CPU outputs electronic voting data 521. More specifically, the creation CPU outputs electronic voting data 521 to the electronic voting apparatus 200 via a computer network. The creation the CPU (e.g. bit 6 of the storage channels of the plurality of pixels calculated, 2 0 2 9 1) voting already state vote status of the electronic voting data 521 to. Thereafter, the creation CPU ends the process.

図13は、本発明の一実施形態に係る暗号化処理の内容を示すフローチャートである。なお、暗号化処理は、電子投票データ作成装置100だけでなく、電子投票装置200、電子開票装置300及び電子投票媒体700(後述する図22参照)においても存在する。よって、本処理のCPUは、電子投票データ作成装置100のCPU、電子投票装置200のCPU、電子開票装置300のCPU又は電子投票媒体700のCPUに適宜読み替える。   FIG. 13 is a flowchart showing the contents of the encryption processing according to an embodiment of the present invention. The encryption process exists not only in the electronic voting data creation device 100 but also in the electronic voting device 200, the electronic voting device 300, and the electronic voting medium 700 (see FIG. 22 described later). Therefore, the CPU of this process is appropriately replaced with the CPU of the electronic voting data creation device 100, the CPU of the electronic voting device 200, the CPU of the electronic voting device 300, or the CPU of the electronic voting medium 700.

ステップS121において、CPUは、GetPos処理を実行する。その後、CPUは、処理をステップS122に移す。   In step S121, the CPU executes a GetPos process. Thereafter, the CPU moves the process to step S122.

ステップS122において、CPUは、格納位置にビットの重みを対応付ける。より具体的には、CPUは、GetPos処理が算出した格納位置に、算出した順にビットの重み(2、2、・・・、21023)を対応付ける。その後、CPUは、処理をステップS123に移す。 In step S122, the CPU associates the bit weight with the storage position. More specifically, the CPU associates bit weights (2 0 , 2 1 ,..., 2 1023 ) with the storage positions calculated by the GetPos process in the order of calculation. Thereafter, the CPU moves the process to step S123.

ステップS123において、CPUは、埋め込む値を構成するそれぞれのビットを、そのビットの重みと同じ重みに対応付けられた格納位置に、書き込む。より具体的には、CPUは、埋め込む値を構成するそれぞれのビットを、そのビットの重みと同じ重みに対応付けられた格納位置のうち格納用チャネルの所定のビットに、書き込む。その後、CPUは、処理を戻して本処理に移る処理の次の処理に移す。   In step S123, the CPU writes each bit constituting the value to be embedded in a storage location associated with the same weight as the bit weight. More specifically, the CPU writes each bit constituting the value to be embedded into a predetermined bit of the storage channel among the storage positions associated with the same weight as the weight of the bit. Thereafter, the CPU returns to the next process after the process that shifts to the main process.

図14は、本発明の一実施形態に係るGetPosの処理内容を示すフローチャートである。なお、GetPosの処理は、例えば、引数が(*pas、num、par)であり、電子投票データ作成装置100だけでなく、電子投票装置200、電子開票装置300及び電子投票媒体700(後述する図22参照)においても存在する。よって、本処理のCPUは、電子投票データ作成装置100のCPU、電子投票装置200のCPU、電子開票装置300のCPU又は電子投票媒体700のCPUに適宜読み替える。   FIG. 14 is a flowchart showing the processing content of GetPos according to an embodiment of the present invention. In the GetPos process, for example, the argument is (* pas, num, par), and not only the electronic voting data creation device 100 but also the electronic voting device 200, the electronic voting device 300, and the electronic voting medium 700 (the figure will be described later). 22). Therefore, the CPU of this process is appropriately replaced with the CPU of the electronic voting data creation device 100, the CPU of the electronic voting device 200, the CPU of the electronic voting device 300, or the CPU of the electronic voting medium 700.

ステップS131において、CPUは、格納位置を算出するための領域をparに基づいて設定する。例えば、CPUは、引数の値parに基づいて、開始点及び終了点のXY座標が(a+par、b+par)、(a+par+A、b+par+B)とする領域(横A、縦B)を設定する。ここで、a及びbは開始点の初期座標値、AはX方向の幅、BはY方向の高さである。a、b、A及びBは、所定の方法によって変更可能な値である。その後、CPUは、処理をステップS132に移す。   In step S131, the CPU sets an area for calculating the storage position based on par. For example, the CPU sets areas (horizontal A, vertical B) in which the XY coordinates of the start point and end point are (a + par, b + par), (a + par + A, b + par + B) based on the argument value par. Here, a and b are initial coordinate values of the start point, A is the width in the X direction, and B is the height in the Y direction. a, b, A, and B are values that can be changed by a predetermined method. Thereafter, the CPU moves the process to step S132.

ステップS132において、CPUは、設定した領域を構成する画素値のうちR及びGチャネルの階調値に基づいて、引数の値num個の擬似乱数を算出する。その後、CPUは、処理をステップS133に移す。   In step S132, the CPU calculates num pseudo-random numbers of argument values based on the R and G channel gradation values among the pixel values constituting the set area. Thereafter, the CPU moves the process to step S133.

ステップS133において、CPUは、算出した擬似乱数に基づいて格納位置を算出する。例えば、CPUは、格納位置x=擬似乱数mod(w−2)、格納位置y=擬似乱数mod(h−1)によって格納位置を算出する。その後、CPUは、処理をステップS134に移す。   In step S133, the CPU calculates a storage position based on the calculated pseudorandom number. For example, the CPU calculates the storage position by the storage position x = pseudo random number mod (w−2) and the storage position y = pseudo random number mod (h−1). Thereafter, the CPU moves the process to step S134.

ステップS134において、CPUは、格納位置のハッシュ変換を行う。例えば、CPUは、算出した格納位置が重複していると判断した場合に、新格納位置x=(格納位置x+23)mod(w)、新格納位置y=(格納位置y+11)mod(h)によってハッシュ変換を行い、重複している格納位置を重複しない格納位置に変換する。そして、CPUは、算出したnum個の格納位置へのポインタ(*pos)を作成し、処理を戻して本処理に移る処理の次の処理に移す。   In step S134, the CPU performs hash conversion of the storage position. For example, when the CPU determines that the calculated storage positions are duplicated, the new storage position x = (storage position x + 23) mod (w) and the new storage position y = (storage position y + 11) mod (h) Hash conversion is performed to convert the overlapping storage positions into non-overlapping storage positions. Then, the CPU creates a pointer (* pos) to the calculated num storage positions, returns the processing, and moves to the processing next to the processing that moves to this processing.

図15は、本発明の一実施形態に係る電子投票装置200の処理内容を示すフローチャートである。電子投票装置200は、電子投票データ作成装置100の暗号化処理及びGetPos処理と同様の処理を備えている。   FIG. 15 is a flowchart showing the processing contents of the electronic voting apparatus 200 according to the embodiment of the present invention. The electronic voting device 200 includes processing similar to the encryption processing and GetPos processing of the electronic voting data creation device 100.

ステップS201において、電子投票装置200のCPU(以下、投票CPUという)は、電子投票データ521を入力する。より具体的には、投票CPUは、コンピュータネットワークを介して電子投票データ作成装置100から電子投票データ521を入力する。再投票の場合には、投票CPUは、既に入力済みの電子投票データ521の中から、固有コード(MD5)によって電子投票データ521を検索する。その後、投票CPUは、処理をステップS202に移す。   In step S <b> 201, the CPU of the electronic voting apparatus 200 (hereinafter referred to as a voting CPU) inputs electronic voting data 521. More specifically, the voting CPU inputs the electronic voting data 521 from the electronic voting data creation device 100 via a computer network. In the case of re-voting, the voting CPU searches the electronic voting data 521 with the unique code (MD5) from the already input electronic voting data 521. Thereafter, the voting CPU moves the process to step S202.

ステップS202において、投票CPUは、電子投票データ521に基づいて、公開鍵を埋め込んだ位置を算出する。より具体的には、投票CPUは、GetPos処理(図14参照)へのパラメータがpar=0である領域を設定し、設定された領域を構成する画素に基づいて、公開鍵位置を算出する。ここで、設定された領域は、投票パラメータ記憶部231のパラメータによって設定され、電子投票データ作成装置100において設定された領域と同じである。その後、投票CPUは、処理をステップS203に移す。   In step S202, the voting CPU calculates a position where the public key is embedded based on the electronic voting data 521. More specifically, the voting CPU sets an area where the parameter to the GetPos process (see FIG. 14) is par = 0, and calculates the public key position based on the pixels constituting the set area. Here, the set area is set according to the parameters of the voting parameter storage unit 231 and is the same as the area set in the electronic voting data creation device 100. Thereafter, the voting CPU moves the process to step S203.

ステップS203において、投票CPUは、算出した位置から公開鍵を取得する。より具体的には、投票CPUは、算出した公開鍵位置の格納用チャネルのビット3から、公開鍵のビットを復元し、公開鍵を取得する。その後、投票CPUは、処理をステップS204に移す。   In step S203, the voting CPU obtains a public key from the calculated position. More specifically, the voting CPU restores the bit of the public key from bit 3 of the calculated channel for storing the public key position, and acquires the public key. Thereafter, the voting CPU moves the process to step S204.

ステップS204において、投票CPUは、投票内容及び確認コードの入力を受け付ける。より具体的には、投票CPUは、入力端末250(図10参照)から投票内容及び確認コードの入力を受け付ける。その後、投票CPUは、処理をステップS205に移す。   In step S204, the voting CPU accepts input of voting content and a confirmation code. More specifically, the voting CPU receives input of voting contents and a confirmation code from the input terminal 250 (see FIG. 10). Thereafter, the voting CPU moves the process to step S205.

ステップS205において、投票CPUは、パスワードの入力を受け付ける。より具体的には、投票CPUは、入力端末250(図10参照)からパスワードの入力を受け付ける。その後、投票CPUは、処理をステップS206に移す。   In step S205, the voting CPU accepts input of a password. More specifically, the voting CPU receives an input of a password from the input terminal 250 (see FIG. 10). Thereafter, the voting CPU moves the process to step S206.

ステップS206において、投票CPUは、パスワードに基づいて投票内容及び確認コードを埋め込む位置を算出する。より具体的には、投票CPUは、パスワードに基づいて領域設定用の値(Ci)を算出し、GetPos処理(図14参照)へのパラメータがpar=Ciである領域を設定し、設定された領域を構成する画素に基づいて、投票内容及び確認コードを書き込む投票位置を算出する。その後、投票CPUは、処理をステップS207に移す。   In step S206, the voting CPU calculates a position where the voting content and the confirmation code are embedded based on the password. More specifically, the voting CPU calculates an area setting value (Ci) based on the password, and sets and sets an area where the parameter to the GetPos process (see FIG. 14) is par = Ci. Based on the pixels constituting the area, the voting position where the voting content and the confirmation code are written is calculated. Thereafter, the voting CPU moves the process to step S207.

ステップS207において、投票CPUは、算出した位置に投票内容及び確認コードを埋め込む。より具体的には、投票CPUは、算出した位置の各格納用チャネルのビット1に、投票内容及び確認コードを構成するビットを書き込む。その後、投票CPUは、処理をステップS208に移す。   In step S207, the voting CPU embeds voting contents and a confirmation code in the calculated position. More specifically, the voting CPU writes the bits constituting the voting content and the confirmation code in bit 1 of each storage channel at the calculated position. Thereafter, the voting CPU moves the process to step S208.

ステップS208において、投票CPUは、公開鍵に基づいてパスワードを暗号化し、電子投票データ521に埋め込む。より具体的には、投票CPUは、GetPos処理(図14参照)へのパラメータがpar=0である領域を設定し、設定された領域を構成する画素に基づいて、パスワード位置を算出する。そして、投票CPUは、復元した公開鍵に基づいて、受け付けたパスワードを暗号化し、暗号化したパスワードを構成するビットを、算出したパスワード位置の各格納用チャネルのビット2に書き込む。その後、投票CPUは、処理をステップS209に移す。   In step S208, the voting CPU encrypts the password based on the public key and embeds it in the electronic voting data 521. More specifically, the voting CPU sets an area where the parameter to the GetPos process (see FIG. 14) is par = 0, and calculates the password position based on the pixels constituting the set area. Then, the voting CPU encrypts the received password based on the restored public key, and writes the bits constituting the encrypted password in bit 2 of each storage channel at the calculated password position. Thereafter, the voting CPU moves the process to step S209.

ステップS209において、投票CPUは、電子投票データ521を出力する。より具体的には、投票CPUは、コンピュータネットワークを介して電子投票データ521を電子開票装置300に出力する。その後、投票CPUは、処理を終了する。   In step S209, the voting CPU outputs electronic voting data 521. More specifically, the voting CPU outputs the electronic voting data 521 to the electronic vote counting device 300 via the computer network. Thereafter, the voting CPU ends the process.

図16は、本発明の一実施形態に係る電子開票装置300の処理内容を示すフローチャートである。電子開票装置300は、電子投票データ作成装置100の暗号化処理及びGetPos処理と同様の処理を備えている。   FIG. 16 is a flowchart showing the processing contents of the electronic ticketing device 300 according to an embodiment of the present invention. The electronic vote counting device 300 includes processing similar to the encryption processing and GetPos processing of the electronic voting data creation device 100.

ステップS301において、電子開票装置300のCPU(以下、開票CPUという)は、電子投票データ521を入力し、時刻を対応付けて記憶する。より具体的には、開票CPUは、コンピュータネットワークを介して電子投票データ521を電子投票装置200から入力し、入力した時の時刻を電子投票データ521に対応付けて電子投票データ記憶部332に記憶する。その後、開票CPUは、処理をステップS302に移す。   In step S301, the CPU of the electronic ticketing device 300 (hereinafter referred to as the “voting CPU”) inputs the electronic voting data 521 and stores the time in association with each other. More specifically, the vote-voting CPU inputs the electronic voting data 521 from the electronic voting device 200 via the computer network, and stores the time when the electronic voting data 521 is associated with the electronic voting data 521 in the electronic voting data storage unit 332. To do. Thereafter, the vote counting CPU moves the process to step S302.

ステップS302において、開票CPUは、開票条件を満たすか否かを判断する。すなわち、開票CPUは、現在の時刻を取得し、開票する時刻になったか否かを判断する。この判断がYESの場合、開票CPUは、処理をステップS303に移し、NOの場合、開票CPUは、処理をステップS301に移す。ここで、時刻の取得は、時計部(図示せず)を設けて、現在の時刻を取得するとしてもよいし、標準時を含む標準電波を受信して時刻を取得するとしてもよい。   In step S302, the vote counting CPU determines whether or not the vote counting condition is satisfied. That is, the vote counting CPU obtains the current time and determines whether or not it is time to vote. If this determination is YES, the vote-voting CPU moves the process to step S303, and if NO, the vote-voting CPU moves the process to step S301. Here, the time may be acquired by providing a clock unit (not shown) and acquiring the current time, or by receiving a standard radio wave including standard time and acquiring the time.

ステップS303において、開票CPUは、秘密コード(CAS)の入力を受け付ける。より具体的には、開票CPUは、入力端末350(図11参照)から秘密コード(CAS)の入力を受け付ける。その後、開票CPUは、処理をステップS304に移す。   In step S303, the vote counting CPU accepts an input of a secret code (CAS). More specifically, the vote counting CPU accepts an input of a secret code (CAS) from the input terminal 350 (see FIG. 11). Thereafter, the vote counting CPU moves the process to step S304.

ステップS304において、開票CPUは、電子投票データ521から固有コード(MD5)を取得し、同一の固有コード(MD5)を有する電子投票データ521が存在すると判断した場合に、最新の時刻に対応付けられた電子投票データ521を電子投票データ記憶部332に記憶する。より具体的には、開票CPUは、電子投票データ記憶部332に記憶された各々の電子投票データ521から各々の固有コード(MD5)を取得する。固有コード(MD5)は、電子投票データ作成装置100によって埋め込まれた画素から復元することによって取得できる。そして、開票CPUは、取得した固有コード(MD5)によって電子投票データ記憶部332内を検索し、同一の固有コード(MD5)を有する電子投票データ521が存在すると判断した場合に、同一の固有コード(MD5)を有する電子投票データ521に対応付けられた時刻を比較し、最新の時刻に対応付けられた電子投票データ521を電子投票データ記憶部332に記憶する。その後、開票CPUは、処理をステップS305に移す。なお、開票CPUは、時刻を比較し、最初の電子投票データ521を電子投票データ記憶部332に記憶する、としてもよい。   In step S304, when the vote-voting CPU acquires the unique code (MD5) from the electronic voting data 521 and determines that there is electronic voting data 521 having the same unique code (MD5), it is associated with the latest time. The electronic voting data 521 is stored in the electronic voting data storage unit 332. More specifically, the vote-voting CPU acquires each unique code (MD5) from each electronic voting data 521 stored in the electronic voting data storage unit 332. The unique code (MD5) can be acquired by restoring from the pixel embedded by the electronic voting data creation device 100. Then, the vote-voting CPU searches the electronic voting data storage unit 332 by using the acquired unique code (MD5), and determines that the electronic voting data 521 having the same unique code (MD5) exists, the same unique code The time associated with the electronic voting data 521 having (MD5) is compared, and the electronic voting data 521 associated with the latest time is stored in the electronic voting data storage unit 332. Thereafter, the vote counting CPU moves the process to step S305. The vote-voting CPU may compare the times and store the first electronic voting data 521 in the electronic voting data storage unit 332.

ステップS305において、開票CPUは、入力した電子投票データ521から投票後の画像コードを取得する。より具体的には、開票CPUは、収集した電子投票データ521に埋め込まれた冗長情報に基づいて、投票後の画像コードを取得する。その後、開票CPUは、処理をステップS306に移す。   In step S305, the vote-voting CPU obtains the image code after voting from the input electronic voting data 521. More specifically, the vote-voting CPU acquires an image code after voting based on redundant information embedded in the collected electronic voting data 521. Thereafter, the vote counting CPU moves the process to step S306.

ステップS306において、開票CPUは、秘密コードと投票後の画像コードとに基づいて投票後の暗号秘密コードを算出する。より具体的には、開票CPUは、電子投票データ作成装置100と同様に、受け付けられた秘密コード(CAS)と、取得した投票後の画像コード(投票後のCAI)とを加算して投票後の暗号秘密コード(投票後のCA)を算出する。その後、開票CPUは、処理をステップS307に移す。   In step S306, the vote counting CPU calculates the encrypted secret code after voting based on the secret code and the image code after voting. More specifically, similarly to the electronic voting data creation device 100, the vote-voting CPU adds the accepted secret code (CAS) and the acquired image code after voting (CAI after voting) and after voting. The secret code (CA after voting) is calculated. Thereafter, the vote counting CPU moves the process to step S307.

ステップS307において、開票CPUは、投票後の暗号秘密コードに基づいて秘密鍵を算出する。より具体的には、開票CPUは、電子投票データ作成装置100と同様に、秘密鍵を算出する。その後、開票CPUは、処理をステップS308に移す。   In step S307, the vote counting CPU calculates a secret key based on the encrypted secret code after voting. More specifically, the vote-voting CPU calculates a secret key, similar to the electronic voting data creation device 100. Thereafter, the vote counting CPU moves the process to step S308.

ステップS308において、開票CPUは、入力した電子投票データ521から暗号化されたパスワードを取得し、秘密鍵によって復号する。より具体的には、開票CPUは、GetPos処理(図14参照)へのパラメータがpar=0である領域を設定する。ここで、設定された領域は、開票パラメータ記憶部331のパラメータによって設定され、電子投票データ作成装置100において設定された領域と同じである。次に、開票CPUは、設定された領域を構成する画素に基づいて、パスワードが書き込まれたパスワード位置を算出し、算出したパスワード位置の格納用チャネルのビット2から暗号化されたパスワードを復元する。そして、開票CPUは、復元したパスワードを秘密鍵に基づいて復号する。その後、開票CPUは、処理をステップS309に移す。   In step S308, the vote-voting CPU obtains an encrypted password from the input electronic voting data 521 and decrypts it with the secret key. More specifically, the vote-voting CPU sets an area in which the parameter for the GetPos process (see FIG. 14) is par = 0. Here, the set area is set by a parameter in the vote-voting parameter storage unit 331 and is the same as the area set in the electronic voting data creation device 100. Next, the vote counting CPU calculates the password position where the password is written based on the pixels constituting the set area, and restores the encrypted password from bit 2 of the storage channel of the calculated password position. . Then, the vote counting CPU decrypts the restored password based on the secret key. Thereafter, the vote counting CPU moves the process to step S309.

ステップS309において、開票CPUは、復号したパスワードに基づいて、投票内容及び確認コードを取得する。より具体的には、開票CPUは、復号したパスワードに基づいて領域設定用の値(Ci)を算出し、GetPos処理(図14参照)へのパラメータがpar=Ciである領域を設定し、設定された領域を構成する画素に基づいて、投票位置を算出する。そして、開票CPUは、算出した投票位置の格納用チャネルのビット1から、投票内容及び確認コードのビットを復元し、投票内容及び確認コードを取得する。その後、開票CPUは、処理をステップS310に移す。   In step S309, the vote-voting CPU acquires the voting content and the confirmation code based on the decrypted password. More specifically, the vote-voting CPU calculates an area setting value (Ci) based on the decrypted password, sets an area where the parameter to the GetPos process (see FIG. 14) is par = Ci, and sets the area. The voting position is calculated on the basis of the pixels constituting the area. Then, the vote-voting CPU restores the voting content and the confirmation code bit from bit 1 of the calculated voting position storage channel, and acquires the voting content and the confirmation code. Thereafter, the vote counting CPU moves the process to step S310.

ステップS310において、開票CPUは、取得した投票内容及び確認コードを集計し、公表する。より具体的には、開票CPUは、取得した投票内容及び確認コードを投票内容によって集計して、投票結果を取得する。そして、開票CPUは、投票内容及び確認コードをランダムに表示装置360に表示する(図20参照)。また、開票CPUは、集計内容の送信要求を受信し、受信した要求に従って集計内容を送信する。その後、開票CPUは、処理を終了する。   In step S310, the vote counting CPU counts and publishes the acquired voting contents and confirmation codes. More specifically, the vote counting CPU totals the acquired voting contents and confirmation codes based on the voting contents, and acquires the voting results. Then, the vote counting CPU randomly displays the vote contents and the confirmation code on the display device 360 (see FIG. 20). In addition, the vote counting CPU receives a request for transmission of the total content, and transmits the total content according to the received request. Thereafter, the vote counting CPU ends the process.

図17は、本発明の一実施形態に係るビットの対応付けテーブルを示す図である。   FIG. 17 is a diagram showing a bit association table according to an embodiment of the present invention.

ビットの対応付けテーブルは、画素の位置に階調値と、ビットの重みとを対応付けて記憶している。画素の位置は、GetPos処理によって算出された画素の位置である。ビットの重みは、GetPos処理が算出した順に、2から2nー1を対応付けて記憶している。 The bit association table stores gradation values and bit weights in association with pixel positions. The pixel position is the pixel position calculated by the GetPos process. Weight bits, in the order in which GetPos process is calculated, are stored in association with each of 2 0 2 n-1.

図18は、本発明の一実施形態に係る電子投票データ作成装置100において、電子投票データ521を作成する例を示す図である。   FIG. 18 is a diagram showing an example of creating electronic voting data 521 in the electronic voting data creating apparatus 100 according to an embodiment of the present invention.

図18が示す例は、電子投票データ作成装置100が、全体画像データ501を表示装置160に表示していることを示す例である。電子投票データ作成装置100は、秘密コード入力欄161に入力された秘密コードを受け付ける。また、電子投票データ作成装置100は、分割数設定欄162に入力された分割数を受け付けて、全体画像データ501を分割して電子投票データ521を作成する。   The example illustrated in FIG. 18 is an example in which the electronic voting data creation device 100 displays the entire image data 501 on the display device 160. The electronic voting data creation device 100 accepts the secret code input in the secret code input field 161. Also, the electronic voting data creation device 100 accepts the division number input in the division number setting field 162 and divides the entire image data 501 to create the electronic voting data 521.

図19は、本発明の一実施形態に係る電子投票装置200において、電子投票データ521を表示する例を示す図である。   FIG. 19 is a diagram showing an example of displaying electronic voting data 521 in the electronic voting apparatus 200 according to an embodiment of the present invention.

図19が示す例は、電子投票装置200が、電子投票データ521を表示装置260に表示していることを示す例である。電子投票装置200は、投票入力欄261に入力された投票内容を受け付ける。そして、電子投票装置200は、確認コード入力欄262に入力された確認コードを受け付ける。電子投票装置200は、電子投票媒体700(後述する図22参照)が接続されている場合、電子投票媒体700が確認コードを自動的に作成する。   The example shown in FIG. 19 is an example showing that the electronic voting apparatus 200 displays the electronic voting data 521 on the display device 260. The electronic voting apparatus 200 receives the voting content input in the voting input field 261. Then, the electronic voting apparatus 200 accepts the confirmation code input in the confirmation code input field 262. When the electronic voting medium 700 (see FIG. 22 described later) is connected, the electronic voting medium 700 automatically creates a confirmation code.

図20は、本発明の一実施形態に係る電子開票装置300において、電子投票データ521を集計し、公表する例を示す図である。   FIG. 20 is a diagram illustrating an example in which the electronic voting data 521 is tabulated and published in the electronic vote counting device 300 according to an embodiment of the present invention.

図20が示す例は、電子開票装置300が、集計内容を表示装置360に表示していることを示す例である。電子開票装置300は、表示装置360に、投票内容と、確認コードとを並べて表示することによって、投票者に投票結果が正しく集計されていることを示すことができ、投票者に投票結果を確認させることができる。   The example illustrated in FIG. 20 is an example in which the electronic ticketing device 300 displays the total content on the display device 360. The electronic vote counting device 300 can indicate to the voter that the voting results are correctly counted by displaying the voting contents and the confirmation code side by side on the display device 360, and confirm the voting result to the voter. Can be made.

[実施形態3]
実施形態3は、暗号化処理をする暗号化装置400の実施形態である。
[Embodiment 3]
The third embodiment is an embodiment of an encryption device 400 that performs encryption processing.

図21は、本発明の一実施形態に係る暗号化装置400の機能を示す機能ブロック図である。暗号化装置400は、画像読込部401と、領域設定部402と、擬似乱数生成部403と、位置算出部404と、ハッシュ値算出部405と、重み対応付部406と、埋込部407とを備える。   FIG. 21 is a functional block diagram showing functions of the encryption device 400 according to an embodiment of the present invention. The encryption device 400 includes an image reading unit 401, a region setting unit 402, a pseudo random number generation unit 403, a position calculation unit 404, a hash value calculation unit 405, a weight association unit 406, and an embedding unit 407. Is provided.

画像読込部401は、3原色の階調値から構成される画素によって構成される画像を読み込む。   The image reading unit 401 reads an image constituted by pixels composed of gradation values of three primary colors.

領域設定部402は、画像内に領域を設定する。   The area setting unit 402 sets an area in the image.

擬似乱数生成部403は、画像読込部401によって読み込まれた画像を構成する3原色のうち一の原色又は二の原色の階調値に基づいて複数の擬似乱数を生成する。さらに、擬似乱数生成部403は、領域設定部402によって設定された領域を構成する画素のうち一の原色又は二の原色の階調値に基づいて複数の擬似乱数を生成する。   The pseudo random number generation unit 403 generates a plurality of pseudo random numbers based on the gradation values of one primary color or two primary colors among the three primary colors constituting the image read by the image reading unit 401. Further, the pseudo random number generation unit 403 generates a plurality of pseudo random numbers based on the gradation values of one primary color or two primary colors among the pixels constituting the region set by the region setting unit 402.

位置算出部404は、擬似乱数生成部403によって生成された複数の各擬似乱数に基づいて、所定の演算を実行し、画像内の画素の位置を順に複数個算出する。さらに、ハッシュ値算出部405は、画素の位置を引数としてハッシュ値を算出する。そして、位置算出部404は、算出した画素の位置が重複する場合に、重複した画素の位置を引数としてハッシュ値算出部405によってハッシュ値を算出し、算出したハッシュ値に基づいて画素の位置を算出する。例えば、領域設定部402、擬似乱数生成部403、位置算出部404及びハッシュ値算出部405のフローチャートは、実施形態2の図14と同様である。   The position calculation unit 404 performs a predetermined calculation based on the plurality of pseudorandom numbers generated by the pseudorandom number generation unit 403, and sequentially calculates a plurality of pixel positions in the image. Further, the hash value calculation unit 405 calculates a hash value using the pixel position as an argument. Then, when the calculated pixel position overlaps, the position calculation unit 404 calculates a hash value by the hash value calculation unit 405 using the position of the overlapped pixel as an argument, and calculates the pixel position based on the calculated hash value. calculate. For example, the flowcharts of the area setting unit 402, the pseudo random number generation unit 403, the position calculation unit 404, and the hash value calculation unit 405 are the same as those in FIG. 14 of the second embodiment.

重み対応付部406は、位置算出部404によって算出された複数個の各位置に係る画素を構成する3原色の階調値のうち、擬似乱数を生成するために用いた一の原色又は二の原色以外の原色の階調値を構成するビットのうち所定のビットに、位置算出部404が算出した順に、ビットの重みを対応付ける。   The weight association unit 406 uses one primary color or two secondary color values used to generate a pseudo-random number among the three primary color gradation values constituting the pixels at each of the plurality of positions calculated by the position calculation unit 404. Bit weights are associated with predetermined bits among the bits constituting the gradation values of primary colors other than the primary colors in the order calculated by the position calculation unit 404.

埋込部407は、重み対応付部406によって重みが対応付けられた所定のビットに、情報を構成するビットのうち、所定のビットに対応付けられた重みと同じ重みのビットの値を埋め込む。例えば、重み対応付部406及び埋込部407のフローチャートは、実施形態2の図13と同様である。   The embedding unit 407 embeds the value of the bit having the same weight as the weight associated with the predetermined bit among the bits constituting the information in the predetermined bit associated with the weight by the weight association unit 406. For example, the flowcharts of the weight association unit 406 and the embedding unit 407 are the same as those in FIG. 13 of the second embodiment.

[実施形態4]
実施形態4は、電子投票媒体700によって、電子投票データ521に投票内容及び確認コードを書き込み、再度の投票をする実施形態である。
[Embodiment 4]
The fourth embodiment is an embodiment in which the voting content and the confirmation code are written in the electronic voting data 521 by the electronic voting medium 700 and the voting is performed again.

図22は、本発明の一実施形態に係る電子投票媒体700の機能を示す機能ブロック図である。電子投票媒体700は、時刻取得部701と、投票識別コード作成部702と、投票識別コード出力部703と、投票データ入力部704と、確認コード作成部705と、パスワード作成部706と、投票内容書込部707と、公開鍵取得部708と、暗号化書込部709と、電子投票データ出力部710と、表示部711と、媒体パラメータ記憶部731と、投票データ記憶部732と、媒体識別情報記憶部733とを備える。   FIG. 22 is a functional block diagram showing functions of the electronic voting medium 700 according to an embodiment of the present invention. The electronic voting medium 700 includes a time acquisition unit 701, a voting identification code creation unit 702, a voting identification code output unit 703, a voting data input unit 704, a confirmation code creation unit 705, a password creation unit 706, and voting contents. Writing unit 707, public key obtaining unit 708, encrypted writing unit 709, electronic voting data output unit 710, display unit 711, medium parameter storage unit 731, voting data storage unit 732, medium identification And an information storage unit 733.

媒体パラメータ記憶部731は、電子投票データ521内に設定する領域についての所定のパラメータを記憶している。例えば、媒体パラメータ記憶部731は、実施形態1の図6における、開始点の値(a、b)と、領域の幅Aと、領域の高さBとを記憶している。   The medium parameter storage unit 731 stores predetermined parameters for an area set in the electronic voting data 521. For example, the medium parameter storage unit 731 stores the starting point values (a, b), the region width A, and the region height B in FIG. 6 of the first embodiment.

媒体識別情報記憶部733は、電子投票媒体を識別するための媒体識別情報(製品ID)を記憶する。   The medium identification information storage unit 733 stores medium identification information (product ID) for identifying the electronic voting medium.

時刻取得部701は、現在の時刻を取得する。   The time acquisition unit 701 acquires the current time.

投票識別コード作成部702は、媒体識別情報記憶部733によって記憶された媒体識別情報(製品ID)と、時刻取得部701によって取得された時刻を含むシリアル番号とに基づいて、投票ごとに投票識別コード(投票IDという)を作成する。例えば、投票識別コード作成部702は、製品IDをPQRS01234とすると、投票IDとして、PQRS01234−200901231659−0001を作成する。なお、電子投票データ作成装置100は、受信した投票IDに基づいて、初回と同じ電子投票データ521を送信する場合、投票IDのうち固定である製品IDの部分を利用する。   The voting identification code creating unit 702 performs voting identification for each vote based on the medium identification information (product ID) stored in the medium identification information storage unit 733 and the serial number including the time acquired by the time acquisition unit 701. Create a code (called vote ID). For example, if the product ID is PQRS01234, the voting identification code creating unit 702 creates PQRS01234-200901123659-0001 as the voting ID. Note that the electronic voting data creation device 100 uses a fixed product ID portion of the voting ID when transmitting the same electronic voting data 521 as the first time based on the received voting ID.

投票識別コード出力部703は、投票IDのうち最新の投票IDを出力する。   The vote identification code output unit 703 outputs the latest vote ID among the vote IDs.

投票データ入力部704は、公開鍵が所定の方法によって書き込まれた画像データである電子投票データ521と、受け付けられた候補者を示す投票内容とを入力する。   The voting data input unit 704 inputs electronic voting data 521 which is image data in which a public key is written by a predetermined method, and voting contents indicating accepted candidates.

確認コード作成部705は、投票内容に対応付けて確認コードを作成する。   The confirmation code creation unit 705 creates a confirmation code in association with the vote contents.

パスワード作成部706は、投票内容及び確認コードを抽出するためのパスワードを作成する。   The password creation unit 706 creates a password for extracting the contents of the vote and the confirmation code.

投票内容書込部707は、電子投票データ521に、パスワード作成部706によって作成されたパスワードに基づいて、投票内容及び確認コードを埋め込む。例えば、投票内容書込部707は、実施形態2の電子投票装置200と同様に、パスワード作成部706によって作成されたパスワードに基づいて、GetPos処理(図14参照)へのパラメータ(par=Ci)を算出し、算出したパラメータによって領域を設定する。次に、投票内容書込部707は、設定された領域を構成する画素に基づいて投票内容及び確認コードを埋め込む投票内容位置を算出し、算出した投票内容位置に、投票内容及び確認コードをビットに分解して埋め込む。   The voting content writing unit 707 embeds the voting content and the confirmation code in the electronic voting data 521 based on the password created by the password creating unit 706. For example, the voting content writing unit 707, like the electronic voting apparatus 200 of the second embodiment, based on the password created by the password creating unit 706, parameters to the GetPos process (see FIG. 14) (par = Ci) And an area is set according to the calculated parameters. Next, the voting content writing unit 707 calculates a voting content position for embedding the voting content and the confirmation code based on the pixels constituting the set area, and bit the voting content and the confirmation code in the calculated voting content position. Decompose and embed.

公開鍵取得部708は、投票データ入力部704によって入力された電子投票データ521から公開鍵を取得する。   The public key acquisition unit 708 acquires a public key from the electronic voting data 521 input by the voting data input unit 704.

暗号化書込部709は、電子投票データ521に、公開鍵取得部708によって取得された公開鍵に基づいてパスワードを暗号化して埋め込む。例えば、暗号化書込部709は、実施形態2の電子投票装置200と同様に、GetPos処理(図14参照)へのパラメータがpar=0である領域を設定する。次に、暗号化書込部709は、設定された領域を構成する画素に基づいてパスワードを埋め込むパスワード位置を算出する。そして、暗号化書込部709は、算出したパスワード位置に、暗号化されたパスワードをビットに分解して埋め込む。   The encryption writing unit 709 encrypts and embeds the password in the electronic voting data 521 based on the public key acquired by the public key acquisition unit 708. For example, the encryption writing unit 709 sets an area where the parameter for the GetPos process (see FIG. 14) is par = 0, as in the electronic voting apparatus 200 of the second embodiment. Next, the encryption writing unit 709 calculates a password position for embedding the password based on the pixels constituting the set area. Then, the encryption writing unit 709 embeds the encrypted password by breaking it into bits at the calculated password position.

電子投票データ出力部710は、投票内容及び確認コードと、パスワードとが書き込まれた電子投票データ521を出力する。   The electronic voting data output unit 710 outputs electronic voting data 521 in which the voting contents and confirmation code, and the password are written.

投票データ記憶部732は、投票内容及び確認コードに、パスワードと、投票IDとを対応付けて記憶する。   The voting data storage unit 732 stores a password and a voting ID in association with voting contents and a confirmation code.

表示部711は、投票データ記憶部732に記憶された投票内容及び確認コードと、パスワードと、投票IDとを対応付けて表示する。   The display unit 711 displays the voting contents and confirmation code stored in the voting data storage unit 732, the password, and the voting ID in association with each other.

図23は、本発明の一実施形態に係る電子投票媒体700の例を示す図である。電子投票媒体700は、CPU(図示せず、以下媒体CPUという)、記憶部(図示せず、媒体パラメータ記憶部731、投票データ記憶部732及び媒体識別情報記憶部733を含む)、接続部734、表示装置735及び操作ボタン(ID作成ボタン721、確認コード作成ボタン722、表示ボタン723、投票ボタン724)を備えている。接続部734は、例えば、USB(Universal Serial Bus)又は近距離無線通信等の接続インターフェースによって構成されている。表示装置735は、例えば、液晶ディスプレイ等によって構成される。   FIG. 23 is a diagram showing an example of an electronic voting medium 700 according to an embodiment of the present invention. The electronic voting medium 700 includes a CPU (not shown, hereinafter referred to as a medium CPU), a storage unit (not shown, including a medium parameter storage unit 731, a voting data storage unit 732, and a medium identification information storage unit 733), and a connection unit 734. A display device 735 and operation buttons (an ID creation button 721, a confirmation code creation button 722, a display button 723, and a voting button 724). The connection unit 734 is configured by a connection interface such as USB (Universal Serial Bus) or near field communication, for example. The display device 735 is configured by, for example, a liquid crystal display.

電子投票媒体700は、電子投票データ521を書き込む媒体として、例えば、次のように利用される。
(1)最初に、電子投票データ作成装置100は電子投票媒体700を接続する。電子投票データ作成装置100は、電子投票媒体700が作成した投票IDを登録し、電子投票媒体700に電子投票データ521を書き込む。電子投票媒体700は、最新の投票IDをアクティブにする。
(2)電子投票装置200は、電子投票媒体700を接続し、受け付けた投票内容を電子投票媒体700に書き込む。電子投票媒体700は、確認コードを作成し、パスワードを作成する。そして、電子投票媒体700は、電子投票データ521に、投票内容及び確認コードと、パスワードとを埋め込む。
(3)電子開票装置300は、電子投票媒体700を接続し、投票内容及び確認コードを入力して集計し、公表する。
The electronic voting medium 700 is used as follows as a medium for writing the electronic voting data 521, for example.
(1) First, the electronic voting data creation apparatus 100 connects the electronic voting medium 700. The electronic voting data creation device 100 registers the voting ID created by the electronic voting medium 700 and writes the electronic voting data 521 in the electronic voting medium 700. The electronic voting medium 700 activates the latest voting ID.
(2) The electronic voting apparatus 200 connects the electronic voting medium 700 and writes the received voting content in the electronic voting medium 700. The electronic voting medium 700 creates a confirmation code and creates a password. Then, the electronic voting medium 700 embeds the voting content and confirmation code, and the password in the electronic voting data 521.
(3) The electronic voting apparatus 300 connects the electronic voting medium 700, inputs the voting contents and the confirmation code, aggregates them, and publishes them.

さらに、電子投票媒体700は、電子投票システム10において次のように利用される。図24は、本発明の一実施形態に係る電子投票媒体700を利用した電子投票システム10の例を示す図である。電子投票媒体700が接続されたパソコンや携帯端末等(以下、電子投票媒体接続端末790という)は、電子投票データ作成装置100及び電子開票装置300と通信を行い、電子投票データ521の送受信を行う。電子投票媒体接続端末790は、電子投票システム10用のプログラムをダウンロードして動作する。   Further, the electronic voting medium 700 is used in the electronic voting system 10 as follows. FIG. 24 is a diagram illustrating an example of the electronic voting system 10 using the electronic voting medium 700 according to an embodiment of the present invention. A personal computer, a portable terminal, or the like (hereinafter referred to as an electronic voting medium connection terminal 790) to which the electronic voting medium 700 is connected communicates with the electronic voting data creation device 100 and the electronic voting device 300, and transmits and receives electronic voting data 521. . The electronic voting medium connection terminal 790 operates by downloading a program for the electronic voting system 10.

電子投票媒体接続端末790は、電子投票媒体700を接続する。電子投票媒体700は、投票IDを作成する。電子投票媒体接続端末790は、電子投票媒体700から読み込んだ投票IDに基づいて、電子投票データ作成装置100に電子投票データ521の送信要求を送信する。そして、電子投票媒体接続端末790は、電子投票データ作成装置100から電子投票データ521を受信し、受信した電子投票データ521を表示する(例えば、図19のような表示であって、確認コードを入力する欄がない表示をする)。そして、電子投票媒体接続端末790は、投票内容の入力を受け付け、受け付けた投票内容と、電子投票データ521とを電子投票媒体700に書き込む。電子投票媒体700は、電子投票データ521から公開鍵を取得し、取得した公開鍵に基づいて、自動生成したパスワードを暗号化し、投票内容及び自動生成した確認コードを電子投票データ521に書き込む。そして、電子投票媒体接続端末790は、電子投票媒体700から、電子投票データ521を読み込み、電子開票装置300に送信する。   The electronic voting medium connection terminal 790 connects the electronic voting medium 700. The electronic voting medium 700 creates a voting ID. The electronic voting medium connection terminal 790 transmits a transmission request for the electronic voting data 521 to the electronic voting data creation device 100 based on the voting ID read from the electronic voting medium 700. The electronic voting medium connection terminal 790 receives the electronic voting data 521 from the electronic voting data creation device 100 and displays the received electronic voting data 521 (for example, a display as shown in FIG. Display with no input field). Then, the electronic voting medium connection terminal 790 receives the input of the voting content, and writes the received voting content and the electronic voting data 521 in the electronic voting medium 700. The electronic voting medium 700 acquires the public key from the electronic voting data 521, encrypts the automatically generated password based on the acquired public key, and writes the voting contents and the automatically generated confirmation code in the electronic voting data 521. Then, the electronic voting medium connection terminal 790 reads the electronic voting data 521 from the electronic voting medium 700 and transmits it to the electronic voting apparatus 300.

再投票をする場合、電子投票媒体接続端末790は、電子投票媒体700からアクティブになっている最新の投票IDを読み込み、読み込んだ投票IDに基づいて、電子投票データ作成装置100に電子投票データ521の送信要求を送信する。電子投票データ作成装置100は、受信した投票IDに基づいて、初回と同じ電子投票データ521を送信する。そして、上述と同様に、電子投票媒体接続端末790は、受信した電子投票データ521に基づいて、新たな投票内容を受け付け、電子投票媒体700が書き込んだ電子投票データ521を電子開票装置300に送信する。   In the case of re-voting, the electronic voting medium connection terminal 790 reads the latest voting ID that is active from the electronic voting medium 700, and sends the electronic voting data 521 to the electronic voting data creation apparatus 100 based on the read voting ID. Send a send request. The electronic voting data creation device 100 transmits the same electronic voting data 521 as the first time based on the received voting ID. Then, as described above, the electronic voting medium connection terminal 790 accepts new voting contents based on the received electronic voting data 521 and transmits the electronic voting data 521 written by the electronic voting medium 700 to the electronic vote counting device 300. To do.

図25は、本発明の一実施形態に係る電子投票媒体700を利用する投票プログラムの処理内容を示すフローチャートである。   FIG. 25 is a flowchart showing the processing contents of a voting program using the electronic voting medium 700 according to an embodiment of the present invention.

ステップS401において、電子投票媒体接続端末790のCPU(以下、端末CPUという)は、電子投票媒体700から投票IDを読み込む。その後、端末CPUは、処理をステップS402に移す。   In step S <b> 401, the CPU of the electronic voting medium connection terminal 790 (hereinafter referred to as a terminal CPU) reads the voting ID from the electronic voting medium 700. Thereafter, the terminal CPU moves the process to step S402.

ステップS402において、端末CPUは、投票IDに基づいて電子投票データ作成装置100から電子投票データ521を受信する。その後、端末CPUは、処理をステップS403に移す。   In step S402, the terminal CPU receives the electronic voting data 521 from the electronic voting data creation device 100 based on the voting ID. Thereafter, the terminal CPU moves the process to step S403.

ステップS403において、端末CPUは、電子投票データ521を表示する。その後、端末CPUは、処理をステップS404に移す。   In step S403, the terminal CPU displays the electronic voting data 521. Thereafter, the terminal CPU moves the process to step S404.

ステップS404において、端末CPUは、投票内容を受け付ける。その後、端末CPUは、処理をステップS405に移す。   In step S404, the terminal CPU accepts voting content. Thereafter, the terminal CPU moves the process to step S405.

ステップS405において、端末CPUは、投票内容と電子投票データ521とを電子投票媒体700に書き込む。その後、端末CPUは、処理をステップS406に移す。   In step S405, the terminal CPU writes the voting content and the electronic voting data 521 in the electronic voting medium 700. Thereafter, the terminal CPU moves the process to step S406.

ステップS406において、端末CPUは、電子投票媒体700から暗号化された電子投票データ521を読み込む。その後、端末CPUは、処理をステップS407に移す。   In step S406, the terminal CPU reads the encrypted electronic voting data 521 from the electronic voting medium 700. Thereafter, the terminal CPU shifts the processing to step S407.

ステップS407において、端末CPUは、読み込んだ電子投票データ521を電子開票装置300に送信する。その後、端末CPUは、処理を終了する。   In step S <b> 407, the terminal CPU transmits the read electronic voting data 521 to the electronic vote counting device 300. Thereafter, the terminal CPU ends the process.

図26は、本発明の一実施形態に係る電子投票媒体700の処理内容を示すフローチャートである。   FIG. 26 is a flowchart showing the processing contents of the electronic voting medium 700 according to an embodiment of the present invention.

ステップS501において、媒体CPUは、入力したデータが電子投票データ521か否かを判断する。この判断がYESの場合、媒体CPUは、処理をステップS502に移し、NOの場合、媒体CPUは、処理をステップS503に移す。   In step S501, the medium CPU determines whether the input data is electronic voting data 521 or not. If the determination is YES, the medium CPU moves the process to step S502, and if the determination is NO, the medium CPU moves the process to step S503.

ステップS502において、媒体CPUは、投票内容と電子投票データ521とを記憶部に記憶する。その後、媒体CPUは、処理をステップS501に移す。   In step S502, the medium CPU stores the voting content and the electronic voting data 521 in the storage unit. Thereafter, the medium CPU moves the process to step S501.

ステップS503において、媒体CPUは、ID作成ボタン721押下か否かを判断する。この判断がYESの場合、媒体CPUは、処理をステップS504に移し、NOの場合、媒体CPUは、処理をステップS505に移す。   In step S503, the medium CPU determines whether or not the ID creation button 721 has been pressed. If the determination is YES, the medium CPU moves the process to step S504, and if the determination is NO, the medium CPU moves the process to step S505.

ステップS504において、媒体CPUは、投票IDを作成する。より具体的には、媒体CPUは、現在の時刻を含んだシリアル番号と、媒体識別情報記憶部733に記憶された製品IDとに基づいて投票IDを作成する。そして、媒体CPUは、作成した最新の投票IDのみをアクティブにする。その後、媒体CPUは、処理をステップS501に移す。   In step S504, the medium CPU creates a vote ID. More specifically, the medium CPU creates a vote ID based on the serial number including the current time and the product ID stored in the medium identification information storage unit 733. Then, the medium CPU activates only the latest created vote ID. Thereafter, the medium CPU moves the process to step S501.

ステップS505において、媒体CPUは、確認コード作成ボタン722押下か否かを判断する。この判断がYESの場合、媒体CPUは、処理をステップS506に移し、NOの場合、媒体CPUは、処理をステップS507に移す。   In step S505, the medium CPU determines whether or not the confirmation code creation button 722 has been pressed. If the determination is YES, the medium CPU moves the process to step S506, and if the determination is NO, the medium CPU moves the process to step S507.

ステップS506において、媒体CPUは、確認コードとパスワードとを作成し、記憶する。より具体的には、媒体CPUは、確認コード作成ボタン722押下によって、確認コード用の乱数とパスワード用の乱数とを次々と発生させ、2度目の確認コード作成ボタン722押下によって押下時に発生させていた乱数を決定する。そして、媒体CPUは、決定した乱数と現在の時刻とを組合せて確認コードとパスワードとを作成し、投票内容に対応付けて確認コードとパスワードとを記憶部に記憶する。その後、媒体CPUは、処理をステップS501に移す。   In step S506, the medium CPU creates and stores a confirmation code and a password. More specifically, the medium CPU generates a random number for confirmation code and a random number for password one after another by pressing the confirmation code creation button 722, and the second time by pressing the confirmation code creation button 722. Determine the random number. Then, the medium CPU creates a confirmation code and a password by combining the determined random number and the current time, and stores the confirmation code and the password in the storage unit in association with the contents of the vote. Thereafter, the medium CPU moves the process to step S501.

ステップS507において、媒体CPUは、表示ボタン723押下か否かを判断する。この判断がYESの場合、媒体CPUは、処理をステップS508に移し、NOの場合、媒体CPUは、処理をステップS509に移す。   In step S507, the medium CPU determines whether or not the display button 723 is pressed. If this determination is YES, the medium CPU moves the process to step S508, and if NO, the medium CPU moves the process to step S509.

ステップS508において、媒体CPUは、投票内容及び確認コードとパスワードとを表示する。より具体的には、媒体CPUは、検出した表示ボタン723押下によって投票内容及び確認コードとパスワードとを表示装置735に表示する。そして、媒体CPUは、検出した表示ボタン723押下ごとに記憶部に記憶している投票内容及び確認コードとパスワードとを表示装置735に表示する。その後、媒体CPUは、処理をステップS501に移す。   In step S508, the medium CPU displays the vote contents, the confirmation code, and the password. More specifically, the medium CPU displays the content of the vote, the confirmation code, and the password on the display device 735 when the detected display button 723 is pressed. Then, each time the detected display button 723 is pressed, the medium CPU displays the voting content, the confirmation code, and the password stored in the storage unit on the display device 735. Thereafter, the medium CPU moves the process to step S501.

ステップS509において、媒体CPUは、投票ボタン724押下か否かを判断する。この判断がYESの場合、媒体CPUは、処理をステップS510に移し、NOの場合、媒体CPUは、処理をステップS501に移す。   In step S509, the medium CPU determines whether or not the voting button 724 has been pressed. If the determination is YES, the medium CPU moves the process to step S510, and if the determination is NO, the medium CPU moves the process to step S501.

ステップS510において、媒体CPUは、電子投票データ521に投票内容及び確認コードと、パスワードとを埋め込む。より具体的には、媒体CPUは、パスワードに基づいてGetPos処理(図14参照)へのパラメータ(par=Ci)を算出し、算出したパラメータによって電子投票データ521内に領域を設定し、設定した領域を構成する画素に基づいて算出した投票内容位置に、投票内容及び確認コードを埋め込む。次に、媒体CPUは、電子投票データ521から公開鍵を取得し、取得した公開鍵に基づいてパスワードを暗号化する。そして、媒体CPUは、GetPos処理(図14参照、par=0)によって算出された電子投票データ521内のパスワード位置に、暗号化したパスワードを埋め込む。その後、媒体CPUは、処理をステップS501に移す。   In step S <b> 510, the medium CPU embeds the voting content and confirmation code, and the password in the electronic voting data 521. More specifically, the medium CPU calculates a parameter (par = Ci) for the GetPos process (see FIG. 14) based on the password, and sets and sets an area in the electronic voting data 521 based on the calculated parameter. The voting content and the confirmation code are embedded in the voting content position calculated based on the pixels constituting the area. Next, the medium CPU acquires a public key from the electronic voting data 521 and encrypts a password based on the acquired public key. Then, the medium CPU embeds the encrypted password in the password position in the electronic voting data 521 calculated by the GetPos process (see FIG. 14, par = 0). Thereafter, the medium CPU moves the process to step S501.

図27は、本発明の一実施形態に係る電子投票媒体700を利用する場合の電子投票データ作成装置100の処理内容を示すフローチャートである。   FIG. 27 is a flowchart showing the processing contents of the electronic voting data creation device 100 when using the electronic voting medium 700 according to an embodiment of the present invention.

ステップS151において、作成CPUは、電子投票データ521を作成する。作成CPUは、図12のステップS101からステップS108と同様に電子投票データ521を作成する。その後、作成CPUは、処理をステップS152に移す。   In step S151, the creation CPU creates electronic voting data 521. The creation CPU creates electronic voting data 521 in the same manner as steps S101 to S108 in FIG. Thereafter, the creation CPU moves the process to step S152.

ステップS152において、作成CPUは、投票IDを受信か否かを判断する。すなわち、作成CPUは、電子投票媒体接続端末790から投票IDを受信したか否かを判断する。この判断がYESの場合、作成CPUは、処理をステップS153に移し、NOの場合、作成CPUは、処理を終了する。   In step S152, the creation CPU determines whether or not a vote ID is received. That is, the creation CPU determines whether or not a vote ID has been received from the electronic voting medium connection terminal 790. If this determination is YES, the creating CPU moves the process to step S153, and if NO, the creating CPU ends the process.

ステップS153において、作成CPUは、最初か否かを判断する。すなわち、作成CPUは、投票IDが記憶部(図示せず)に記憶されているか否かを判断する。この判断がYESの場合、作成CPUは、処理をステップS154に移し、NOの場合、作成CPUは、処理をステップS156に移す。   In step S153, the creation CPU determines whether it is the first time. That is, the creation CPU determines whether or not the vote ID is stored in a storage unit (not shown). If this determination is YES, the creating CPU moves the process to step S154, and if NO, the creating CPU moves the process to step S156.

ステップS154において、作成CPUは、電子投票データ521に投票IDを対応付けて記憶する。その後、作成CPUは、処理をステップS155に移す。   In step S154, the creation CPU stores the electronic voting data 521 in association with the voting ID. Thereafter, the creation CPU moves the process to step S155.

ステップS155において、作成CPUは、電子投票データ521を送信する。すなわち、作成CPUは、投票IDを送信した電子投票媒体接続端末790に電子投票データ521を送信する。その後、作成CPUは、処理を終了する。   In step S155, the creation CPU transmits electronic voting data 521. That is, the creation CPU transmits the electronic voting data 521 to the electronic voting medium connection terminal 790 that has transmitted the voting ID. Thereafter, the creation CPU ends the process.

ステップS156において、作成CPUは、受信した投票IDによって検索し、検索した投票IDに対応付けられた電子投票データ521を取得する。すなわち、作成CPUは、電子投票データ521と投票IDとを対応付けて記憶した記憶部(図示せず)を投票IDによって検索し、検索した投票IDに対応付けられた電子投票データ521を取得する。その後、作成CPUは、処理をステップS155に移す。   In step S156, the creation CPU searches by the received vote ID, and acquires the electronic vote data 521 associated with the searched vote ID. That is, the creation CPU searches a storage unit (not shown) that stores the electronic voting data 521 and the voting ID in association with each other by the voting ID, and acquires the electronic voting data 521 associated with the searched voting ID. . Thereafter, the creation CPU moves the process to step S155.

図28は、本発明の一実施形態に係る電子投票媒体700を利用する場合の電子開票装置300の処理内容を示すフローチャートである。   FIG. 28 is a flowchart showing the processing contents of the electronic balloting device 300 when using the electronic voting medium 700 according to one embodiment of the present invention.

ステップS351において、開票CPUは、電子投票データ521を入力する。すなわち、開票CPUは、図16のステップS301と同様に、電子投票データ521を入力する。その後、開票CPUは、処理をステップS352に移す。   In step S351, the vote-voting CPU inputs electronic voting data 521. That is, the vote-voting CPU inputs the electronic voting data 521 as in step S301 in FIG. Thereafter, the vote counting CPU moves the process to step S352.

ステップS352において、開票CPUは、投票IDを受信か否かを判断する。すなわち、開票CPUは、電子投票媒体接続端末790から投票IDを受信したか否かを判断する。この判断がYESの場合、開票CPUは、処理をステップS353に移し、NOの場合、開票CPUは、処理をステップS355に移す。   In step S352, the vote counting CPU determines whether or not a vote ID is received. That is, the vote counting CPU determines whether or not the vote ID is received from the electronic voting medium connection terminal 790. If this determination is YES, the vote-voting CPU moves the process to step S353, and if NO, the vote-voting CPU moves the process to step S355.

ステップS353において、開票CPUは、最初か否かを判断する。すなわち、開票CPUは、投票IDが電子投票データ記憶部332に記憶されているか否かを判断する。この判断がYESの場合、開票CPUは、処理をステップS354に移し、NOの場合、開票CPUは、処理をステップS357に移す。   In step S353, the vote counting CPU determines whether it is the first time. That is, the vote counting CPU determines whether or not the vote ID is stored in the electronic vote data storage unit 332. If this determination is YES, the vote-voting CPU moves the process to step S354, and if NO, the vote-voting CPU moves the process to step S357.

ステップS354において、開票CPUは、電子投票データ521に投票IDを対応付けて電子投票データ記憶部332に記憶する。その後、開票CPUは、処理をステップS355に移す。   In step S354, the vote-voting CPU stores the electronic voting data storage unit 332 in association with the electronic voting data 521 with the vote ID. Thereafter, the vote counting CPU moves the process to step S355.

ステップS355において、開票CPUは、開票条件を満たすか否かを判断する。すなわち、開票CPUは、図16のステップS302と同様に、開票条件を満たすか否かを判断する。この判断がYESの場合、開票CPUは、処理をステップS356に移し、NOの場合、開票CPUは、処理をステップS351に移す。   In step S355, the vote counting CPU determines whether or not the vote counting condition is satisfied. That is, the vote-voting CPU determines whether or not the vote-voting condition is satisfied, similarly to step S302 in FIG. If this determination is YES, the vote-voting CPU moves the process to step S356, and if NO, the vote-voting CPU moves the process to step S351.

ステップS356において、開票CPUは、開票処理を行う。すなわち、開票CPUは、図16のステップS303からステップS310と同様に、開票処理を行う。その後、開票CPUは、処理を終了する。   In step S356, the vote counting CPU performs a vote counting process. That is, the vote counting CPU performs the vote counting process in the same manner as in steps S303 to S310 in FIG. Thereafter, the vote counting CPU ends the process.

ステップS357において、開票CPUは、受信した投票IDによって検索し、検索した投票IDに対応付けられた電子投票データ521に上書きする。すなわち、開票CPUは、電子投票データ521と投票IDとを対応付けて記憶した電子投票データ記憶部332を投票IDのうち製品IDによって検索し、検索した製品IDを含む投票IDに対応付けられた電子投票データ521に上書きして電子投票データ記憶部332に記憶する。その後、開票CPUは、処理をステップS355に移す。なお、開票CPUは、投票IDに含まれる時刻に基づいて上書きするとしてもよい。   In step S357, the vote-voting CPU searches for the received vote ID and overwrites the electronic vote data 521 associated with the searched vote ID. That is, the vote-voting CPU searches the electronic voting data storage unit 332 that stores the electronic voting data 521 and the voting ID in association with each other by the product ID, and associates the electronic voting data 521 with the voting ID including the searched product ID. The electronic voting data 521 is overwritten and stored in the electronic voting data storage unit 332. Thereafter, the vote counting CPU moves the process to step S355. Note that the vote counting CPU may overwrite the time based on the time included in the vote ID.

本実施形態によれば、電子投票媒体700は、電子投票媒体700を識別するための媒体識別情報を記憶する媒体識別情報記憶部733を有している。そして、電子投票媒体700は、現在の時刻を取得し、媒体識別情報記憶部733によって記憶された媒体識別情報と、取得された時刻を含むシリアル番号とに基づいて、投票ごとに投票IDを作成し、最新の投票IDを出力する。そして、電子投票媒体700は、公開鍵が所定の方法によって書き込まれた電子投票データ521と、受け付けられた候補者を示す投票内容とを入力し、投票内容に対応付けて確認コードを作成し、投票内容及び確認コードを抽出するためのパスワードを作成する。次に、電子投票媒体700は、電子投票データ521に、作成したパスワードに基づいて、投票内容及び確認コードを埋め込み、入力された電子投票データ521から公開鍵を取得し、取得された公開鍵に基づいてパスワードを暗号化して電子投票データ521に埋め込み、出力する。したがって、電子投票媒体700は、電子投票において、同一人であるならば定められた開票日までに何度でも投票をすることができる電子投票データ521を作成することができ、かつ、不正な投票を容易に防止する電子投票データ521を作成することができる。さらに電子投票媒体700は、確認コードによって投票後の集計が正しく行われたことを確認し、パスワードによって投票内容を検証することができる電子投票データ521を作成することができる。   According to the present embodiment, the electronic voting medium 700 has the medium identification information storage unit 733 that stores medium identification information for identifying the electronic voting medium 700. Then, the electronic voting medium 700 acquires the current time, and creates a voting ID for each vote based on the medium identification information stored by the medium identification information storage unit 733 and the serial number including the acquired time. The latest vote ID is output. Then, the electronic voting medium 700 inputs the electronic voting data 521 in which the public key is written by a predetermined method and the voting content indicating the accepted candidate, creates a confirmation code in association with the voting content, Create a password to extract voting details and verification code. Next, the electronic voting medium 700 embeds the voting content and the confirmation code in the electronic voting data 521 based on the created password, acquires the public key from the input electronic voting data 521, and uses the acquired public key as the public key. Based on this, the password is encrypted, embedded in the electronic voting data 521, and output. Therefore, the electronic voting medium 700 can create the electronic voting data 521 that can be voted as many times as possible within a predetermined vote date in the electronic voting, and the illegal voting. It is possible to create electronic voting data 521 that easily prevents the occurrence of voting. Furthermore, the electronic voting medium 700 can create electronic voting data 521 that can confirm that the counting after the voting is correctly performed by the confirmation code and verify the voting contents by the password.

さらに、電子投票媒体700は、投票内容及び確認コードに、パスワードと、投票IDとを対応付けて記憶し、記憶された投票内容及び確認コードと、パスワードと、投票IDとを対応付けて表示する。したがって、電子投票媒体700は、投票後の集計が正しく行われたことを確認し、投票内容を検証することができる情報を提供することができる。   Furthermore, the electronic voting medium 700 stores the voting content and the confirmation code in association with the password and the voting ID, and displays the stored voting content and confirmation code, the password, and the voting ID in association with each other. . Therefore, the electronic voting medium 700 can provide information that can confirm that the counting after the voting is correctly performed and verify the voting contents.

以上、本発明の実施形態について説明したが、本発明は上述した実施形態に限るものではない。また、本発明の実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、本発明の実施形態に記載されたものに限定されるものではない。   As mentioned above, although embodiment of this invention was described, this invention is not restricted to embodiment mentioned above. The effects described in the embodiments of the present invention are only the most preferable effects resulting from the present invention, and the effects of the present invention are limited to those described in the embodiments of the present invention. is not.

10 電子投票システム
100 電子投票データ作成装置
101 秘密コード受付部
102 全体画像データ変更部
103 全体画像コード算出部
104 暗号秘密コード算出部
105 暗号鍵作成部
106 分割数設定部
107 全体画像分割部
108 作成領域設定部
109 公開鍵位置算出部
110 固有コード作成部
111 固有コード位置算出部
112 冗長情報書込部
113 電子投票データ作成部
114 電子投票データ出力部
131 作成パラメータ記憶部
200 電子投票装置
201 投票入力部
202 投票領域設定部
203 投票公開鍵位置算出部
204 公開鍵取得部
205 投票受付部
206 パスワード受付部
207 投票内容領域設定部
208 投票内容位置算出部
209 パスワード暗号化部
210 パスワード位置算出部
211 投票書込部
212 再投票受付部
213 投票出力部
231 投票パラメータ記憶部
300 電子開票装置
301 開票入力部
302 開票判断部
303 開票秘密コード受付部
304 開票固有コード位置算出部
305 固有コード取得部
306 電子投票データ検索部
307 電子投票データ決定部
308 開票全体画像コード算出部
309 開票暗号秘密コード算出部
310 秘密鍵作成部
311 開票領域設定部
312 開票パスワード位置算出部
313 暗号パスワード取得部
314 暗号パスワード復号部
315 開票投票内容領域設定部
316 開票投票位置算出部
317 投票データ取得部
318 開票公表部
331 開票パラメータ記憶部
332 電子投票データ記憶部
400 暗号化装置
401 画像読込部
402 領域設定部
403 擬似乱数生成部
404 位置算出部
405 ハッシュ値算出部
406 重み対応付部
407 埋込部
700 電子投票媒体
701 時刻取得部
702 投票識別コード作成部
703 投票識別コード出力部
704 投票データ入力部
705 確認コード作成部
706 パスワード作成部
707 投票内容書込部
708 公開鍵取得部
709 暗号化書込部
710 電子投票データ出力部
711 表示部
721 ID作成ボタン
722 確認コード作成ボタン
723 表示ボタン
724 投票ボタン
731 媒体パラメータ記憶部
732 投票データ記憶部
733 媒体識別情報記憶部
734 接続部
735 表示装置

DESCRIPTION OF SYMBOLS 10 Electronic voting system 100 Electronic voting data creation apparatus 101 Secret code reception part 102 Whole image data change part 103 Whole image code calculation part 104 Cryptographic secret code calculation part 105 Encryption key creation part 106 Division number setting part 107 Whole image division part 108 Creation Area setting unit 109 Public key position calculation unit 110 Unique code creation unit 111 Unique code position calculation unit 112 Redundant information writing unit 113 Electronic voting data creation unit 114 Electronic voting data output unit 131 Creation parameter storage unit 200 Electronic voting device 201 Voting input Unit 202 voting area setting unit 203 voting public key position calculating unit 204 public key obtaining unit 205 voting receiving unit 206 password receiving unit 207 voting content area setting unit 208 voting content position calculating unit 209 password encryption unit 210 password position calculating unit 2 DESCRIPTION OF SYMBOLS 1 Vote writing part 212 Re-voting reception part 213 Vote output part 231 Voting parameter memory | storage part 300 Electronic ticket-voting apparatus 301 Vote-voting input part 302 Vote-voting determination part 303 Voting secret code reception part 304 Voting-inheritance code | cord | chord code | cord | Electronic voting data search unit 307 Electronic voting data determination unit 308 Total voted image code calculation unit 309 Voted cryptographic secret code calculation unit 310 Secret key creation unit 311 Voted region setting unit 312 Voted password position calculation unit 313 Encryption password acquisition unit 314 Encryption password decryption Unit 315 voted vote content area setting unit 316 voted vote position calculating unit 317 vote data obtaining unit 318 voted publication unit 331 voted parameter storage unit 332 electronic vote data storage unit 400 encryption device 401 image reading unit 402 area setting unit 403 Pseudorandom number generation unit 404 Position calculation unit 405 Hash value calculation unit 406 Weight correspondence unit 407 Embedding unit 700 Electronic voting medium 701 Time acquisition unit 702 Vote identification code creation unit 703 Vote identification code output unit 704 Vote data input unit 705 Confirmation code Creation unit 706 Password creation unit 707 Vote content writing unit 708 Public key acquisition unit 709 Encryption writing unit 710 Electronic voting data output unit 711 Display unit 721 ID creation button 722 Confirmation code creation button 723 Display button 724 Vote button 731 Media parameter Storage unit 732 Voting data storage unit 733 Medium identification information storage unit 734 Connection unit 735 Display device

Claims (2)

投票の内容を書き込むための電子投票媒体であって、
電子投票媒体を識別するための媒体識別情報を記憶する媒体識別情報記憶手段と、
現在の時刻を取得する時刻取得手段と、
前記媒体識別情報記憶手段によって記憶された前記媒体識別情報と、前記時刻取得手段によって取得された時刻を含むシリアル番号とに基づいて、投票ごとに投票識別コードを作成する投票識別コード作成手段と、
前記投票識別コードのうち最新の前記投票識別コードを出力する投票識別コード出力手段と、
公開鍵が所定の方法によって書き込まれた電子投票データと、受け付けられた候補者を示す投票内容とを入力する投票データ入力手段と、
前記投票内容に対応付けて確認コードを作成する確認コード作成手段と、
前記投票内容及び前記確認コードを抽出するためのパスワードを作成するパスワード作成手段と、
前記電子投票データに、前記パスワード作成手段によって作成されたパスワードに基づいて、前記投票内容及び前記確認コードを埋め込む投票内容書込手段と、
前記投票データ入力手段によって入力された前記電子投票データから前記公開鍵を取得する公開鍵取得手段と、
前記電子投票データに、前記公開鍵取得手段によって取得された前記公開鍵に基づいて前記パスワードを暗号化して埋め込む暗号化書込手段と、
前記暗号化書込手段によって書き込まれた電子投票データを出力する電子投票データ出力手段と、
を備える電子投票媒体。
An electronic voting medium for writing the contents of a vote,
Medium identification information storage means for storing medium identification information for identifying an electronic voting medium;
Time acquisition means for acquiring the current time;
Voting identification code creating means for creating a voting identification code for each vote based on the medium identification information stored by the medium identification information storage means and a serial number including the time obtained by the time obtaining means;
Voting identification code output means for outputting the latest voting identification code among the voting identification codes;
Voting data input means for inputting electronic voting data in which a public key is written by a predetermined method, and voting contents indicating accepted candidates;
Confirmation code creating means for creating a confirmation code in association with the content of the vote;
Password creating means for creating a password for extracting the voting content and the confirmation code;
Voting content writing means for embedding the voting content and the confirmation code based on the password created by the password creating means in the electronic voting data;
Public key acquisition means for acquiring the public key from the electronic voting data input by the voting data input means;
Encrypted writing means for encrypting and embedding the password in the electronic voting data based on the public key acquired by the public key acquiring means;
Electronic voting data output means for outputting electronic voting data written by the encrypted writing means;
An electronic voting medium comprising:
前記投票内容及び前記確認コードに、前記パスワードと、前記投票識別コードとを対応付けて記憶する投票データ記憶手段と、
前記投票データ記憶手段に記憶された前記投票内容及び前記確認コードと、前記パスワードと、前記投票識別コードとを対応付けて表示する表示手段と、
をさらに備える請求項1に記載の電子投票媒体。
Voting data storage means for storing the password and the voting identification code in association with the voting content and the confirmation code;
Display means for displaying the voting content and confirmation code stored in the voting data storage means, the password, and the voting identification code in association with each other;
The electronic voting medium according to claim 1, further comprising:
JP2009260370A 2009-11-13 2009-11-13 Electronic voting media Expired - Fee Related JP5397858B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009260370A JP5397858B2 (en) 2009-11-13 2009-11-13 Electronic voting media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009260370A JP5397858B2 (en) 2009-11-13 2009-11-13 Electronic voting media

Publications (2)

Publication Number Publication Date
JP2011107842A JP2011107842A (en) 2011-06-02
JP5397858B2 true JP5397858B2 (en) 2014-01-22

Family

ID=44231260

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009260370A Expired - Fee Related JP5397858B2 (en) 2009-11-13 2009-11-13 Electronic voting media

Country Status (1)

Country Link
JP (1) JP5397858B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5453686B2 (en) * 2009-11-13 2014-03-26 学校法人神奈川大学 Encryption apparatus and method
CN106487767B (en) 2015-08-31 2020-01-21 阿里巴巴集团控股有限公司 Method and device for updating verification information

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4408356B2 (en) * 2003-08-20 2010-02-03 富士通株式会社 Electronic voting method
JP3914231B2 (en) * 2004-11-12 2007-05-16 エヌ・ティ・ティ・データ・クリエイション株式会社 Service providing system, token management method and program
JP4328768B2 (en) * 2006-01-04 2009-09-09 Necソフト株式会社 Electronic voting password authentication system and electronic voting password authentication method
JP2008250810A (en) * 2007-03-30 2008-10-16 Sato Corp Absentee voting system and absentee voting method

Also Published As

Publication number Publication date
JP2011107842A (en) 2011-06-02

Similar Documents

Publication Publication Date Title
JP4876075B2 (en) Authentication system, signature generation device, signature verification device
JP5246276B2 (en) Anonymous electronic voting system and anonymous electronic voting method
US20130028419A1 (en) System and a method for use in a symmetric key cryptographic communications
JP2005515500A (en) Secure data entry dialog using visual encryption
CN103003824A (en) Storage device and method for providing a partially-encrypted content file to a host device
JPWO2011152065A1 (en) Controller, control method, computer program, program recording medium, recording apparatus, and manufacturing method of recording apparatus
CN1956373B (en) Information processing apparatus and method, setting apparatus and method
JP6930053B2 (en) Data encryption method and system using device authentication key
JP5397858B2 (en) Electronic voting media
JP5413967B2 (en) Electronic voting system
JP2007181011A (en) Data sharing device
JP5453686B2 (en) Encryption apparatus and method
JP4918133B2 (en) Data storage method, client device, data storage system, and program
JP6348273B2 (en) Information processing system
KR100737385B1 (en) Method for transmitting key data in the wireless sensor network
CN102739656A (en) Method and system for controlling type and scale of non-host node
CN117150536B (en) Anti-counterfeiting method, device and equipment for document and readable storage medium
JP2009017437A (en) Encryption method, electronic application system, and key set generating device
CN114500037B (en) Configurable interface encryption method and device, computer equipment and storage medium
JP5792573B2 (en) Mutual authentication system and mutual authentication method
JP2008017378A (en) License issuing apparatus, license verifying apparatus, license issuing method, and program
JP2007274101A (en) Portable telephone terminal, tampering prevention system and method
JP2013076846A (en) Information encryption program, portable terminal, information protection system, and information encryption method
JP6359188B2 (en) Authentication apparatus, authentication system, and authentication method
KR101568089B1 (en) Binary data encryption and decryption method and apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130920

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131008

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131015

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees