Questions tagged [random]

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

Filter by
Sorted by
Tagged with
2
votes
3answers
152 views

Does the strength of a password depend on the process which generated the password?

In this question, discussing whether http://howsecureismypassword.net is safe to use, @ThomasPornin commented "Mathematically, the strength of a password depends on the process which generated the ...
-2
votes
3answers
202 views

How to design a digital coin flip mechanism? [closed]

I want to implement the coin flip mechanism in which the result will be independent of anything just like real coin flip.I am confused on how to make totally independent...
2
votes
2answers
131 views

Good publicly available unpredictable random number sources?

I wasn't sure whether to ask this on crypto or security, but since it involves real-world trust and services, I figured this is the better place. Consider that me and my friends (whom for the ...
1
vote
1answer
35 views

Generating many keys: how many CSPRNGs to use?

Say I want to create many random AES keys and have access to a secure source of random numbers SecRand. I see two extremes of how I could write a key factory. Use the same random source for all keys:...
3
votes
1answer
839 views

Has use of /dev/urandom instead of /dev/random ever caused a vulnerability?

Not theoretical mumbo jumbo. Has anyone, ever, in any way, made known an actual exploitable vulnerability due to using /dev/urandom? One that would have been mitigated if they had instead used /dev/...
1
vote
1answer
296 views

How many combinations of md5sums can be computed from a call to random() in PostgreSQL?

Problem space I'm way out of my pay grade, I'm trying to figure out How much randomness does a call to random() actually provide in PostgreSQL? SELECT random(); Whether or not you can reasonably ...
3
votes
0answers
346 views

Why isn't rng-tools installed by default on all OS?

Many Linux distributions use the package rng-tools, but why isn't it always installed by default? It would increase entropy (/proc/sys/kernel/random/entropy_avail) greatly! Is there any security ...
0
votes
1answer
78 views

Protecting Session Authentication Tokens

I am creating a session authentication token and sending it to the client application. Any user data etc is associated to this token on the database, so the token does not contain any sensitive ...
1
vote
1answer
197 views

NIST SP 800-90A DRBG, incorrect reult following algorithm, correct result rearranging algorithm steps?

I've been starring at this issue for about three days now, and think I need a second set of eyes on the problem. I'm implementing NIST's HASH_DRBG from SP 800-90A Rev. 1, June 2015 (its the latest doc ...
0
votes
1answer
188 views

Is /dev/urandom a CSRG? [duplicate]

Can we rely on /dev/urandom on UNIX machines if we need a cryptographically secure random generator?
10
votes
2answers
7k views

Cryptographically secure number generator for node.js

I am looking for a cryptographically secure number generator for node.js. Afaik. Math.random() does not meet these requirements. Is there any nodejs lib which can generate cryptographically secure ...
1
vote
0answers
197 views

Vulnerable Keys? CVE-2008-0166 openssl DSA Key Signature Blacklist coverage?

Would the current set of DSA key blacklists detect a DSA key that was generated with openssl on an affected/vulnerable system, BUT whose DSA parameters (dsaparam) were generated on an unaffected ...
5
votes
1answer
851 views

All weak Debian openssl DSA keys

More weak keys? 32768 weak keys can be downloaded for analysis, but are there more? Three times as many? There is much information about DSA-1571-1 openssl -- predictable random number generator. ...
1
vote
1answer
519 views

How can I use OpenSSL with an external source of randomness?

When generating RSA keys using OpenSSL, if I want to use an external source of randomness (e.g an HSM that can provide random numbers), is the best way to get a new random number (for every generation)...
3
votes
1answer
1k views

How to Determine the State of a Random Number Generator?

Its always been said that to get strong cryptographic numbers in computing, a good random number generator is needed. Without a good source of randomness, it could be possible for an attacker to ...
1
vote
1answer
85 views

Fair Conscription

It is interesting to read about the random number generation problems in the last USA conscription. If, for the same purpose, we need a random permutation of the 366 birthdays, what should the ...
7
votes
2answers
10k views

Java UUID.randomUUID() or SecureRandom for id segment on URL?

In building a Java based system that needs unique identifiers on the URL, is UUID.randomUUID() or SecureRandom a better choice? More specifically, a call to POST /items will return a 201 Created with ...
2
votes
1answer
137 views

Is there any bias in this random selection from a dictionary?

I am generating passwords by selecting random words from a dictionary and counting entropy=words_in_passphrase*log(dictionary_size)/log(2). This algorithm assumes words will be selected from the ...
2
votes
1answer
540 views

How secure is this Diceware generator?

I wonder, because you can visit the site offline and still create passwords. Is this site safe and good for use? https://www.rempe.us/diceware/#eff
0
votes
2answers
7k views

How safe are the passwords suggested by Apple keychain?

Safari on recent versions of Mac OSX can suggest passwords on signup forms. These passwords have the a similar form (the alphanumeric characters are separated by dashes: AbC-dEf-941-T3k) and they only ...
2
votes
1answer
212 views

How does Google Chrome's JS Crypto RNG Work?

According to caniuse, Google Chrome has support for crypto.getRandomValues() for (presumably/hopefully) generating cryptographically secure random values. How is this implemented? As there have been ...
4
votes
2answers
3k views

Why would the session ID entropy only be half of the length of the session ID?

On this page on the OWASP website, there is a sentence about session id entropy I find quite strange: The session ID value must provide at least 64 bits of entropy (if a good PRNG is used, this ...
0
votes
1answer
82 views

Shuffle large string securely

I have a large string that I need to shuffle in a secure manner. It will be around 4000 characters. The resulting permutation of such string, must be one in the set of all possible permutations (4000!)...
0
votes
0answers
757 views

Generate 256 bit nonce from crypto.getRandomValues()

I need a 256 bit nonce in JavaScript and cannot use external libraries. I was planning on simply concatenating values from crypto.getRandomValues(): let ints = new Uint32Array(8); window.crypto....
3
votes
1answer
175 views

IoT secure identification scheme

We're contemplating to use the following design to securely identify IoT devices from the cloud, and we would like to know if anybody would see major flaws in it. The design is based on the use of a ...
6
votes
3answers
2k views

Saving random seed on restart/shutdown, and restoring it during system boot

On Debian (and I guess on other linux distributions as well), there is an init script /etc/init.d/urandom, whose function it is to: "Save and restore random seed between restarts" In my case, this ...
0
votes
1answer
35 views

Do CSPRNGs have a maximum input seed length to output length ratio?

Using what may be considered today's "best" or "most secure" CSPRNGs, how much maximum data N can you read from a CSPRNG given seed input of length n before the output starts becoming predictable (...
1
vote
1answer
284 views

Help with hash functions and pseudo-random functions

I am a little bit confused about the terms "hash function" and "pseudo-random function". As far as I know, I can use a cryptographic strong hash function as a PRF. The hash function has a IV and is ...
4
votes
1answer
1k views

Difference between pseudorandom generator and pseudorandom function

Is there a difference between a pseudorandom generator (PRG) and a pseudorandom function (PRF)? I read a lot about that things, for example it is possible to build a PRG from PRFs. But I think there ...
2
votes
1answer
63 views

Entropy in multitenant environments

How is entropy generated for cryptographically secure pseudo random number generator (CSPRNG) seeds in an Intel x64 Windows environment? If it uses Intel's Digital Random Number Generator (DRNG), does ...
0
votes
2answers
251 views

How is entropy “stirring” accomplished in the Microsoft TPM?

Page 14 of Microsoft's TPM abstraction says that is allows for "stirring" A call to BCryptGenRandom will fill the caller-provided buffer with random data. The maximum random number size is ...
1
vote
0answers
42 views

In Windows CSP, is it better to get secure random numbers as one large array or several smaller ones?

I need to generate several random bytes arrays in one time for different purposes. What way would be preferred: Generate one large random bytes array in single API call and then split by chunks for ...
4
votes
3answers
424 views

Predictability of PHPs array_rand

It's generally known information that methods such as the array_rand() method in PHP are not considered cryptographically secure. I'm trying to understand under what situations generated result may be ...
0
votes
1answer
337 views

With a very large number of GUIDs, can one predict the previous and subsequent GUIDs that will be generated?

I've been reading up on GUIDs. According to the Wiki: Cryptanalysis of the WinAPI GUID generator shows that, since the sequence of V4 GUIDs is pseudo-random, given full knowledge of the internal ...
1
vote
1answer
187 views

HPET effects on CSPRNG for Linux OS

HPET or High Precision Event Timer is a hardware built-in clock source available in most processors. I would use the computer to generate CSPRNG and do cryptographic operations. My question is: Is ...
4
votes
2answers
4k views

Seeding a C# random number generator securely

I'm trying to figure out the best way to securely seed a rng in C#. The class I am currently using is the Random class https://msdn.microsoft.com/en-us/library/system.random(v=vs.110).aspx#Same ...
-1
votes
3answers
399 views

Virus using input from victims mic to generate encryption keys [closed]

I am a software engineer from Bucharest and I've created an audio based encryption and authentication application called WaveCrypt. It basically allows users to encrypt (AES) their files with an ...
2
votes
1answer
1k views

ssh-keygen: How is the seed generated?

How is the seed for ssh-keygen generated? I expect it will take information from /dev/random and request supplementation with system activity if we have insufficient random bits. An Instructor ...
10
votes
2answers
27k views

Ways to generate symmetric and asymmetric keys

We are using Beaglebone Black based custom board, and want to use hybrid encryption for encrypting firmware file, i.e. symmetric for encryption big firmware file and asymmetric for encrypting ...
20
votes
1answer
8k views

What's eating my entropy? Or what does entropy_avail really show?

Below are graphs with the value of /proc/sys/kernel/random/entropy_avail on a Raspberry Pi. This answer which might not be correct describes it as: The pattern always comes to the same "stable" saw ...
3
votes
2answers
1k views

Are password generators secure?

Here's a scenario that I often encounter: Some user needs access to something on my network, but they don't have an existing account in AD. I create an AD account for them which I then use to allow ...
2
votes
1answer
905 views

Choosing Key and IV in AES-256

I am working on a real-life project for a firm. I have to encrypt data using AES 256 as per specification. I want to know how are the key and IV are really chosen in real world projects. /dev/urandom ...
12
votes
3answers
4k views

Is a concatenation of random numbers better than a single random number?

We are generating random numbers 16 digits in length. One option that was put forward was to generate four random numbers of 4 digits each and concatenate them instead of just generating a single 16 ...
1
vote
3answers
2k views

How to generate random but unique tokens for authentication?

I need to create unique and long tokens for email verification, but I am not sure about how. Currently we are on staging servers or we are just using os.urandom() in Django. But I need to know what ...
6
votes
3answers
1k views

How bad it is to feed /dev/random with /dev/urandom?

I have seen many blog posts, or blog comments which recommends to feed /dev/random entropy using output from /dev/urandom. I'm not a crypto expert, but it looks like a good way to replace hard-to-...
0
votes
1answer
642 views

Is `/dev/urandom` secure to generate a salt on a Virtual Machine?

I've read the new password_hash() function from PHP uses /dev/urandom to generate a secure salt, however this assumes some noise from device drivers. Is possible that /dev/urandom is not so random ...
8
votes
6answers
2k views

Should I use a cryptograpically secure random number generator when I generate IDs?

It is common to generate random identifiers to expose through an API instead of using a simple auto incrementing primary key. The reasons are many: Prevents easy enumeration. Does not give away order ...
5
votes
2answers
251 views

How secure are these password schemes?

On One liner to create passwords in linux?, I see advice generally of the form head -c16 /dev/urandom | md5sum. They're all random combinations of text manipulation commands, sha1, base64 and md5sum ...
1
vote
1answer
91 views

Synchronized nonce

If two parties (Say A and B) have a shared secret key (K), is there any way for each party to use the shared secret key to generate nonce(N) sequence which is equal on both sides without having to ...
3
votes
1answer
332 views

Is this good/secure method for client-server communication encryption?

Something came to my mind, and I wonder if this is proper method for client-server communication, and if this method is wide-used. On connection, client generates seed, encrypts it using asymmetric ...

1 2
3
4 5
7