Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Random numbers (emphasis on seeding the number)

Random numbers (emphasis on seeding the number)

Scheduled Pinned Locked Moved The Lounge
cryptographylounge
72 Posts 25 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Chris Losinger

    Slacker007 wrote:

    they are completely random, automatically by their nature.

    then i just need to read the same image stream you do, before you do it, and i can predict your number stream. or, i can take over that image stream and feed it images that will control your number stream. (for some reason, i'm assuming you want cryptographically-secure random numbers)

    image processing toolkits | batch image processing

    S Offline
    S Offline
    Slacker007
    wrote on last edited by
    #19

    Chris Losinger wrote:

    then i just need to read the same image stream you do, before you do it, and i can predict your number stream.
     
    or, i can take over that image stream and feed it images that will control your number stream.

    but the algorithm...you don't know. The image dump is constantly being refreshed and manipulated by members, every second. it would be impossible for you to do this...in this scenario...I would think. you could feed images all day and night, I'm going to pick the next image (which is a random image) and carry on the process. [edit] the image I grab is the next one in the cue, whether it is your image or 500K others.

    Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
    "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

    C N 2 Replies Last reply
    0
    • OriginalGriffO OriginalGriff

      I suspect this has been posted before (in fact I'm sure it has) but it is relevant: Random Number[^]

      Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

      S Offline
      S Offline
      Slacker007
      wrote on last edited by
      #20

      :)

      Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
      "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

      1 Reply Last reply
      0
      • C Chris Losinger

        Ian Shlasko wrote:

        six interns in a dark basement surfing the web

        people are never random. those interns would show patterns, preferences. even better, they could be replaced by people who would choose specific images.

        image processing toolkits | batch image processing

        S Offline
        S Offline
        Slacker007
        wrote on last edited by
        #21

        Chris Losinger wrote:

        people are never random. those interns would show patterns, preferences. even better, they could be replaced by people who would choose specific images.

        very true. people, by nature, are predictable.

        Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
        "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          I suspect this has been posted before (in fact I'm sure it has) but it is relevant: Random Number[^]

          Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

          C Offline
          C Offline
          clientSurfer
          wrote on last edited by
          #22

          OriginalGriff wrote:

          I suspect this has been posted before (in fact I'm sure it has) but it is relevant

          heheh I love how the entire CP lounge is now walking on eggshells so as not to get crucified for a repost... :laugh:

          "... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute  "...who gives a tinker's cuss?" - Dalek Dave  "Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon   It's plain that they do not yet know what true fear really is. - JSOP 2011

          1 Reply Last reply
          0
          • S Slacker007

            Chris Losinger wrote:

            then i just need to read the same image stream you do, before you do it, and i can predict your number stream.
             
            or, i can take over that image stream and feed it images that will control your number stream.

            but the algorithm...you don't know. The image dump is constantly being refreshed and manipulated by members, every second. it would be impossible for you to do this...in this scenario...I would think. you could feed images all day and night, I'm going to pick the next image (which is a random image) and carry on the process. [edit] the image I grab is the next one in the cue, whether it is your image or 500K others.

            Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
            "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

            C Offline
            C Offline
            Chris Losinger
            wrote on last edited by
            #23

            Slacker007 wrote:

            but the algorithm...you don't know.

            as you've described, it's: 1. get an image from a stream. 2. use its dimensions as the seed to a random number generator. so i need to find: 1. your stream (sniff your IP traffic) 2. which random number generator you're using. (try all the common random number generators)

            Slacker007 wrote:

            the image I grab is the next one in the cue, whether it is your image or 500K others.

            if i want control bad enough, all of them will be my images. and you won't know it. but, your scheme already depends on you having a random number generator. so, if you don't trust rand(time()), get a better RNG. that's much easier than creating a machine to generate random seeds.

            image processing toolkits | batch image processing

            S 1 Reply Last reply
            0
            • C Chris Losinger

              Slacker007 wrote:

              but the algorithm...you don't know.

              as you've described, it's: 1. get an image from a stream. 2. use its dimensions as the seed to a random number generator. so i need to find: 1. your stream (sniff your IP traffic) 2. which random number generator you're using. (try all the common random number generators)

              Slacker007 wrote:

              the image I grab is the next one in the cue, whether it is your image or 500K others.

              if i want control bad enough, all of them will be my images. and you won't know it. but, your scheme already depends on you having a random number generator. so, if you don't trust rand(time()), get a better RNG. that's much easier than creating a machine to generate random seeds.

              image processing toolkits | batch image processing

              S Offline
              S Offline
              Slacker007
              wrote on last edited by
              #24

              all great points but how would you know what my random number is, this second? You are assuming that you have control over everything I see and do. Have you ever seen an image dump, such as 4chan? How would you control that?

              Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
              "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

              C 1 Reply Last reply
              0
              • S Slacker007

                A thought came to me today about random seed generation. I googlied a bit but found nothing (using image data)...still could be there. You have a series of images. you count the pixels and use that as your random seed. Delete the image. The images are constantly being replenished by new images of all shapes and sizes and formats from the internet or scanned in or whatever. I would "think", that if the images were gathered...at random...with no care at all, the seed value would be random and not predictable. I am not a crypto guru so you can laugh all you want. :)

                Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                P Offline
                P Offline
                peterchen
                wrote on last edited by
                #25

                It's not to far off. Moren random generators used for cryptography accumulate "randomness" from a variety of sources, and are rather resilent against injection of non-random data. For diving into a confusingly fascinating read, see maybe start here[^].

                FILETIME to time_t
                | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                S 1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  I suspect this has been posted before (in fact I'm sure it has) but it is relevant: Random Number[^]

                  Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

                  P Offline
                  P Offline
                  peterchen
                  wrote on last edited by
                  #26

                  Twice a day - it's getting out of hand.

                  FILETIME to time_t
                  | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                  1 Reply Last reply
                  0
                  • S Slacker007

                    all great points but how would you know what my random number is, this second? You are assuming that you have control over everything I see and do. Have you ever seen an image dump, such as 4chan? How would you control that?

                    Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                    "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                    C Offline
                    C Offline
                    Chris Losinger
                    wrote on last edited by
                    #27

                    Slacker007 wrote:

                    all great points but how would you know what my random number is, this second?

                    maybe i can't. but if there's no way i can know it, you might not need a super-complex cryptographically-secure RNG. no need to protect yourself from something that's impossible, after all. so, i've been assuming i can know it.

                    Slacker007 wrote:

                    You are assuming that you have control over everything I see and do. Have you ever seen an image dump, such as 4chan?

                    sure. but what if i redirect your IP traffic to my own servers when you pull your images ?

                    image processing toolkits | batch image processing

                    S 1 Reply Last reply
                    0
                    • C Chris Losinger

                      Slacker007 wrote:

                      all great points but how would you know what my random number is, this second?

                      maybe i can't. but if there's no way i can know it, you might not need a super-complex cryptographically-secure RNG. no need to protect yourself from something that's impossible, after all. so, i've been assuming i can know it.

                      Slacker007 wrote:

                      You are assuming that you have control over everything I see and do. Have you ever seen an image dump, such as 4chan?

                      sure. but what if i redirect your IP traffic to my own servers when you pull your images ?

                      image processing toolkits | batch image processing

                      S Offline
                      S Offline
                      Slacker007
                      wrote on last edited by
                      #28

                      Chris Losinger wrote:

                      but what if i redirect your HTTP requests to my own servers when you pull your images ?

                      I'm not a web dev but I'm sure there would be a tell that I could right code for to handle this. The second you redirect, my system goes dark and locks up. Just a thought.

                      Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                      "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                      1 Reply Last reply
                      0
                      • P peterchen

                        It's not to far off. Moren random generators used for cryptography accumulate "randomness" from a variety of sources, and are rather resilent against injection of non-random data. For diving into a confusingly fascinating read, see maybe start here[^].

                        FILETIME to time_t
                        | FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy

                        S Offline
                        S Offline
                        Slacker007
                        wrote on last edited by
                        #29

                        yeah but there are so many warnings and tags for this article that question it's origins, purpose, and authenticity that I have to suspect it completely.

                        Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                        "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                        P 1 Reply Last reply
                        0
                        • V Vark111

                          But how would you seed the random generator to pick the random image?

                          S Offline
                          S Offline
                          Slacker007
                          wrote on last edited by
                          #30

                          Vark111 wrote:

                          But how would you seed the random generator to pick the random image?

                          you wouldn't. the random image is determined by the internet users of the world. Think image dumps such as 4chan.

                          Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                          "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                          1 Reply Last reply
                          0
                          • S Slacker007

                            A thought came to me today about random seed generation. I googlied a bit but found nothing (using image data)...still could be there. You have a series of images. you count the pixels and use that as your random seed. Delete the image. The images are constantly being replenished by new images of all shapes and sizes and formats from the internet or scanned in or whatever. I would "think", that if the images were gathered...at random...with no care at all, the seed value would be random and not predictable. I am not a crypto guru so you can laugh all you want. :)

                            Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                            "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                            J Offline
                            J Offline
                            jschell
                            wrote on last edited by
                            #31

                            Slacker007 wrote:

                            I would "think", that if the images were gathered...at random

                            So you generate a random number based on gathering images randomly from some source. Do you see any circles there?

                            S 1 Reply Last reply
                            0
                            • C Chris Meech

                              The capacity is limited to only three numbers (2,3 and 6). How's that random? ;P

                              Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                              D Offline
                              D Offline
                              Dalek Dave
                              wrote on last edited by
                              #32

                              Perform a series of rolls, apply a scalar algorythm et voilà.

                              ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

                              D 1 Reply Last reply
                              0
                              • J jschell

                                Slacker007 wrote:

                                I would "think", that if the images were gathered...at random

                                So you generate a random number based on gathering images randomly from some source. Do you see any circles there?

                                S Offline
                                S Offline
                                Slacker007
                                wrote on last edited by
                                #33

                                jschell wrote:

                                Do you see any circles there?

                                do you because I don't. The images are random by nature. I don't create the randomness in that, the internet does. I use that natural randomness of the images to seed my random number. The only thing I am creating is the final random number.

                                Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                                S J 2 Replies Last reply
                                0
                                • S Slacker007

                                  A thought came to me today about random seed generation. I googlied a bit but found nothing (using image data)...still could be there. You have a series of images. you count the pixels and use that as your random seed. Delete the image. The images are constantly being replenished by new images of all shapes and sizes and formats from the internet or scanned in or whatever. I would "think", that if the images were gathered...at random...with no care at all, the seed value would be random and not predictable. I am not a crypto guru so you can laugh all you want. :)

                                  Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                  "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #34

                                  I don't understand why you are obtaining a random value and then using it as a seed. If you have your random value just scale it appropriately. But the real problem is you did not find a random value. You found what appears to be random (in some cases). Your results would deffinately skew at certain times. The key to generating a true random value is the sampling. The reason for this is you can not prove any real world cases of randomness. And even if somehow you proved something existed randomly, you would still have to be able to randomly sample it, because even random sequences can have partial patterns. This is even more true when it comes to Analog to Digital conversion, because it is broken down into patterns (Fourier Series), so false patterns are created in even true random numbers. 023407430812063204 Random number is next. 0323017302120932 You can guess the next number right? So what is a perfect random generator? Well it in a way is like a perfect engine. It simply can't exist. You can get closer and closer and closer. But someone else can get closer and break the encryption predicting your value.

                                  Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                                  S 1 Reply Last reply
                                  0
                                  • S Slacker007

                                    Chris Losinger wrote:

                                    then i just need to read the same image stream you do, before you do it, and i can predict your number stream.
                                     
                                    or, i can take over that image stream and feed it images that will control your number stream.

                                    but the algorithm...you don't know. The image dump is constantly being refreshed and manipulated by members, every second. it would be impossible for you to do this...in this scenario...I would think. you could feed images all day and night, I'm going to pick the next image (which is a random image) and carry on the process. [edit] the image I grab is the next one in the cue, whether it is your image or 500K others.

                                    Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                    "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                                    N Offline
                                    N Offline
                                    Nagy Vilmos
                                    wrote on last edited by
                                    #35

                                    Slacker007 wrote:

                                    but the algorithm...you don't know.

                                    A key point of the strongest algorithms out there is that the way they work is immaterial. The strength, and security, is in the randomness of the source. Any two people picking the same image must, by definition, be generating the same key. BTW how will your Bob know which image you are using to generate the key?


                                    Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

                                    S 1 Reply Last reply
                                    0
                                    • L Lost User

                                      I don't understand why you are obtaining a random value and then using it as a seed. If you have your random value just scale it appropriately. But the real problem is you did not find a random value. You found what appears to be random (in some cases). Your results would deffinately skew at certain times. The key to generating a true random value is the sampling. The reason for this is you can not prove any real world cases of randomness. And even if somehow you proved something existed randomly, you would still have to be able to randomly sample it, because even random sequences can have partial patterns. This is even more true when it comes to Analog to Digital conversion, because it is broken down into patterns (Fourier Series), so false patterns are created in even true random numbers. 023407430812063204 Random number is next. 0323017302120932 You can guess the next number right? So what is a perfect random generator? Well it in a way is like a perfect engine. It simply can't exist. You can get closer and closer and closer. But someone else can get closer and break the encryption predicting your value.

                                      Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                                      S Offline
                                      S Offline
                                      Slacker007
                                      wrote on last edited by
                                      #36

                                      Collin Jasnoch wrote:

                                      If you have your random value just scale it appropriately.

                                      good point. I have thought of this. If you pick your image from a random line up on the net, then your data would be random. I have no control of the seed value; it is random. It is not derived from a function or time or anything. For all I know, the image is of someone passed out on the floor and was uploaded by a horny teenager. who knows, it's completely random. My understanding of the meaning of random is that it happens naturally. I have no control over what value I grab at any given second of the day.

                                      Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                      "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                                      L 1 Reply Last reply
                                      0
                                      • N Nagy Vilmos

                                        Slacker007 wrote:

                                        but the algorithm...you don't know.

                                        A key point of the strongest algorithms out there is that the way they work is immaterial. The strength, and security, is in the randomness of the source. Any two people picking the same image must, by definition, be generating the same key. BTW how will your Bob know which image you are using to generate the key?


                                        Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

                                        S Offline
                                        S Offline
                                        Slacker007
                                        wrote on last edited by
                                        #37

                                        Nagy Vilmos wrote:

                                        Any two people picking the same image must, by definition, be generating the same key.

                                        No two people would ever pick the same image. You would have no idea what image I am grabbing because, I don't even know the image I am grabbing. Do see my replys about image dumps such as 4chan. The randomness of the images is based on the natural random selection process of the internet. I feel that the internet has become as random as nature itself. Out there, I know, but thoughts that this old mind thinks about from time to time.

                                        Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                        "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                                        1 Reply Last reply
                                        0
                                        • S Slacker007

                                          Collin Jasnoch wrote:

                                          If you have your random value just scale it appropriately.

                                          good point. I have thought of this. If you pick your image from a random line up on the net, then your data would be random. I have no control of the seed value; it is random. It is not derived from a function or time or anything. For all I know, the image is of someone passed out on the floor and was uploaded by a horny teenager. who knows, it's completely random. My understanding of the meaning of random is that it happens naturally. I have no control over what value I grab at any given second of the day.

                                          Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                          "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                                          L Offline
                                          L Offline
                                          Lost User
                                          wrote on last edited by
                                          #38

                                          Slacker007 wrote:

                                          For all I know, the image is of someone passed out on the floor and was uploaded by a horny teenager. who knows, it's completely random.

                                          That is someone the point. You have no control over it. That however does not make it random. Take the traditionally used seed, the clock. Certainly not random. However it makes for a great seed to generate psuedo randomness. To crack it is easy of course. As it is based off a known cyclical behavior, is are most random generators. They are not random in their source but actually how they sample. Your source is by no means random. Think of it this way, most people of specific age groups use the internet at their convenient times. Has to do with how each age group lives their lives etc. It is by no means random though. For example in your time zone at 2AM the probability of finding a person of age 50 online is lower than finding someone of age 22. (I am just assuming this but hopefully you see the point). The same is true for types of people. A person at 2AM will be accessing one image where as someone at 2PM will likely access a different type of image. I am not saying I know the pattern. I am saying there is deffinately one there, you just don't see it right now. A computer however will find it, eventually.

                                          Slacker007 wrote:

                                          My understanding of the meaning of random is that it happens naturally. I have no control over what value I grab at any given second of the day.

                                          It does not happen naturally. It simply does not happen. We live in a world of cause and effect. If something 'appears' to be random, you are missing some data points.

                                          Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                                          S 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups