2

I have noticed that in some cases 'polynomial representation' of a number is the preferred method to represent numbers in computer programs, especially those involving modular arithmetic and cryptography.

I have read that it allows to simplify the code required to implement the different arithmetic operations and thus is more comfortable to work with. Also it is claimed that polynomial form is the natural way to represent integers modulo something.

Here are my questions:

  1. Would you please elaborate on the available methods of converting between the traditional little-endian/big-endian representation of integers and their polynomial counter-parts?

  2. Why is the polynomial form a natural way to represent number modulo something ?

  3. Why does it lead to code simplification ?

Vega4
  • 121
  • 2
    Please provide an example. – mvw Aug 10 '18 at 13:33
  • 1
    @mvw; these questions stem from the following thread: https://crypto.stackexchange.com/questions/61392/questions-about-the-curve25519-donna-implementation/61397#61397 – Vega4 Aug 10 '18 at 13:46
  • Why don't you ask those question in comments to that other thread? The accepted answer given there seems clear and full enough to me. Anyway, these are not mathematics questions but algorithm and data structure questions – Somos Aug 10 '18 at 14:22
  • Samos; the answer was not enough, actually - it was excellent; and thus was accepted. I just wanted someone to elaborate more on the polynomial representations in computer's memory. I agree it involves algorithms and data structures; but those things are implemented more by guys heavily involved into mathematics rather than 'typical' programming thus my choice of the math-subsection. I've edited the question to include 'data structures' and 'algorithms' meta-tags - both of which are available in this section. – Vega4 Aug 10 '18 at 17:16
  • 1
    It seems to me that the data being represented there were elements of a finite field of characteristic two. Those are, indeed, often treated as if they were polynomials. That is necessary to get the arithmetic right. The addition in such a filed is bitwise XOR, and the multipication resembles that of polynomials (but you need to take into account the fact that the "x" is not really an indeterminate but rather a zero of a polynomial defining the field in question. Anyway, you cannot view those elements as integers because already the addition will come out wrong (due to carries). – Jyrki Lahtonen Aug 10 '18 at 20:04
  • I tried to explain this here. Not sure I succeeded because I spend a lot of time with number fields, and stop shortly after getting to the good stuff :-) – Jyrki Lahtonen Aug 10 '18 at 20:08
  • Jyrki Lahtonen, the field used by Cuve25519 is a large prime field, not one with characteristic two. I will lookup the link you've provided though:) – Vega4 Aug 10 '18 at 23:20
  • Can you give a reference to the "polynomial representation" you're speaking of? My searches give no results that look remotely relevant other than computation in nonprime finite fields. – hmakholm left over Monica Aug 16 '18 at 13:21

0 Answers0