2
$\begingroup$

I see that all cryptosystems are work on finite field. But i consider that have any cryptosystem that works on real number (do not consider the round step and it also can be an estimate cipher)

$\endgroup$
5

2 Answers 2

4
$\begingroup$

One of the big problems in using floating-point as part of an encryption algorithm is round-off error. For more details, look at What Every Computer Scientist Should Know About Floating-Point Arithmetic and Round-off error (Wikipedia).

The basic problem is that in floating-point math, not only does round-off error occur, but you can't depend on different computers doing it consistently. Here is an example where the same source program gives different results (on the same system) depending on whether x87-based floating point (which stores numbers in a 80-bit format) was used rather than the SSE instructions (which use a more traditional 64-bit double precision float).

So to make a floating-point algorithm work, you would have to find a way of avoiding round-off error, while integers and bitstrings avoid that problem entirely.

$\endgroup$
1
  • 2
    $\begingroup$ It's not the computer that can't do round-off consistently. It's the compiler. At the assembly code level you can set which rounding mode to use if your CPU supports more than one mode. And you can be confident what floating point format is used as well. If that fails or if a CPU doesn't support floating points at all, then each floating-point operation can be "emulated" in software using integer types. (Not that many high level languages or their existing compilers make any of this easy for users. Or even support it.) But, regardless, this isn't the primary reason why float ops aren't used $\endgroup$ Apr 28, 2020 at 22:28
3
$\begingroup$

I see that all cryptosystems are work on finite field.

No. Modern [1] cryptosystems usually work on bitstrings; you give them a bitstring (possibly limited to multiples of 8 in length) as plaintext, and they give you back a bitstring of ciphertext.

They may use finite fields internally, or they might not - depends on the internals of the cipher (which users generally shouldn't have to care about)

But i consider that have any cryptosystem that works on real number

That's easy; express your real number as a bitstring, and pass the bitstring to the modern cryptosystem - problem solved.


[1]: I say 'modern' to distinguish them from historic (pre-computer) ciphers, which tended to be more typically character based.

$\endgroup$
4
  • 1
    $\begingroup$ Expressing certain real numbers as a bit string isn't an easy task. $\endgroup$ Apr 28, 2020 at 22:16
  • $\begingroup$ @FutureSecurity: if you can't express it as a bit string, how do you intend to save it in computer memory, or on a flash drive, or send it across a network? $\endgroup$
    – poncho
    Apr 29, 2020 at 11:52
  • $\begingroup$ Sorry. That was basically the point. 🙃 There's also space for some dumb joke about how even if you stored numbers in symbolic format you're still only able to express next to zero percent of real numbers even ignoring all practical limitations of computers. Edit: Oh. Wait. $\endgroup$ Apr 29, 2020 at 15:18
  • $\begingroup$ @FutureSecurity: well, yes, for any encoding, the real numbers that can be expressed in a finite symbol sequence is of measure zero (in Real Analysis terms). On the other hand, we have no practical way to compute with arbitrary real numbers with infinite precision... $\endgroup$
    – poncho
    Apr 29, 2020 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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