111 reputation
1
bio website scrace.org
location United Kingdom
age 30
visits member for 2 years
seen Apr 15 '12 at 2:30

Apr
13
comment What is the correct way to generate cryptographically-secure pseudorandom numbers in C?
Thanks David. The way I have set my implementation up, I generate a key (pad) that is some arbitrary length set by the user. The user then keeps one copy of the pad and gives the other copy to the person he wants to communicate with (through a secure channel). The enciphering program then simply goes through each character of a message and adds it, mod 255, to the next unused character in the pad. The deciphering program does the reverse. So, the pad is not truly random (it is generated by /dev/random), but the program does effectively use a key that is the same length as the message.
Apr
12
comment What is the correct way to generate cryptographically-secure pseudorandom numbers in C?
Oh. Thanks David. Maybe I have misunderstood something here. So, you're saying that the defining feature of the one time pad is that the random bytes of the key are generated by some true source of randomness, as opposed to a PRNG?
Apr
12
comment What is the correct way to generate cryptographically-secure pseudorandom numbers in C?
Thanks Henrick. I have ended up going with /dev/random and it seems to work pretty well. This is on OS X.
Apr
11
comment What is the correct way to generate cryptographically-secure pseudorandom numbers in C?
I don't think so. I am looking for a CSPRNG that I can use in C. Just wondering if there is a standard for this.
Apr
11
comment What is the correct way to generate cryptographically-secure pseudorandom numbers in C?
Thanks again Henrick. I am looking into the PRNG in RC4. Do you know if /dev/random is generally considered to be cryptographically strong?
Apr
11
awarded  Student
Apr
11
comment What is the correct way to generate cryptographically-secure pseudorandom numbers in C?
Thanks for this Henrick. I know that it's not going to be a truly secure one time pad, but I am only doing this for my own education, and as a bit of fun. Do you know if there is a generally accepted CSRBG C library or algorithm that I should be looking at? Thanks.
Apr
11
asked What is the correct way to generate cryptographically-secure pseudorandom numbers in C?