# In layman's terms, how does homomorphic encryption work? \[Edited title\]

**URL:** <https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591>\
**Category:** Factual Questions\
**Created:** [May 7, 2019, 12:10am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591 "2019-05-07T00:10:48Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [May 7, 2019, 12:10am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/1 "2019-05-07T00:10:48Z")

</div>

Microsoft announced today that they’ve developed an [open source electronic voting system](https://blogs.microsoft.com/on-the-issues/2019/05/06/protecting-democratic-elections-through-secure-verifiable-voting/) that makes use of something called “homophobic encryption” to allow tallying votes even while they remain encrypted (preserving e-voter privacy).

Am I understanding this right? How does such a thing work, and if it allows the voters to verify their ballots after casting it, doesn’t that mean anybody else could also coerce them into revealing their votes (in cases of voter intimidation, vote buying, etc.)?

---

<div class="post-metadata">

**Author:** ![FinsToTheLeft](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/finstotheleft/32/2930_2.png) [@FinsToTheLeft](https://boards.straightdope.com/u/FinsToTheLeft)\
**Post date:** [May 7, 2019, 12:14am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/2 "2019-05-07T00:14:53Z")

</div>

Minor correction - it’s homomorphic. It has nothing against same sex couples.

My quick read of the blog post is that it allows you to tally votes for the same candidate even though the encryption means that each ballot is different.

---

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [May 7, 2019, 12:41am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/3 "2019-05-07T00:41:10Z")

</div>

nm

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [May 7, 2019, 1:09am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/4 "2019-05-07T01:09:00Z")

</div>

I’m in two minds as to whether you should ask a mod to fix the title. You’re likely to get a lot more perplexed people looking at a thread about homophobic encryption.

---

<div class="post-metadata">

**Author:** ![Dewey\_Finn](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dewey_finn/32/4222_2.png) [@Dewey\_Finn](https://boards.straightdope.com/u/Dewey_Finn)\
**Post date:** [May 7, 2019, 1:10am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/5 "2019-05-07T01:10:52Z")

</div>

That’s the only reason I’m here.

---

<div class="post-metadata">

**Author:** ![wolfpup](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/wolfpup/32/10618_2.png) [@wolfpup](https://boards.straightdope.com/u/wolfpup)\
**Post date:** [May 7, 2019, 1:18am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/6 "2019-05-07T01:18:35Z")

</div>

> [@Riemann](#):
>
> I’m in two minds as to whether you should ask a mod to fix the title. You’re likely to get a lot more perplexed people looking at a thread about homophobic encryption.

At first glance I saw the title as “homophobic erection”. Which doesn’t make any sense, I know, but might be a slightly more rational word-association than “homophobic encryption”.

In defense of the OP, I’m pretty sure he was an innocent victim of auto-correct. 🙂

---

<div class="post-metadata">

**Author:** ![Chessic\_Sense](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@Chessic\_Sense](https://boards.straightdope.com/u/Chessic_Sense)\
**Post date:** [May 7, 2019, 1:32am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/7 "2019-05-07T01:32:38Z")

</div>

> [@wolfpup](#):
>
> “homophobic erection”. Which doesn’t make any sense,

Well, it can be a very confusing time for a young man.

---

<div class="post-metadata">

**Author:** ![Riemann](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/riemann/32/3133_2.png) [@Riemann](https://boards.straightdope.com/u/Riemann)\
**Post date:** [May 7, 2019, 1:36am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/8 "2019-05-07T01:36:09Z")

</div>

> [@wolfpup](#):
>
> At first glance I saw the title as “homophobic erection”. Which doesn’t make any sense…

It’s an enigma.

---

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [May 7, 2019, 1:40am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/9 "2019-05-07T01:40:13Z")

</div>

Homophobic encryption works by using ‘Westboro’ as the key.

---

<div class="post-metadata">

**Author:** ![griffin1977](https://avatars.discourse-cdn.com/v4/letter/g/977dab/32.png) [@griffin1977](https://boards.straightdope.com/u/griffin1977)\
**Post date:** [May 7, 2019, 1:53am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/10 "2019-05-07T01:53:36Z")

</div>

As a non-homophobic non-cryptologist I think it boils down to being perform operations on the encrypted keys.

So typically you get too functions, one easy:

f(plain) =\> secret

One very hard:  
f’(secret) =\> plain

Without being able to do the second operation there is nothing you can do with the secret code, its just gibberish. With homomorphic encryption you can perform operations on the encrypted values and the results will be the same doing the same operation on the plain values, then encrypting them. Specifically for the voting case, addition works, so:

secret1+secret2 =\> f(plain1+plain2)

Can’t work out the exact mechanism but this allows you to know your voted was counted without revealing anything else.

---

<div class="post-metadata">

**Author:** ![Darren\_Garrison](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/darren_garrison/32/92_2.png) [@Darren\_Garrison](https://boards.straightdope.com/u/Darren_Garrison)\
**Post date:** [May 7, 2019, 1:55am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/11 "2019-05-07T01:55:24Z")

</div>

[Not the first time this has happened](https://mobile.twitter.com/mattblaze/status/752323332209577984).

---

<div class="post-metadata">

**Author:** ![Colibri](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/colibri/32/1841_2.png) [@Colibri](https://boards.straightdope.com/u/Colibri)\
**Post date:** [May 7, 2019, 1:59am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/12 "2019-05-07T01:59:43Z")

</div>

> [@Reply](#):
>
> Microsoft announced today that they’ve developed an [open source electronic voting system](https://blogs.microsoft.com/on-the-issues/2019/05/06/protecting-democratic-elections-through-secure-verifiable-voting/) that makes use of something called “homophobic encryption” to allow tallying votes even while they remain encrypted (preserving e-voter privacy).

> [@FinsToTheLeft](#):
>
> Minor correction - it’s homomorphic. It has nothing against same sex couples.

I think that’s more than minor. I fixed the thread title.

> [@Riemann](#):
>
> I’m in two minds as to whether you should ask a mod to fix the title. You’re likely to get a lot more perplexed people looking at a thread about homophobic encryption.

I originally opened the thread to remind people not to post joke answers, but was too late.

Anyway, let’s try to answer the intended question.

Colibri  
General Questions Moderator

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [May 7, 2019, 4:21am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/13 "2019-05-07T04:21:29Z")

</div>

:smack:

---

<div class="post-metadata">

**Author:** ![borschevsky](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@borschevsky](https://boards.straightdope.com/u/borschevsky)\
**Post date:** [May 7, 2019, 5:38am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/14 "2019-05-07T05:38:35Z")

</div>

Numberphile has a short [YouTube video](https://youtu.be/BYRTvoZ3Rho) about it, starring the R from RSA encryption. The idea is that the votes are encrypted, and made public. Individual votes can’t be deciphered, but the total tally can be verified by anyone.

---

<div class="post-metadata">

**Author:** ![Tim\_T-Bonham.net](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@Tim\_T-Bonham.net](https://boards.straightdope.com/u/Tim_T-Bonham.net)\
**Post date:** [May 7, 2019, 9:36pm UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/15 "2019-05-07T21:36:06Z")

</div>

> [@FinsToTheLeft](#):
>
> Minor correction - it’s homomorphic. It has nothing against same sex couples.

Homophobic is an irrational fear of a GLBT person – doesn’t have to be a couple. \<nitpick\<

> [@wolfpup](#):
>
> At first glance I saw the title as “homophobic erection”. Which doesn’t make any sense, I know …

Actually, it does.  
There have been a number of studies that show that the loudest homophobes have definite physical reactions to gay porn.

Something I find easy to believe, given the regular stories of some homophobic leader being caught in bed with their aide/campaign worker/ altar boy/ choir director etc. Like Shakespeare said, methinks he doth protest too much. Gets to the point where when you see a big condemnation of gay peope by a leader, you wonder how long it will be before he’s caught out.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [May 7, 2019, 11:42pm UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/16 "2019-05-07T23:42:28Z")

</div>

[Moderating]  
Now that we’ve clarified that the actual topic of discussion here has nothing to do with human sexuality, let’s drop that accidental hijack entirely.

---

<div class="post-metadata">

**Author:** ![Melbourne](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Melbourne](https://boards.straightdope.com/u/Melbourne)\
**Post date:** [May 8, 2019, 9:23am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/17 "2019-05-08T09:23:01Z")

</div>

> [@Reply](#):
>
> if it allows the voters to verify their ballots after casting it, doesn’t that mean anybody else could also coerce them into revealing their votes (in cases of voter intimidation, vote buying, etc.)?

Yes, but I think one of the intended uses does not allow voters to verify their ballots: what it does is allow auditors to compare electronic records to the originating pieces of paper.

With an existing voting system, there is a disconnect between the final total (60/40) and the original ballot papers: the only comparison you can make is by recounting all of them. In the suggested system, you can take the 60/40 vote, and drill down to one (anonymous) ballot paper, and see if it was recorded correctly.

Overall, I’ve no idea if this is a good idea, but it does address a real problem with voting: when you get big, it’s easy to miscount/loose information in the intermediate stages. You have to be very careful at every level.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [May 8, 2019, 11:56am UTC](https://boards.straightdope.com/t/in-laymans-terms-how-does-homomorphic-encryption-work-edited-title/833591/18 "2019-05-08T11:56:00Z")

</div>

> [@Reply](#):
>
> … and if it allows the voters to verify their ballots after casting it, doesn’t that mean anybody else could also coerce them into revealing their votes (in cases of voter intimidation, vote buying, etc.)?

The linked video explains that, inside the polling booth you can decrypt your ballot to validate it but the ballot is then _canceled_. After you’ve done this a few times to verify the system is working as expected, you cast a final ballot _without_ verification.

IIRC another proposed voting system (though not homomorphic) operated by giving you multiple receipts (e.g. M receipts if there are M different candidates?). You could show all the receipts to the vote buyer, but only you would remember which one was the correct one.
