0
$\begingroup$

Looking for the number of characters that can be encrypted using the The elliptic curve ElGamal cryptosystem of each block, I found these lines. But I cannot understand them:

Actually in our case we need to divide into an even number of blocks. If we think in a character as a number < 256 (its ASCII code) and we employ $\mathbb{F}_p$ as a field then we can encode at most $\log_ {256} (p)$ characters in each block.

What does the notation $\log_{256} (p)$ mean?

I would like an explanation by real examples.

$\endgroup$
  • 1
    $\begingroup$ 1) Why would you use ElGamal over ECIES? It's already dubious choice for short messages, but using ElGamal in an ECB like mode on long messages is plain insane. 2) AFAIK ElGamal needs padding to be secure, so you can't fill the whole block with actual data. $\endgroup$ – CodesInChaos Nov 18 '14 at 18:23
  • $\begingroup$ I am in my research I needed to compare some of the algorithms in terms of speed. $\endgroup$ – Mhsz Nov 18 '14 at 18:27
  • $\begingroup$ Excuse you. I hold is intended to be the largest value can be represented in ASCII is <256 Rather in range from 00 to 255. Is this true or not. Thank's Mr owlstead . $\endgroup$ – Mhsz Nov 18 '14 at 19:12
1
$\begingroup$

First: use rather ECIES or some other IND-CCA2 safe variant.

If this is a theoretical question you need to know, that any plaintext (a number) must be smaller than $p$. To reach this the bitlength $log_2(m)$ must be smaller than the bitlength $log_2(p)$. Now you can only encode the data as bytes(256 values), so we are switching from base 2 to base 256 and hence $msglen=log_{256}(m)<log_{256}(p)$.

I hope that answers your question (although a bit late)

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.