Identifying the type of algorithm for a PRNG that uses modular multiplication and addition

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











up vote
4
down vote

favorite
3












GNU libc uses the following pseudo-random number generator: $$(mathitstate times 1,103,515,245) + 12,345 pmod 2^31$$ where state is the result of the previous call to the generator.



My questions are:



  1. What are PRNGs using this algorithm - possibly using different numerical
    constants - called?


  2. Assume that this generator has the maximum possible period. What is its
    period?


  3. Given the result of a call to this PRNG, show how to obtain the result of
    the previous call symbolically?


For the last question it is not required to perform any numerical
calculation.



This question was in my cryptology final-exam and I could not solve it and could not find the answer in internet, slides or books. I am really curious about the answers. I would appreciate if someone explain it to me.










share|improve this question



























    up vote
    4
    down vote

    favorite
    3












    GNU libc uses the following pseudo-random number generator: $$(mathitstate times 1,103,515,245) + 12,345 pmod 2^31$$ where state is the result of the previous call to the generator.



    My questions are:



    1. What are PRNGs using this algorithm - possibly using different numerical
      constants - called?


    2. Assume that this generator has the maximum possible period. What is its
      period?


    3. Given the result of a call to this PRNG, show how to obtain the result of
      the previous call symbolically?


    For the last question it is not required to perform any numerical
    calculation.



    This question was in my cryptology final-exam and I could not solve it and could not find the answer in internet, slides or books. I am really curious about the answers. I would appreciate if someone explain it to me.










    share|improve this question

























      up vote
      4
      down vote

      favorite
      3









      up vote
      4
      down vote

      favorite
      3






      3





      GNU libc uses the following pseudo-random number generator: $$(mathitstate times 1,103,515,245) + 12,345 pmod 2^31$$ where state is the result of the previous call to the generator.



      My questions are:



      1. What are PRNGs using this algorithm - possibly using different numerical
        constants - called?


      2. Assume that this generator has the maximum possible period. What is its
        period?


      3. Given the result of a call to this PRNG, show how to obtain the result of
        the previous call symbolically?


      For the last question it is not required to perform any numerical
      calculation.



      This question was in my cryptology final-exam and I could not solve it and could not find the answer in internet, slides or books. I am really curious about the answers. I would appreciate if someone explain it to me.










      share|improve this question















      GNU libc uses the following pseudo-random number generator: $$(mathitstate times 1,103,515,245) + 12,345 pmod 2^31$$ where state is the result of the previous call to the generator.



      My questions are:



      1. What are PRNGs using this algorithm - possibly using different numerical
        constants - called?


      2. Assume that this generator has the maximum possible period. What is its
        period?


      3. Given the result of a call to this PRNG, show how to obtain the result of
        the previous call symbolically?


      For the last question it is not required to perform any numerical
      calculation.



      This question was in my cryptology final-exam and I could not solve it and could not find the answer in internet, slides or books. I am really curious about the answers. I would appreciate if someone explain it to me.







      random-number-generator pseudo-random-generator






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 11 at 1:41









      PaÅ­lo Ebermann

      18.3k456104




      18.3k456104










      asked Aug 10 at 20:54









      Ashley Watson

      505




      505




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          6
          down vote



          accepted










          These are called Linear Congruential Generators, and their maximum period is the size of the modulus (e.g., $2^31$ in that case).



          Finding the previous value is a matter of inverting the iteration: $(textstate - 12345) cdot 1103515245^-1 bmod 2^31$.






          share|improve this answer




















            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: "281"
            ;
            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: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2fcrypto.stackexchange.com%2fquestions%2f61436%2fidentifying-the-type-of-algorithm-for-a-prng-that-uses-modular-multiplication-an%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            6
            down vote



            accepted










            These are called Linear Congruential Generators, and their maximum period is the size of the modulus (e.g., $2^31$ in that case).



            Finding the previous value is a matter of inverting the iteration: $(textstate - 12345) cdot 1103515245^-1 bmod 2^31$.






            share|improve this answer
























              up vote
              6
              down vote



              accepted










              These are called Linear Congruential Generators, and their maximum period is the size of the modulus (e.g., $2^31$ in that case).



              Finding the previous value is a matter of inverting the iteration: $(textstate - 12345) cdot 1103515245^-1 bmod 2^31$.






              share|improve this answer






















                up vote
                6
                down vote



                accepted







                up vote
                6
                down vote



                accepted






                These are called Linear Congruential Generators, and their maximum period is the size of the modulus (e.g., $2^31$ in that case).



                Finding the previous value is a matter of inverting the iteration: $(textstate - 12345) cdot 1103515245^-1 bmod 2^31$.






                share|improve this answer












                These are called Linear Congruential Generators, and their maximum period is the size of the modulus (e.g., $2^31$ in that case).



                Finding the previous value is a matter of inverting the iteration: $(textstate - 12345) cdot 1103515245^-1 bmod 2^31$.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 10 at 21:24









                Samuel Neves

                7,0972540




                7,0972540



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f61436%2fidentifying-the-type-of-algorithm-for-a-prng-that-uses-modular-multiplication-an%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay