Finding working modulus for FFT over finite fields

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I would like to implement multiplication of polynomials using NTT. I followed Number-theoretic transform (integer DFT) and it seems to work.



Now I would like to implement multiplication of polynomials over finite fields $mathbbZ_p[x]$ where $p$ is arbitrary prime number.



Does it changes anything that the coefficients are now bounded by $p$, compared to the former unbounded case?



In particular, original NTT required to find prime number $N$ as the working modulus that is larger than $(magnitude of largest element of input vector)^2 times (length of input vector) + 1$ so that the result never overflows. If the result is going to be bounded by modulo that $p$ prime anyway, how small can the modulus be? Note that $p - 1$ does not have to be of form $(some positive integer) * (length of input vector)$.










share|cite|improve this question

























    up vote
    1
    down vote

    favorite












    I would like to implement multiplication of polynomials using NTT. I followed Number-theoretic transform (integer DFT) and it seems to work.



    Now I would like to implement multiplication of polynomials over finite fields $mathbbZ_p[x]$ where $p$ is arbitrary prime number.



    Does it changes anything that the coefficients are now bounded by $p$, compared to the former unbounded case?



    In particular, original NTT required to find prime number $N$ as the working modulus that is larger than $(magnitude of largest element of input vector)^2 times (length of input vector) + 1$ so that the result never overflows. If the result is going to be bounded by modulo that $p$ prime anyway, how small can the modulus be? Note that $p - 1$ does not have to be of form $(some positive integer) * (length of input vector)$.










    share|cite|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I would like to implement multiplication of polynomials using NTT. I followed Number-theoretic transform (integer DFT) and it seems to work.



      Now I would like to implement multiplication of polynomials over finite fields $mathbbZ_p[x]$ where $p$ is arbitrary prime number.



      Does it changes anything that the coefficients are now bounded by $p$, compared to the former unbounded case?



      In particular, original NTT required to find prime number $N$ as the working modulus that is larger than $(magnitude of largest element of input vector)^2 times (length of input vector) + 1$ so that the result never overflows. If the result is going to be bounded by modulo that $p$ prime anyway, how small can the modulus be? Note that $p - 1$ does not have to be of form $(some positive integer) * (length of input vector)$.










      share|cite|improve this question













      I would like to implement multiplication of polynomials using NTT. I followed Number-theoretic transform (integer DFT) and it seems to work.



      Now I would like to implement multiplication of polynomials over finite fields $mathbbZ_p[x]$ where $p$ is arbitrary prime number.



      Does it changes anything that the coefficients are now bounded by $p$, compared to the former unbounded case?



      In particular, original NTT required to find prime number $N$ as the working modulus that is larger than $(magnitude of largest element of input vector)^2 times (length of input vector) + 1$ so that the result never overflows. If the result is going to be bounded by modulo that $p$ prime anyway, how small can the modulus be? Note that $p - 1$ does not have to be of form $(some positive integer) * (length of input vector)$.







      number-theory finite-fields convolution fast-fourier-transform






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Sep 10 at 18:24









      minmax

      2159




      2159

























          active

          oldest

          votes











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "69"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2912201%2ffinding-working-modulus-for-fft-over-finite-fields%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2912201%2ffinding-working-modulus-for-fft-over-finite-fields%23new-answer', 'question_page');

          );

          Post as a guest













































































          這個網誌中的熱門文章

          Why am i infinitely getting the same tweet with the Twitter Search API?

          Is there any way to eliminate the singular point to solve this integral by hand or by approximations?

          Strongly p-embedded subgroups and p-Sylow subgroups.