Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Ways to get random numbers

created by donglekey

(idea) by donglekey (5.9 y) (print)   ?   (I like it!) Sat May 26 2001 at 19:31:57

First off, why would you want random numers in the first place? Well, they are very crucial to cryptography, the most basic example being the one time pad, where random bits are created to the length of the file to be encrypted. The random bits are used to XOR to the original file to scramble it, and then you have two separate files of equal length, the encrypted file, and the key. If the numbers you have are completely random, then the one time pad is completely secure, and not even the NSA will be able to crack it. Attacks against one time pads are dependant on finding the pattern to the numbers used to encrypt it in the first place. One time pads with repeating keys (that is a key is used that is smaller than the file length, so it must repeated to encrypt the whole file) are not really one time pads and are not secure.

So now you are saying to yourself, I need random numbers bad! But how can I get truly random numbers, seeing as pseudo random number generators are not really random, and thus are insecure.

  • Redirect input from /dev/audio into a file, and blow into your microphone at the same time. I believe this will give very random numbers.

  • Use a VCR to record video fuzz. Do this by recording when no cable or antenna is hooked into the VCR. Get an RCA to 1/4" jack converter. Play the video fuzz into your sound card, and redirect it into a file.

  • Write a byte skipping program. Write a program the uses a pseudo random number generator and feed it a number of your choice. Use that number to seek a DWORD on your hard drive. Use that DWORD to seed it again, and repeat, taking eighther the DWORDS and saving them, or the pseudo random numbers.

  • If you are doing a very small encryption, flip a coin, roll some dice, something like that.


    That's all I can think of for now. But I am sure there are many more.

  • Gorgonzola says Another of the many Ways to get random numbers, I think. Get a Commodore 64 and read the output of its SID chip.

  • printable version
    chaos

    A Million Random Digits with 100,000 Normal Deviates SID /dev/random catting weird things to /dev/audio
    One Time Pad random number von Neumann corrector Commodore 64
    Emulating an n-sided die Linear congruential PRNG XOR lavarand
    Dword random number generator Analog noise lone wolf
    NSA RAND Ha-ha softlink poetry
    RCA Random Coin VCR
    Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
      Epicenter
    Login
    Password

    password reminder
    register

    Everything2 Help

    Cool Staff Picks
    Things you could have written:
    Bill Gates
    Invader ZIM
    Miss American Pie: A Century of Pizza in America
    E2 Link and Logger Client
    The Monster at the End of This Book
    green flash
    The Second Coming of Christ already happened
    Wow! signal
    SID
    Bovine Selective Visual Impairment
    9.8 m/s^2
    God slipped away quietly, during third period physics class
    Arizona-Sonora Desert Museum
    New Writeups
    waverider37
    Harold Holt(person)
    The Debutante
    Until death do us part(fiction)
    Ysardo
    a brother to a sister(personal)
    antigravpussy
    your warm whispers(personal)
    Clarke
    Multiculturalism(idea)
    aneurin
    Earl of Landaff(person)
    Heitah
    Pseudocide(idea)
    XWiz
    Google Knol(lede)
    Mythi
    July 24, 2008(personal)
    locke baron
    The fall of Earth(fiction)
    BookReader
    Fear the Cold(dream)
    Pavlovna
    Kathleen MacInnes(person)
    stainedglass
    1(fiction)
    kalen
    Three "T"s(idea)
    octillion369
    Undead(idea)
    This affordable entertainment brought to you by The Everything Development Company