Score:0

Rabin Cryptosystem: Chosen-Ciphertext Attack

jp flag

I read in literature that Rabin Cryptosystem can be broken using chosen-ciphertext attack. It is described that after chosen ciphertext is decrypted attacker can factorize public key $n$ by using square root with probability of $1/2$. But in article it is not described how this factorization is done.

If somebody can give some example I would be grateful.

kelalaka avatar
in flag
Related : [Quadratic residuosity problem reduction to integer factorization](https://crypto.stackexchange.com/q/9332/18298)
Score:1
my flag

I'll assume this is not homework.

It's actually quite simple:

  • Pick a random value $r$

  • Compute $s = r^2 \bmod n$, and submit $s$ to the Rabin decryptor

  • Since $s$ is a Quadratic Residue, the Rabin decryptor will return some value $t = \sqrt{s} \bmod n$.

  • Now, $s$ has four square roots (assuming $n$ has two prime factors and you didn't happen to pick an $r$ that's not relatively prime to $n$); if you have $t = r$ or $t = n-r$, it didn't work. If it's one of the other two possible values, then we have $r^2 = t^2 \bmod n$, that is, $(r+t)(r-t) = kn$, for some integer $k$; however neither $r+t$ nor $r-t$ are multiples of $n$, hence $\gcd(r+t, n)$ is a nontrivial factor of $n$ (and $\gcd(r-t, n)$ is another nontrivial factor).

Because we selected $r$ at random, Rabin has no way of knowing which of the four possibilities we picked; it returns one of them, and so the probability that it happens to return one that gives us the factorization is $2/4 = 0.5$

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.