The generation of random or pseudorandom data, and the use of randomness in security protocols

learn more… | top users | synonyms

1
vote
0answers
11 views

How to Compile SSL onto Cygwin for windows? [migrated]

Below is what showed when i configured. I included all of the packages in the cygwin installer (it took me forever to tick off all the "skip" boxes) `$ ./configure Starting hydra auto configuration ...
3
votes
2answers
64 views

How can you detect an insecure, non-random token?

I know that some of PHP's random functions are insecure due to them not being completely random and are considered a bad practice. My question is how an attacker go about finding that the developer ...
1
vote
1answer
46 views

-bash: -sudo: command not found [on hold]

Some dependencies were missing when I installed THC Hydra. I found this site which directs me to install the missing package: sudo apt-get install libsvn-dev libapr1-dev libaprutil1-dev But when I ...
2
votes
1answer
42 views

Are the problems with Window's CSPRNG still an issue on modern Windows?

The paper Cryptanalysis of the Random Number Generator of the Windows Operating System describes some problematic aspects of the Windows CSPRNG. However the paper was written in 2007, and looked at ...
3
votes
2answers
109 views

What does the “period” of a random number generator measure?

What is "period" in the context of pseudo-random number generators? For example when someone says "The Mersenne Twister has a 2^19337−1 period" what does it mean? I would appreciate a simple as ...
2
votes
1answer
122 views

Should generating gpg keys ever result in an identical key to an older key?

I recently had a situation where I lost an old private key (write error; realized this too late). In regenerating keys and replacing the public keys on various sites, I noticed that the public keys ...
0
votes
1answer
88 views

is this code valid for securing passwords? [duplicate]

i was wondering if this is a secure method for a hashing password.if it is not secure please tell me what to do in order to make it secure $pass='test'//the password ...
2
votes
1answer
22 views

bin_random_table and RANDOM_BOOT_ID

The Linux kernel has a few sysctrl's related to random devices packaged in a bin_random_table (http://lxr.free-electrons.com/source/kernel/sysctl_binary.c?v=3.2): static const struct bin_table ...
17
votes
3answers
637 views

Does (online) poker require cryptographically secure randomness?

Here’s a quote from a reddit discussion: … for poker [a cryptographically secure RNG] is completely unnecessary. If you have an appropriate unpredictable seed, and you are throwing away a lot of ...
1
vote
1answer
216 views

How securely random is Oracle's java.security.SecureRandom

There was a lot of news in the past year about exploitable weaknesses in cryptography which originated from weak random number generators. In some cases it was negligence on side of the developers, in ...
10
votes
4answers
1k views

Why OpenSSL can't use /dev/random directly?

I couldn't find the answer for the reason anywhere, even the wiki page doesn't explain it. This seems like using a PRNG for seeding an another PRNG. The first one (/dev/random) may itself be seeded by ...
6
votes
7answers
843 views

Testing a hardware random number generator

The Raspberry Pi has a built in hardware random number generator but there doesn't appear to be any public documentation on the hardware, and even if there were it would be questionable (what company ...
5
votes
1answer
137 views

Can the xor of two RNG outputs ever be less secure than one of them?

Suppose I'm suspicious that one or more (pseudo)-random number generators is cryptographically flawed, perhaps even deliberately backdoored. The RNGs in this case might be either PRNG algorithms, ...
5
votes
2answers
88 views

Benefit to using PBKDF2 on key generated by RNGCryptoServiceProvider?

I have a program that generates a fixed-length 32 byte (256-bit) password using RNGCryptoService provider and then uses Rfc2898DeriveBytes on that password to arrive at an encryption key. However, to ...
12
votes
2answers
369 views

Why CSRF Token has to be a Cryptographically Strong Random number, in Double Submit Cookies method?

I was just going through the OWASP's Cheat Sheet for CSRF Prevention. In the Double Submit Cookies method, I saw this the site should generate a (cryptographically strong) pseudorandom value ...
0
votes
1answer
164 views

Can SHA-1 PRNG still create secure cipher keys?

I am concerned that a SHA-1 PRNG cannot produce an AES-256 cipher key with the expected 256 bits of security, or indeed any secure cipher key where over 165 bits of security are expected. The SHA-1 ...
0
votes
1answer
999 views

Generating a TRULY random string in PHP [duplicate]

I need to generate thousands (possibly millions) of unique codes for a client. These codes may have a monetary value, so it's vital that they are TRULY random, and that no pattern could be spotted and ...
2
votes
3answers
219 views

If the code to shuffle an array is known, is it possible for the randomized shuffle to stay secure?

I recently was looking at Poker shuffles that were hacked and made to be guessable within a reasonable degree and this was because of the weakness of the shuffles. Is it possible to make a shuffle ...
2
votes
2answers
353 views

How to generate cryptographically strong pseudorandom data very rapidly?

What's the best way to go about generating a fast stream of cryptographically strong pseudorandom data without installing uncommon packages? Drawing from /dev/urandom is far too slow. I had an idea ...
2
votes
2answers
136 views

Reducing crypto-random values to a useless entropy

Supposing I have generated random data from CryptGenRandom (or similar PRNG), at what point does futzing with the values make it not-so-random that it's useless? Or is sufficiently random in enough to ...
3
votes
4answers
439 views

What are the features of Dual EC DRBG that are lost when using a different cipher?

Due to a potential NSA backdoor, the NIST is now recommending that implementor no longer use ECC-based PRNG Dual EC DRBG. (As described in Wired.com) this PRNG has certain features such as: ...
0
votes
1answer
112 views

Can the random keys generated during handshake be guessed

During the handshaking of an SSL connection, the server sends its public key, the client generates a random password, encrypts it with the pk, and sends it back, then the server decrypts it and all is ...
24
votes
3answers
1k views

Is generating random numbers using a smartphone camera a good idea?

Forgive my ignorance on the subject, but I wish to know more and asking (stupid) questions are one way. I was reading http://www.random.org/randomness/ and this idea popped into my head (before the ...
8
votes
2answers
625 views

How does a weakness in a random number generator lead to a compromise of the entire cryptographic process?

In the news, there are several articles (here, here, and the technical point of view) which have to do with a weakness in a random number generator. The question is somewhat twofold. What symptoms do ...
1
vote
2answers
130 views

How many bytes should an authorization token have? [duplicate]

Assuming I generate random bytes with a secure PRNG, how many bytes do I need to make authorization tokens secure? Specifically, when users log in to a website, a token will be generated and stored ...
9
votes
2answers
760 views

Java SecureRandom doesn't block? How?

I know from experience that reading from /dev/random blocks when the Linux kernel entropy pool runs out of entropy. Also, I've seen many articles and blog entries stating that when running on Linux, ...
3
votes
2answers
341 views

Is mt_rand() suitable for generating a salt?

Assumed I have to following code in order to generate a random blowfish salt for saving a new password: $blowfishCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./'; $salt ...
12
votes
2answers
362 views

Correct way to get a number from 0-9 from a random byte?

If I have a good random number generator that gives me a byte of data at a time, and I want to extract a random decimal digit of 0 to 9 from that byte stream, what is the correct way to do that? At ...
4
votes
2answers
100 views

Understanding PRGs: How can we expand randomness?

I am getting a bit confused with the PRGs employed in cryptography. Basically, a PRG is used to expand a random sequence (mostly a key) of length s to a length n>s, still looking random. Now while ...
3
votes
2answers
399 views

SJCL : convert ascii to a BitArray & compute random numbers

I am using the Stanford Javascript Crypto library and i'd like more information about it. 1.) I have an ASCII text and a random 128-bit key. I want to concat those two things, so I convert the ASCII ...
16
votes
3answers
3k views

Is it appropriate to use haveged as a source of entropy on virtual machines?

While looking for solutions to entropy pool depletion on virtual machines, I came across an interesting project called haveged, which is based on the HAVEGE algorithm (HArdware Volatile Entropy ...
2
votes
1answer
171 views

isaac random number generator and the type of encryption it is used for (game packet encryption)?

I recently found isaac but I'm not sure what type of encryption is possible using it. Does the random number generator itself become the message somehow or does it get used as a seed for an encryption ...
4
votes
1answer
107 views

Tools and methods for analyzing RNGs

What are the common tools and methods used for analyzing and attacking Random Number Generators? I know what characteristics make a good RNG and what a good RNG should do but I do not know how to ...
15
votes
2answers
405 views

What statistics can be used to identify pseudorandom data?

I'm working on some code that attempts to identify files whose contents appear to be "random". As such, I'm looking for statistical measures that can be used to identify such randomness. I've ...
0
votes
1answer
526 views

Java SecureRandom generate secure random number

How to generate a secure random number bit length is 256 bits using Java. What is the different between: SecureRandom random = new SecureRandom(); and SecureRandom prng = ...
7
votes
1answer
462 views

How to predict C rand()? [duplicate]

Is there a practical way to predict previous/next C rand() output if i have some of the values? How many values do i need? Do they need to be consequent? If it depends on compiler - for which ...
8
votes
3answers
726 views

Generating random passwords by clicking randomly on the keyboard?

How secure is it to generate random strings/passwords manually for different purposes by just clicking randomly on the keyboard ? I usually need random strings for salts and for passwords, and I ...
1
vote
2answers
484 views

How to generate a highly unpredictable random bytes

void vncRandomBytes(unsigned char *bytes) { int i; unsigned int seed = (unsigned int) time(0) + getpid() + rand(); srand(seed); for (i = 0; i < CHALLENGESIZE; i++) { bytes[i] = (unsigned ...
5
votes
1answer
147 views

Detecting PRNG Use from Output

Question: Is there a way to detect the use of a PRNG strictly from observing the output provided by an application? Background: During an audit of a key generating algorithm that I knew was based on ...
5
votes
3answers
721 views

CSRF Countermeasures

I'm working through a book on web application security and it says that an effective CSRF countermeasure is to assign a temporary pseudo-random token to sensitive actions performed by authenticated ...
6
votes
2answers
501 views

Filling the disk with random data prior to encryption?

Filling the disk with random data prior to encrypting it will supposedly make it harder for the attacker to perform any cryptanalysis. Most sources seem to state this is because it will be harder for ...
2
votes
2answers
2k views

should i use urandom or openssl_random_pseudo_bytes?

I am developing a site in php 5.4 and i was wondering which is better to use to gen a random salt for password security? $salt = sha1(openssl_random_pseudo_bytes(23)); or $seed = ''; $a = ...
6
votes
2answers
517 views

How is the available entropy in /dev/random calculated (or estimated)?

It seems (to a non-expert) that /dev/random is acclaimed to be useable as a source of pure random data. However, I am curious as to the analysis of the file /dev/random. /dev/random is a collection ...
10
votes
3answers
1k views

Is a predictable MAC address a risk?

If you knew from the public internet that a certain IP address belonged to a machine with a certain MAC address, can you see any security exposure associated with that? I know that some software will ...
1
vote
0answers
51 views

Do the popular smartphone operating system have a cryptographically secure random source? [duplicate]

Possible Duplicate: Do mobile OS’s provide crypto-quality randomness? Linux and Mac OS X has /dev/urandom, Windows has CryptGenRandom. Do iOS and Android have a similar way to generate ...
-5
votes
5answers
600 views

create a variants of MD5

I have also asked similar q here : To create a variants of MD5, I made following changes : MD5 uses a non-linear sin(i)* pow(2,32) ----> i plane to use cos(i)*pow(2,32) Instead ...
4
votes
1answer
150 views

Computational Feasibility of finding 'Good Links' of the following format

I recently stumbled upon this and am checking here to see if what I am proposing is indeed feasible and can be considered a breach of privacy. For obvious reasons I am not revealing the website ...
9
votes
4answers
2k views

Generate cryptographically strong pseudorandom numbers in Javascript?

Is there any good way to generate cryptographically strong pseudorandom (or true random) numbers in Javascript? The crucial requirement: if a.com's Javascript generates some random numbers, no one ...
3
votes
4answers
516 views

SMS Authentication: random OTP or a cryptographic one

I'm adding two-factor authentication using SMS to enhance an existing login process. Since I'm not working with physical tokens, I was wondering what is considered the safest: Sending random 8 ...
3
votes
3answers
294 views

PRNG: Does combining insecure algos help?

Reading about how insecure PHP's rand function is, I was wondering if it helps to combine random functions. The suggested function there, openssl_random_pseudo_bytes, can also be cryptographically ...