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.
  • S Offline
    S Offline
    Slacker007
    wrote on last edited by
    #1

    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)

    D C A D C 17 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)

      D Offline
      D Offline
      DaveAuld
      wrote on last edited by
      #2

      What about grabbing a random image and then use a hash of the byte sequence as a salt value for the hash of a second randomly chosen image byte sequence, then just give up and go for a beer.

      Dave Find Me On: Web|Facebook|Twitter|LinkedIn


      Folding Stats: Team CodeProject

      S V 2 Replies Last reply
      0
      • D DaveAuld

        What about grabbing a random image and then use a hash of the byte sequence as a salt value for the hash of a second randomly chosen image byte sequence, then just give up and go for a beer.

        Dave Find Me On: Web|Facebook|Twitter|LinkedIn


        Folding Stats: Team CodeProject

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

        Why not start with the beer and forget the whole thing.

        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)

        D 1 Reply Last reply
        0
        • S Slacker007

          Why not start with the beer and forget the whole thing.

          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)

          D Offline
          D Offline
          DaveAuld
          wrote on last edited by
          #4

          Excellent idea :thumbsup:

          Dave Find Me On: Web|Facebook|Twitter|LinkedIn


          Folding Stats: Team CodeProject

          1 Reply Last reply
          0
          • D DaveAuld

            What about grabbing a random image and then use a hash of the byte sequence as a salt value for the hash of a second randomly chosen image byte sequence, then just give up and go for a beer.

            Dave Find Me On: Web|Facebook|Twitter|LinkedIn


            Folding Stats: Team CodeProject

            V Offline
            V Offline
            Vark111
            wrote on last edited by
            #5

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

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

              C Offline
              C Offline
              Chris Meech
              wrote on last edited by
              #6

              Isn't

              rand(42);

              random enough for you. :cool:

              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]

              A M 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)

                A Offline
                A Offline
                AspDotNetDev
                wrote on last edited by
                #7

                One problem would be that images often conform to standard resolutions (e.g., 640x480) or aspect ratios (e.g., 3:2).

                Somebody in an online forum wrote:

                INTJs never really joke. They make a point. The joke is just a gift wrapper.

                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)

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

                  Why not use a proper random number generator[^].

                  ------------------------------------ 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[^]

                  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)

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

                    Slacker007 wrote:

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

                    so you've built a random number generator using another random number generator ? if not, defeating your random number generator would be the simple matter of learning your image selection algorithm and processing those images first. i could generate your numbers by simply reading the images you read. or, even better, i could control your numbers by manipulating the images you'll read.

                    image processing toolkits | batch image processing

                    S I 2 Replies Last reply
                    0
                    • D Dalek Dave

                      Why not use a proper random number generator[^].

                      ------------------------------------ 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[^]

                      C Offline
                      C Offline
                      Chris Meech
                      wrote on last edited by
                      #10

                      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 J 2 Replies Last reply
                      0
                      • C Chris Losinger

                        Slacker007 wrote:

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

                        so you've built a random number generator using another random number generator ? if not, defeating your random number generator would be the simple matter of learning your image selection algorithm and processing those images first. i could generate your numbers by simply reading the images you read. or, even better, i could control your numbers by manipulating the images you'll read.

                        image processing toolkits | batch image processing

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

                        Chris Losinger wrote:

                        so you've built a random number generator using another random number generator ?

                        no. and image dump forum is a perfect example of random images, they are completely random, automatically by their nature.

                        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
                        • C Chris Losinger

                          Slacker007 wrote:

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

                          so you've built a random number generator using another random number generator ? if not, defeating your random number generator would be the simple matter of learning your image selection algorithm and processing those images first. i could generate your numbers by simply reading the images you read. or, even better, i could control your numbers by manipulating the images you'll read.

                          image processing toolkits | batch image processing

                          I Offline
                          I Offline
                          Ian Shlasko
                          wrote on last edited by
                          #12

                          Except you wouldn't need images as quickly as numbers... So the "random number generator" for the images could be six interns in a dark basement surfing the web... Uh, just don't show your boss which images are being scanned...

                          Proud to have finally moved to the A-Ark. Which one are you in?
                          Author of the Guardians Saga (Sci-Fi/Fantasy novels)

                          C 1 Reply Last reply
                          0
                          • S Slacker007

                            Chris Losinger wrote:

                            so you've built a random number generator using another random number generator ?

                            no. and image dump forum is a perfect example of random images, they are completely random, automatically by their nature.

                            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
                            #13

                            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 1 Reply Last reply
                            0
                            • I Ian Shlasko

                              Except you wouldn't need images as quickly as numbers... So the "random number generator" for the images could be six interns in a dark basement surfing the web... Uh, just don't show your boss which images are being scanned...

                              Proud to have finally moved to the A-Ark. Which one are you in?
                              Author of the Guardians Saga (Sci-Fi/Fantasy novels)

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

                              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

                              I S 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
                                Luc Pattyn
                                wrote on last edited by
                                #15

                                Oh boys, that seems a bad idea like only seasoned VBers could come up with. There are a couple of very popular image sizes, e.g. built in in pocket camera's. For one, the size often is a multiple of 100, why would you restrict your RNG seed values to that? :doh:

                                Luc Pattyn [My Articles] Nil Volentibus Arduum

                                S 1 Reply Last reply
                                0
                                • L Luc Pattyn

                                  Oh boys, that seems a bad idea like only seasoned VBers could come up with. There are a couple of very popular image sizes, e.g. built in in pocket camera's. For one, the size often is a multiple of 100, why would you restrict your RNG seed values to that? :doh:

                                  Luc Pattyn [My Articles] Nil Volentibus Arduum

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

                                  Luc Pattyn wrote:

                                  that seems a bad idea like only seasoned VBers could come up with.

                                  Luc, are you saying that I am a seasoned VBer? :-O :-\

                                  Luc Pattyn wrote:

                                  There are a couple of very popular image sizes, e.g. built in in pocket camera's. For one, the size often is a multiple of 100, why would you restrict your RNG seed values to that?

                                  yea. true. AspDotNetDev made a good point too. I am not a great computer scientist after all. :hangs_head_in_shame:

                                  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

                                    I Offline
                                    I Offline
                                    Ian Shlasko
                                    wrote on last edited by
                                    #17

                                    Then put privacy screens between them, avert your eyes, and... uh... make sure the algorithm can capture video frames too :) Oh, and hash in the exact time the image was downloaded, and have each of the computers be slightly out of sync. I'd like to see someone try to duplicate THAT! :)

                                    Proud to have finally moved to the A-Ark. Which one are you in?
                                    Author of the Guardians Saga (Sci-Fi/Fantasy novels)

                                    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)

                                      OriginalGriffO Offline
                                      OriginalGriffO Offline
                                      OriginalGriff
                                      wrote on last edited by
                                      #18

                                      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

                                      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                      S C P 3 Replies Last reply
                                      0
                                      • 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
                                          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