0

I was reading a paper about fully homomorphic encryption and I stumbled upon the following text:

if To encrypt a bit $m ∈ \{0,1\}$, set $m′$ to be a random N-bit number such that $ m′ = m \mod 2$.

I don't understand this. From what I understand the only two possible values of m mod 2 are 0 and 1 ? Then how can m' be generalized to a N-bit number ?

cipher
  • 207

2 Answers2

2

You misunderstand the notion

$$m'=m\text{ mod } 2$$

It doesn't mean that $m'$ is equal to $m\text{ mod } 2$. The "$ \text{mod}$" part applies to "$=$", not to "$m$". What it means is simply that $m'-m$ is divisble by $2$ (or in other words that $m'$ and $m$ give the same remainder when divided by $2$) . The author probably should've used

$$m'\equiv m\text{ mod } 2$$

but $=$ is generally acceptable as well.

freakish
  • 42,851
1

$m'$ is a random $N$ bit number with a certain final bit. All the other $N-1$ bits you are free to choose (perhaps randomly, perhaps $N$-bit means specifically that it must be between $2^{N-1}$ and $2^N$). That's all it means.

mod is not an operation. It is not the same as % in many programming languages. It's a specification of what the relation $=$ (or more correctly $\equiv$) means (i.e. if you use % on both sides, you get the same answer). It might be more intuitive to write something like $m' \equiv_2 m$, if that helps. It's not a standard notation, but it is loads better than the standard mod notation in my opinion.

Arthur
  • 199,419