I'm studying for an exam and answering practice questions and I would love clarification on something. Apologies if it seems really simple.
My lecture notes indicate that for ElGamal:
the ciphertext is twice the length of the plaintext.
Here is my exercise:
- the public key $y$ which is $5496$
- my chosen plaintext $m$ which is $104$
- $p$ which is $9323$ and $g$ which is $5261$
- my secret value $k$ which is $92$
These values were all supplied for the exercise so I have to work with them.
I have calculated $g^k \bmod p$ which is $8606$
I have also calculated $(y^k×m) \bmod p$ which is $3095$
Therefore, $3095$ is the ciphertext, correct?
My plaintext $m$ was $104$ which is 3 digits, and my ciphertext is only... 4?
Realistically, if the result is $\bmod p$ then $p$ is 4 digits and no result would ever be greater than that.
So is this statement not so literal? Wherein, it's not that $3095$ is twice the length of $104$, it's that $3095$ decoded from numbers to text is twice the length of $104$ decoded from numbers to text?
Therefore, if A = 0
then 104
= KE
and 3095
= DAJF
which is... twice the length.
Is this the correct theory behind the statement that the ciphertext is twice the length of the plaintext
?