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

learn more… | top users | synonyms

-2
votes
0answers
29 views

Do smartphones produce cnonce when connecting to secured networks or when logging into user accounts?

Do smartphones produce cnonce when connected to secured networks or when logging into user accounts ? I know that computers generate cnonce and use cnonce for verifying users. My question is do ...
0
votes
0answers
5 views

Exactly how bad is using 'mod' to clamp reduce numbers to a given range? [migrated]

Let's say I'm naive and want to generate a random integer in the range [0, m), so I do the following: k = cryptographically_secure_rng() % m where cryptographically_secure_rng returns a random ...
3
votes
0answers
36 views

Repeated set of UUIDs from java's UUID.randomUUID() [migrated]

We have observed that set of almost 200,000 UUIDs has replayed two months apart, and I'm wondering if anyone has seen anything similar. The UUIDs are generated using UUID.randomUUID(). In digging ...
0
votes
3answers
90 views

Access Key In URL - Securing The Unsecured!

I'm having some difficulties doing this the right way (as much as it can go). Some time ago, I've asked a question here, asking for help on how to implement sending an access link through email. ...
0
votes
1answer
48 views

Which ciphers produce random cipher text?

I already know AES produces a "random" output. 5e4e6440826d6afc4535fbf078455f791159701a9df624ddd4e4dda84523b6a7 Its cipher-text doesn't follow a pattern and is indistinguishable from noise. Is ...
3
votes
2answers
42 views

Is there any practical weakness to using MT19937 to generate passphrases?

Suppose I use MT19937 to choose random words out of (say) the Diceware word list. I know MT19937 is not considered a cryptographically secure PRNG, but Wikipedia suggests the weakness is rather ...
1
vote
1answer
36 views

What is the purpose of including time as a part of random in TLS Client & Server Hello messages? [duplicate]

RFC 5246 Section 7.4.1.2 states that the 32 bytes of random required in the Client and Server Hello messages should be 4 bytes of time and 28 bytes of random. Why can't it be 32 bytes of random? ...
5
votes
1answer
88 views

Random string vs hash(random string)?

I'm implementing a one-time token service. Each of these one-time token represents some server side data/action associated with it (a 'email confirm' action for example), so that my web service can ...
3
votes
1answer
84 views

What are the problems of using OTP encryption with TRNG?

I've programmed a simple One-Time Pad "encryptor" that can merge two files into one by using bitwise XOR. The pseudo-random key files are generated by using the CryptGenRandom() function from ...
4
votes
1answer
85 views

Is keepass random password generator fully secure and trustworthy?

Am I safe using keepass for generating passwords? For example my accounts, am I safe using a keepass generated password? Could my future keepass master-keys be safely generated in keepass? What method ...
1
vote
0answers
44 views

Token-based authentication for specific requirement

We have the following requirement for creating a token in .NET to be used in providing a challenge token and an actual authentication (auth) token. The auth token will then be used to authenticated ...
3
votes
0answers
78 views

Is there a benefit in measuring randomness? How would it be done?

Is there any benefit in determining how random a given file, stream, signal is? I guess this would be useful to determine If something is (poorly) encrypted To verify the proper encryption of a ...
2
votes
2answers
43 views

Securing a Secure Entropy Service

Many moons ago, I answered a question about Java blocking due to a lack of entropy in /dev/random. (http://security.stackexchange.com/a/53025/41709) My main suggestion was to use /dev/urandom, but I ...
5
votes
1answer
106 views

Resetting the Windows RNG

According to this research, Windows seems to produce the same sequence of random numbers indefinitely when a process is kicked off before a VM snapshot is taken. This is a huge issue obviously when ...
4
votes
1answer
67 views

Skewed Randomness

According to random.org, Any source of true randomness may contain skew towards 0 or 1 in the data I am a bit confused about what this exactly means and why this "skew" is present in all "true ...
5
votes
2answers
66 views

Two ways of generating the IV

I'm looking at some code, and in a particular scenario, the code would need to generate two IVs. The second IV-generating code simply uses the C# Rijndael GenerateIV() The first IV-generating code ...
3
votes
1answer
71 views

Defeating ROP attacks in x86

Most defense techniques against ROP revolves around randomization, such as ASLR. If I mark all regions of memory, other than the code segment, non-executable, will this defeat ROP?
4
votes
0answers
211 views

OpenSSL 0.9.6a PRNG algorithm weakness: How to exploit?

I saw an OpenSSL security advisory for Openssl 0.9.6a Recently a cryptographic flaw in OpenSSL's built-in pseudo-random number generator (PRNG) was pointed out to us by Markku-Juhani O. Saarinen ...
2
votes
0answers
46 views

TRNG from smartphone accelerometer

I hope this is not a stupid question :/ but I'm trying to generate a true random number from smartphone's accelerometer, than pass it as seed to a CSPRNG to generate true random numbers. I know that a ...
3
votes
1answer
77 views

Is Jericho Comms TRNG reliable?

I'm looking for a method to generate true random bits/numbers on smartphones. Create a custom TRNG seems to be tricky and a lot of people suggest to trust in already existing ones, widely tested and ...
1
vote
2answers
157 views

Can I rely on openssl_random_pseudo_bytes() being very random in PHP?

I came across an application which needs to generate a random token for each user. It is very important that each generated token is unique. Application code was as follows: $token = ...
4
votes
2answers
167 views

Does adding a random character to a pseudo-randomly generated password improve entropy significantly?

I'm asking a practical question. I was taught computers are bad at generating random data. Does this mean password generators, such as the one built into Keepass, suck? If yes, then would it help for ...
3
votes
1answer
504 views

Correct way to generate password salts in PHP 5.3 on Linux given my constraints?

In examining our database storage of hashed passwords with salts, I note a high rate of salt collisions, i.e., there are far too many cases where two table rows have the same salt stored. One ...
-4
votes
1answer
104 views

Hacking bad people to help a good cause [closed]

I want to hire a hacker to get emails by and between 2 people I think are participating in something unethical. It is very important that I not break any laws. A review of this site makes it appear ...
3
votes
2answers
103 views

Is a random work factor an increase or decrease of security?

Assume you use a proven hashing algorithm, like bcrypt with a work factor of 10 or PBKDF2 with 10K iterations. Normally that's really secure already and would give enough security already for most ...
0
votes
1answer
86 views

A “hardware” random number generator for mobile phone

I have been trying to write a random number generator using the hardware of the phone. After reading other people's attempts and tried some. I came up with the following to generate the seed: Play ...
4
votes
1answer
97 views

Is encrypted data a good random source?

Given that someone needs my encryption key to predict the output, can I encrypt arbitrary data (zeroes, system logs, personal photos) with AES and a secure passphrase, and use the result as a ...
3
votes
2answers
84 views

Is it secure to create a Bitcoin address from a private key generated by Rand() instead of cryptographic elliptic curve

I am writing a C++ application that creates a Bitcoin address. I am having a hard time installing openssl for windows and making it work for visual studio. So, I am asking myself, if I create a ...
5
votes
3answers
254 views

Is it worth augmenting /dev/random entropy in software?

Modern Linux systems, especially headless virtuals, often have shallow /dev/random entropy pools, which can cause software to block or fail to run (e.g. Tripwire in FIPS mode) While many agree ...
0
votes
1answer
51 views

A simple question about entropy and random data

Let's say I roll a 6-sided die 100 times and record the results into a 100 character string, for example: //this is obviously an example (and very unlikely) outcome ...
2
votes
2answers
274 views

Why does gpg use /dev/urandom [duplicate]

Looking at the strace output of GPG on my box seems to show that it uses /dev/urandom when encrypting a message without any access to /dev/random even when --no-random-seed-file is specified. Are ...
8
votes
1answer
206 views

Attacks on keys generated with low entropy

If I were to give someone a two 4096 bits keys, and say one was generated in a Linux OS with very very low entropy available, and one was generated in a Linux OS with more than enough entropy. Would ...
1
vote
2answers
349 views

Token-based authentication - what's a good token length?

What's a good token character length for a token-based login? Currently I'm using the following code: <?php $token = bin2hex(openssl_random_pseudo_bytes(16)); Is 16 sufficient or should ...
4
votes
1answer
98 views

Law of Large Numbers vs. OpenSSL RAND_bytes

I have a system where tens of thousands of users log in whenever they like and my server has to assign them to one of many databases. I would like to distribute the users evenly amongst the databases. ...
12
votes
1answer
852 views

Is Postgres's uuid_generate_v4 securely random?

I'm using Postgres's uuid_generate_v4 in a uuid primary key column to generate secure one-time authentication tokens. Is this okay? Does Postgres use a secure random number source for generating these ...
3
votes
2answers
111 views

Calculating the time required to brute force a random code

Say we have amount random entry codes of length characters from an alphabet of size alphabet. The number of possible codes is then easily calculated as keyspace = alphabet ^ length. Now take an ...
6
votes
1answer
81 views

Who can certify RNG according NIST SP800-22?

I have written my own random number generator as a C library and I tested it on NIST Statistical Test Suite. Now I would like to get a certification to have a formal proof that my C library generates ...
0
votes
0answers
40 views

Using UUIDs for non-guessable URLs [duplicate]

How safe is using UUIDs as URL identifier for non-guessable IDs? Specifically UUIDs generated by Python's uuid4() function, using base64 encoding. E.g. ...
1
vote
1answer
41 views

Can a salt maintain pseudo-randomness after being modified?

TL;DR: How much can a function (such as the one below) modify an initially random string before that string becomes useless as a salt for password hashing? Is there a general rule? # Function ...
1
vote
1answer
62 views

RDRAND in Intel Celeron CPUs under Linux

Is there any reason to believe that the hardware RNG in an Intel Celeron CPU is more unreliable than in other CPUs? Can someone confirm that what Linus Torvalds says is true, namely that Linux does ...
2
votes
1answer
84 views

Will two virtual machines running on the same physical host machine get the same value from /dev/random?

Will two virtual machines running on the same physical host machine get the same value from /dev/random if read over the same time period? Say that Virtual-machine-1 wants to generate its ssh host ...
1
vote
0answers
20 views

Evaluating a noise source for a RNG - defining a one-paramter family for RNG [closed]

I am trying to evaluate a noise-source as a means of providing entropy to a random number generator. I am running into trouble when it comes to determining the probability distribution that has the ...
2
votes
2answers
43 views

Which software RNG for linux?

A headless server can suffer from a lack of entropy, which is a problem given that encryption needs random numbers. In the absence of a hardware random number generator (RNG) the numbers must be ...
4
votes
1answer
153 views

Managing keys generated with insufficient entropy

Since the Linux RNG which provides /dev/random (and by extension /dev/urandom) is seeded by "mouse and keyboard activity, disk I/O operations, and specific interrupts" (source, PDF) and since virtual ...
2
votes
2answers
111 views

Offline RSA strong prime test similar to Phuctor?

One of the ways that RSA keys get consistently owned is when they're generated without enough entropy. Dan Kaminsky refers to a study which found that 1 in 200 RSA keys were badly generated and these ...
3
votes
1answer
386 views

What comprises the AIS-31 standard for TRNGs?

I'm researching how my smart card's chipset generates random numbers. According to a source in forums the YubiKey NEO is based on the A700x chipset from NXP. The page for the chipset indicates that ...
8
votes
1answer
387 views

Do randomized PID bring more security?

What is the concrete advantage of using random PIDs instead of traditional sequential ones? Some times ago, I've read an article in the french magazine MISC (no. 74 - July/August, 2014) publishing a ...
4
votes
1answer
62 views

Is is possible to avoid internal seeding of a RNG and seed the generator manually using OpenSSL's RAND_bytes()?

I'm trying to write a random number generator with the OpenSSL library. The provided RAND_bytes() function is self-seeding with the /dev/urandom. That's why I am only able to reseed with the ...
4
votes
2answers
134 views

Should other processes be running while an iPhone or Android is generating a cryptographically random number?

I need to generate a cryptographically secure random number on iOS and Android. I could use a software approach or leverage the built in OS API for this. In each case, is it better to generate a ...
5
votes
2answers
127 views

Linux random number compliance

Not sure if this is the right forum, and I am pretty sure that his must have been answered before (I searched a lot but I haven't found a definitive answer). Do the Linux random number generators ...