{"id":37,"date":"2023-01-26T18:01:32","date_gmt":"2023-01-27T01:01:32","guid":{"rendered":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/?p=37"},"modified":"2023-01-29T16:07:59","modified_gmt":"2023-01-29T23:07:59","slug":"integration-of-homomorphic-encryption-to-the-voting-system","status":"publish","type":"post","link":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/2023\/01\/26\/integration-of-homomorphic-encryption-to-the-voting-system\/","title":{"rendered":"Integration of homomorphic encryption to the voting system\u00a0\u00a0"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Group: Mehedi Hasan, Jagadeesh Somepalli, Prajwal Thippeswamy, Moein Ghavi<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Introduction<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Every day, we need to encounter a lot of sensitive and valuable digital data that needs to be encrypted when it is being transmitted from source to destination so that, eavesdroppers can\u2019t extract the information during the transmission. At the same time, we need to encrypt data saving on the cloud for any organization.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, we must decrypt those data prior to use for any project. As soon as, we decrypt data it becomes vulnerable to hackers. This is an ongoing issue for data encryption.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Homomorphic encryption is an advancement in the era of cryptography.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">What is Homomorphic Encryption?<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">The main purpose of homomorphic encryption is to allow computation on encrypted data. In that way, data can remain encrypted while it is processed. In any vulnerable environment, homomorphic encryption is a revolutionary algorithm to accomplish the task of processing encrypted sensitive data without decrypting it.<br><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A homomorphic cryptosystem is another form of public encryption in that it uses a public key to encrypt data and allows only the individual with the matching private key to access its encrypted data. However, even though it is another form of public encryption, but it uses a different algebraic system to allow a variety of computations on the encrypted data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In mathematics, homomorphism explains the transformation of one data set into another while preserving relationships between elements in both sets. This encryption method works well with integer data while using addition and multiplication as the operational functions and during that process, encrypted data can be manipulated and analyzed as though it\u2019s in plaintext format without being decrypted.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Types of Homomorphic Encryption<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">There are three types of homomorphic encryption. The primary difference between them is related to the types and frequency of mathematical operations that can be performed on the ciphertext. The three types are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Partially Homomorphic Encryption<\/li>\n\n\n\n<li>Somewhat Homomorphic Encryption<\/li>\n\n\n\n<li>Fully Homomorphic Encryption<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We will be talking about fully homomorphic encryption for the topic voting system. This encryption method can use both addition and multiplication any number of times and makes secure multi-party computation more efficient.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Enhancing Election voting system\u2019s privacy<strong><\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">There are multiple types of research are going on to use homomorphic encryption to make the democratic elections voting system more secure and transparent. For example, the Paillier encryption scheme uses addition operations and would be best suited for voting-related applications because it allows users to add up various values in an unbiased way while keeping their values private. It also allows the third party to verify the system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Normal Encryption vs Homomorphic encryption<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"664\" height=\"256\" data-src=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture1.png\" alt=\"\" class=\"wp-image-45 lazyload\" data-srcset=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture1.png 664w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture1-300x116.png 300w\" data-sizes=\"(max-width: 664px) 100vw, 664px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 664px; --smush-placeholder-aspect-ratio: 664\/256;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"674\" height=\"251\" data-src=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture2.png\" alt=\"\" class=\"wp-image-46 lazyload\" data-srcset=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture2.png 674w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture2-300x112.png 300w\" data-sizes=\"(max-width: 674px) 100vw, 674px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 674px; --smush-placeholder-aspect-ratio: 674\/251;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Simple script to simulate voting between Cat Lovers and Dog Lovers with homomorphic encryption.<\/strong>&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"704\" height=\"417\" data-src=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture3.png\" alt=\"\" class=\"wp-image-48 lazyload\" data-srcset=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture3.png 704w, https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/Picture3-300x178.png 300w\" data-sizes=\"(max-width: 704px) 100vw, 704px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 704px; --smush-placeholder-aspect-ratio: 704\/417;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Above is the screenshot of the output that the script produced.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As an input, 1 is required for CAT Lovers and 2 is required for DOG Lovers. In the above example, 3 users provide 3 votes to the program. Once the votes are provided, the votes are being counted. Votes counting is done on the encrypted value of the votes (ie., computation of homomorphic encrypted ciphers). Then the winner is calculated. Execution time is also displayed.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GitHub Repository for the source code: <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/Prajwalmithun\/homomorphic_encryption\" target=\"_blank\">https:\/\/github.com\/Prajwalmithun\/homomorphic_encryption<\/a>&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This blog attempts to give an overview of the homomorphic encryption, different types of homomorphic encryption, and how integrating this with the current voting systems enhances the privacy. Furthermore, a simulation of the voting system with homomorphic encryption is discussed to determine the winners between the Cat Lovers and the Dog Lovers.&nbsp;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Group: Mehedi Hasan, Jagadeesh Somepalli, Prajwal Thippeswamy, Moein Ghavi Introduction Every day, we need to encounter a lot of sensitive and valuable digital data that needs to be encrypted when it is being transmitted from source to destination so that, eavesdroppers can\u2019t extract the information during the transmission. At the same time, we need to &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/2023\/01\/26\/integration-of-homomorphic-encryption-to-the-voting-system\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Integration of homomorphic encryption to the voting system\u00a0\u00a0&#8220;<\/span><\/a><\/p>\n","protected":false},"author":563,"featured_media":40,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","entry"],"featured_image_src":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/photo-1540910419892-4a36d2c3266c-600x400.jpg","featured_image_src_square":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-content\/uploads\/sites\/119\/2023\/01\/photo-1540910419892-4a36d2c3266c-600x580.jpg","author_info":{"display_name":"Moein Ghavi","author_link":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/author\/moein-ghavi\/"},"_links":{"self":[{"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/users\/563"}],"replies":[{"embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":6,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/posts\/37\/revisions\/161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/media\/40"}],"wp:attachment":[{"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/jacobson-cpsc\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}