Consuming of entropy

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











up vote
3
down vote

favorite












When I put:



sudo watch tail /proc/sys/kernel/random/entropy_avail && dd if=/dev/random of=/dev/zero


It shows that available entropy is "consumed".



What I can't understand is:



Why does generating random consume entropy? Why does generating random bits cause that entropy to become useless?










share|improve this question









New contributor




Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    3
    down vote

    favorite












    When I put:



    sudo watch tail /proc/sys/kernel/random/entropy_avail && dd if=/dev/random of=/dev/zero


    It shows that available entropy is "consumed".



    What I can't understand is:



    Why does generating random consume entropy? Why does generating random bits cause that entropy to become useless?










    share|improve this question









    New contributor




    Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      When I put:



      sudo watch tail /proc/sys/kernel/random/entropy_avail && dd if=/dev/random of=/dev/zero


      It shows that available entropy is "consumed".



      What I can't understand is:



      Why does generating random consume entropy? Why does generating random bits cause that entropy to become useless?










      share|improve this question









      New contributor




      Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      When I put:



      sudo watch tail /proc/sys/kernel/random/entropy_avail && dd if=/dev/random of=/dev/zero


      It shows that available entropy is "consumed".



      What I can't understand is:



      Why does generating random consume entropy? Why does generating random bits cause that entropy to become useless?







      entropy






      share|improve this question









      New contributor




      Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 1 hour ago









      hunter

      2,45531428




      2,45531428






      New contributor




      Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 hours ago









      Carol

      161




      161




      New contributor




      Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Carol is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          4
          down vote














          Why generating random consumes an entropy?




          For the same reason that to generate true random bits using coin throws, one needs to throw a coin for each bit generated. Any attempt to use less throws is doomed (against a computationally unbounded adversary, or if the technique relies on few simple bit combinations).




          Why generating a random bit causes that entropy to become useless?




          Revealing a generated random bit is what makes it useless towards generating further secure random bits.



          There's a solution: generate a sufficient number of random bits (like 256 or more) and use these, exclusively, to seed a Cryptographically Secure Pseudo Random Number Generator which will supply an endless stream of bits that have all testable properties of truly random bits. That's part of the strategy of Unix's /dev/urandom






          share|improve this answer





























            up vote
            0
            down vote













            It doesn't. You're not really generating entropy. The operating system does that for you, admittedly with your help as you interact with the machine. You're actively throwing it into the bin with:-



            dd if=/dev/random of=/dev/zero


            That bit reads any entropy available from /dev/random, and throws it away by trying to overwrite 0. Although it's more common to throw stuff into /dev/null. So it's the same as tossing coins and then forgetting which way they landed.



            Try just:-



            watch cat /proc/sys/kernel/random/entropy_avail


            only, and see it grow as you update your email and send out Facebooks. The more you interact, the more entropy is accumulated, mainly from your keystrokes. You might see it go down sometimes though as the OS uses entropy for it's normal operations.



            If you do this in a seperate terminal:-



            dd if=/dev/random bs=1 iflag=fullblock | xxd


            you'll see the entropy scroll down your screen...






            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
              );



              );






              Carol is a new contributor. Be nice, and check out our Code of Conduct.









               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f62720%2fconsuming-of-entropy%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              4
              down vote














              Why generating random consumes an entropy?




              For the same reason that to generate true random bits using coin throws, one needs to throw a coin for each bit generated. Any attempt to use less throws is doomed (against a computationally unbounded adversary, or if the technique relies on few simple bit combinations).




              Why generating a random bit causes that entropy to become useless?




              Revealing a generated random bit is what makes it useless towards generating further secure random bits.



              There's a solution: generate a sufficient number of random bits (like 256 or more) and use these, exclusively, to seed a Cryptographically Secure Pseudo Random Number Generator which will supply an endless stream of bits that have all testable properties of truly random bits. That's part of the strategy of Unix's /dev/urandom






              share|improve this answer


























                up vote
                4
                down vote














                Why generating random consumes an entropy?




                For the same reason that to generate true random bits using coin throws, one needs to throw a coin for each bit generated. Any attempt to use less throws is doomed (against a computationally unbounded adversary, or if the technique relies on few simple bit combinations).




                Why generating a random bit causes that entropy to become useless?




                Revealing a generated random bit is what makes it useless towards generating further secure random bits.



                There's a solution: generate a sufficient number of random bits (like 256 or more) and use these, exclusively, to seed a Cryptographically Secure Pseudo Random Number Generator which will supply an endless stream of bits that have all testable properties of truly random bits. That's part of the strategy of Unix's /dev/urandom






                share|improve this answer
























                  up vote
                  4
                  down vote










                  up vote
                  4
                  down vote










                  Why generating random consumes an entropy?




                  For the same reason that to generate true random bits using coin throws, one needs to throw a coin for each bit generated. Any attempt to use less throws is doomed (against a computationally unbounded adversary, or if the technique relies on few simple bit combinations).




                  Why generating a random bit causes that entropy to become useless?




                  Revealing a generated random bit is what makes it useless towards generating further secure random bits.



                  There's a solution: generate a sufficient number of random bits (like 256 or more) and use these, exclusively, to seed a Cryptographically Secure Pseudo Random Number Generator which will supply an endless stream of bits that have all testable properties of truly random bits. That's part of the strategy of Unix's /dev/urandom






                  share|improve this answer















                  Why generating random consumes an entropy?




                  For the same reason that to generate true random bits using coin throws, one needs to throw a coin for each bit generated. Any attempt to use less throws is doomed (against a computationally unbounded adversary, or if the technique relies on few simple bit combinations).




                  Why generating a random bit causes that entropy to become useless?




                  Revealing a generated random bit is what makes it useless towards generating further secure random bits.



                  There's a solution: generate a sufficient number of random bits (like 256 or more) and use these, exclusively, to seed a Cryptographically Secure Pseudo Random Number Generator which will supply an endless stream of bits that have all testable properties of truly random bits. That's part of the strategy of Unix's /dev/urandom







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 50 mins ago

























                  answered 1 hour ago









                  fgrieu

                  73.2k6149310




                  73.2k6149310




















                      up vote
                      0
                      down vote













                      It doesn't. You're not really generating entropy. The operating system does that for you, admittedly with your help as you interact with the machine. You're actively throwing it into the bin with:-



                      dd if=/dev/random of=/dev/zero


                      That bit reads any entropy available from /dev/random, and throws it away by trying to overwrite 0. Although it's more common to throw stuff into /dev/null. So it's the same as tossing coins and then forgetting which way they landed.



                      Try just:-



                      watch cat /proc/sys/kernel/random/entropy_avail


                      only, and see it grow as you update your email and send out Facebooks. The more you interact, the more entropy is accumulated, mainly from your keystrokes. You might see it go down sometimes though as the OS uses entropy for it's normal operations.



                      If you do this in a seperate terminal:-



                      dd if=/dev/random bs=1 iflag=fullblock | xxd


                      you'll see the entropy scroll down your screen...






                      share|improve this answer
























                        up vote
                        0
                        down vote













                        It doesn't. You're not really generating entropy. The operating system does that for you, admittedly with your help as you interact with the machine. You're actively throwing it into the bin with:-



                        dd if=/dev/random of=/dev/zero


                        That bit reads any entropy available from /dev/random, and throws it away by trying to overwrite 0. Although it's more common to throw stuff into /dev/null. So it's the same as tossing coins and then forgetting which way they landed.



                        Try just:-



                        watch cat /proc/sys/kernel/random/entropy_avail


                        only, and see it grow as you update your email and send out Facebooks. The more you interact, the more entropy is accumulated, mainly from your keystrokes. You might see it go down sometimes though as the OS uses entropy for it's normal operations.



                        If you do this in a seperate terminal:-



                        dd if=/dev/random bs=1 iflag=fullblock | xxd


                        you'll see the entropy scroll down your screen...






                        share|improve this answer






















                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          It doesn't. You're not really generating entropy. The operating system does that for you, admittedly with your help as you interact with the machine. You're actively throwing it into the bin with:-



                          dd if=/dev/random of=/dev/zero


                          That bit reads any entropy available from /dev/random, and throws it away by trying to overwrite 0. Although it's more common to throw stuff into /dev/null. So it's the same as tossing coins and then forgetting which way they landed.



                          Try just:-



                          watch cat /proc/sys/kernel/random/entropy_avail


                          only, and see it grow as you update your email and send out Facebooks. The more you interact, the more entropy is accumulated, mainly from your keystrokes. You might see it go down sometimes though as the OS uses entropy for it's normal operations.



                          If you do this in a seperate terminal:-



                          dd if=/dev/random bs=1 iflag=fullblock | xxd


                          you'll see the entropy scroll down your screen...






                          share|improve this answer












                          It doesn't. You're not really generating entropy. The operating system does that for you, admittedly with your help as you interact with the machine. You're actively throwing it into the bin with:-



                          dd if=/dev/random of=/dev/zero


                          That bit reads any entropy available from /dev/random, and throws it away by trying to overwrite 0. Although it's more common to throw stuff into /dev/null. So it's the same as tossing coins and then forgetting which way they landed.



                          Try just:-



                          watch cat /proc/sys/kernel/random/entropy_avail


                          only, and see it grow as you update your email and send out Facebooks. The more you interact, the more entropy is accumulated, mainly from your keystrokes. You might see it go down sometimes though as the OS uses entropy for it's normal operations.



                          If you do this in a seperate terminal:-



                          dd if=/dev/random bs=1 iflag=fullblock | xxd


                          you'll see the entropy scroll down your screen...







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 55 mins ago









                          Paul Uszak

                          6,00511332




                          6,00511332




















                              Carol is a new contributor. Be nice, and check out our Code of Conduct.









                               

                              draft saved


                              draft discarded


















                              Carol is a new contributor. Be nice, and check out our Code of Conduct.












                              Carol is a new contributor. Be nice, and check out our Code of Conduct.











                              Carol is a new contributor. Be nice, and check out our Code of Conduct.













                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f62720%2fconsuming-of-entropy%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Comments

                              Popular posts from this blog

                              What does second last employer means? [closed]

                              Installing NextGIS Connect into QGIS 3?

                              One-line joke