Questions tagged [random]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

RNG randomization strength for PRF seed [migrated]

Consider a use case that requires the creation of multiple asymmetric key pairs. There are two options for generating random seeds for a PRF: Use a software based RNG and generate a new seed for each ...
4
votes
0answers
83 views

Is it cryptographically safe to use veracrypt in a virtualbox virtual machine?

Does virtualbox provide enough entropy (random numbers) for the veracrypt program on the virtual machine? Is it cryptographically safe to use veracrypt inside a virtualbox in a windows 10 guest?
0
votes
0answers
28 views

Random URLs to hide assets [duplicate]

Say I own a domain name www.example.com and I'd like to host some resources on it, but being reasonably hidden from the public. Since a 256 bits has a sufficiently large entropy to prevent an ...
3
votes
1answer
63 views

Randomly generating invoice IDs

I'm in the process of setting up a local (i.e. offline and very limited) business, and I'm thinking of generating invoice IDs randomly to avoid the clients knowing that they're customer number #...
0
votes
0answers
25 views

Using SHA2 as random number generator? [migrated]

I need to generate secure pseudorandom numbers in an embedded system. Instead of having to port some RNG library, could I just use an existing SHA2 function as a random number generator (n-th random ...
1
vote
1answer
130 views

Did PHP's rand() get better?

I know that PHP used the system implementation for its rand() function, which is usually a weak LCG or LFSR implementation. Did this change? In case it still does, I am using Fedora 32. PHP states in ...
0
votes
3answers
69 views

Is a random number secure (enough) for card numbers and pins?

I've been given the task of generating some gift tokens which comprise a serial number and a pin number, analagous to a pre-paid credit card. The serial and pin will be printed on a card, with the pin ...
0
votes
0answers
33 views

Is it possible to exploit “naive” shuffling algorithms to find the original order?

This Coding horror article talked about the danger of "naive" shuffling solutions and how using the Fisher-Yates shuffle manages to prevent this problem. If one has a large dataset of naive shuffle ...
0
votes
0answers
46 views

Generating trusted random numbers for a group?

Alice and Bob need to share some cryptographically-secure random numbers. Alice does not trust Bob, and Bob does not trust Alice. Clearly, if Alice generates some numbers, and hands them to Bob, Bob ...
0
votes
1answer
76 views

What vulnerabilities would this type of “password manager” have?

When I was searching for a password manager to use I stumbled upon the concept of Master Password which instead of encrypting and saving your passwords, generates them by using your master password ...
0
votes
1answer
30 views

Does OAuth2 state parameter need to be cryptographically secure?

In OAuth2, as part of the authorization request, we generate a random string and pass it with the state parameter, so that when we get the response, we can ascertain that the response is a result of ...
3
votes
1answer
80 views

Does rngd -r /path/to/file inject into /dev/urandom in addition to /dev/random?

I'm new to the /dev/random and /dev/urandom pipes in general and have an application calling from /dev/urandom which I'm attempting to inject entropy into. I'd prefer not to change the source for ...
1
vote
0answers
41 views

Anonymous (privacy-preserving) random walk

Quoting this paper - SmartWalk (https://dl.acm.org/doi/pdf/10.1145/2976749.2978319): For graph privacy, strong link privacy relies on deep perturbation to the original graph, indicating a large ...
0
votes
0answers
36 views

Anonymous (privacy-preserving) random walks for graphs

Quoting this paper - SmartWalk (https://dl.acm.org/doi/pdf/10.1145/2976749.2978319): For graph privacy, strong link privacy relies on deep perturbation to the original graph, indicating a large ...
1
vote
1answer
110 views

Cracking .NET random

I know .NET has two PRNGs, one secure and one insecure. What is the approach to cracking the insecure one (I want to use it to test an .aspx site)? I searched all over but I only found references to ...
1
vote
2answers
62 views

Should I generate a lot of random serial keys and pick one for each registration or generate 1 for each user?

I'm talking about Online activation. My current workflow is: User pays via paypal (without registration) Paypal performs a request to my API. My API returns a serial key to the user. Then the user ...
1
vote
1answer
61 views

How can I validate that a PRNG's output is insecure and predictable?

Say I talk to a developer who is using some output of a Pseudo-random number generator in order to do some security task. I know based upon common knowledge that only Cryptographically Secure Pseudo ...
2
votes
3answers
169 views

How can one test if a password generator is cryptographically secured?

Given the plethora of random password generators (RPG) available, I'd like to do some black box testing on some. Let's take https://passwordsgenerator.net/ for example. Assuming the whole generator ...
2
votes
0answers
98 views

Is it safe to generate a temporary API key from a random generator seeded by a secure random generator?

I have a need to generate a key consisting of a given number of random characters that will be used to access resources via a public API. It should not be possible to predict the key. This is done in ...
9
votes
1answer
956 views

Is reading from /dev/urandom on macOS Catalina a safe way to produce cryptographically secure data?

I'm reading a lot about entropy on macOS... I know it doesn't use Yarrow anymore as per this FIPS 140-02 doc a NIST compliant DRBG. I read a lot: https://github.com/briansmith/ring/pull/398 How ...
2
votes
1answer
158 views

entropy change when reading from /dev/urandom vs /dev/random

I noticed that when reading from /dev/random, I have a very real impact on the entropy available on my linux box. (reading from /proc/system/kernel/random/entropy_avail), Yet when reading from /dev/...
0
votes
0answers
60 views

Is it possible to get the original UUID1 from a timestamp?

Say, for example, I generate a time based UUID with the following program. import uuid uuid = uuid.uuid1() print uuid print uuid.time I get the following: 47702997-155d-11ea-92d3-6030d48747ec ...
3
votes
1answer
168 views

using HW random number generator as source of entropy

Currently I am using haveged on my server as source of entropy. My Server is used as KVM hypervisor, to run virtual machines. I did not use haveged at the beginning, and I noticed the VMs were ...
1
vote
1answer
93 views

TLS handshake random bytes reused

What would happen if the random bytes provided by the client and the server in the first two messages would be reused by one peer/by both peers? I think it would highly reduce the provided security, ...
2
votes
1answer
110 views

Is this schema between a Desktop App and an API secure?

From my previous question: How secure is this schema between a Desktop App (c++) and an API (php). Introduction I made a paid Desktop-app that required constant internet connection (because of its ...
2
votes
3answers
84 views

Benefits of signing a random number?

Is there any benefit to signing a random number? E.g. a link for password reset, sent to email, often includes a base64 encoded random number to prevent someone guessing what the password reset link ...
0
votes
0answers
34 views

What is the difference between /dev/random and /dev/urandom? [duplicate]

Simply put, what are the differences between /dev/random and /dev/urandom from a developer's standpoint? Which one should I use for cryptographic purposes?
1
vote
2answers
110 views

If I seed a CSPRNG with a truly random number and call the output, does this make the number more, less or equally “random”?

If I have a JavaScript CSPRNG such as isaac.random(), and I seed it using a truly random number T as such: isaac.seed(T), does this make the result of the CSPRNG more, less, or equally random? I ...
1
vote
1answer
109 views

What are some viable, secure sources of entropy for a CSPRNG?

I need some viable sources for entropy to seed a CSPRNG. So far, I have: JS Events Web Crypto API performance.now() Timing for xmlHTTPRequests etc. Are there any other viable/secure entropy sources ...
2
votes
1answer
82 views

Is getting 1-2 outputs from a CSPRNG to seed another CSPRNG less entropy than getting say 5000 outputs from a CSPRNG and using that to seed?

This question builds off of this question. I want to create more entropy from a viable entropy source to seed another CSPRNG. If I use window.crypto.getRandomValues(newUint8Array(1)) To seed a ...
1
vote
3answers
106 views

Is using multiple instances of a browser-PRNG to seed another PRNG more secure?

Say I have Math.random() (which supposedly generates ~32 bits of entropy.) If I use Math.random() + Math.random(), both of them generate ~32 bits of entropy. I will use the solution of Math.random() +...
0
votes
1answer
148 views

Find seed used in Math.random LCG given a list of outputs [duplicate]

Given one or two sequential Math.random outputs generated with Internet Explorer's linear congruential generator, is it possible to find the seed used in the LCG and find subsequent outputs? Here is ...
0
votes
1answer
359 views

Predicting Math.random() sequence using V8's MWC1616 algorithm

If you have the seeds for Math.random() using mwc1616, are the random numbers generated in the same order every time / are they repeating? Basically wondering if, given a seed, can I predict past ...
0
votes
0answers
128 views

How long will it take to crack a hashed random string

If I generate 128 bit, 512 bit and 1024 bit random strings using either: A native rand() function (C, PHP, Python, etc) OpenSSL random bytes Hardware generated random number And hash the random ...
0
votes
0answers
53 views

Generating a secret token: security concerns other than min-entropy?

I'm trying to compare two techniques for generating an OAuth 2 PKCE code_verifier. For each character, get a random byte and "mod 66" to map to one of the 66 valid characters. For each character, get ...
3
votes
3answers
279 views

Determining the entropy of a string if each character has a slight bias

Let's say I need to generate a 32-character secret comprised of ASCII characters from the set '0'..'9'. Here's one way of doing it: VALID_CHARS = '0123456789' generate_secret_string() { random =...
0
votes
1answer
115 views

Am I making my One-Time Passcode less secure?

I am using some "magic link" one-time passcodes for automatically logging users in for a specific purpose on our website. My plan is to generate a hash based on the datetime, users specific "ID" and ...
2
votes
3answers
471 views

Exactly how is a pseudorandom number generator a security risk?

I was recently reading about Diceware, which is essentially a list of words from which several can be picked to form a long passphrase. The website stresses that these words should be picked randomly ...
0
votes
1answer
100 views

What does “probabilistic algorithm with random tape” mean?

I am new to the study of cryptography, and when reading papers they often mention that "probabilistic algorithm G with random tape w ...". What does it mean by "random tape w"? I mean why it does is ...
2
votes
1answer
395 views

Is it safe to use a passphrase to seed fernet key generation?

I have a cluster deployment that depends on a Fernet Key to secure some data. The deployment script generates the key with: FERNET_KEY=$(python -c "from cryptography.fernet import Fernet; k = Fernet....
1
vote
0answers
45 views

Can Lava Lamps enhance modern native entropy sourced from hardware and the Linux Kernel? [duplicate]

In this 2017 video by Computerphile's Tom Scott, "The Lava Lamps That Help Keep The Internet Secure", Scott tours Cloud Flare's facility and checks out their Wall of Entropy. This is essentially a ...
2
votes
1answer
1k views

How can I increase /proc/sys/kernel/random/entropy_avail

I have access to genuine random numbers - random.org, for example. I have a number of processes using /dev/random and my value for /proc/sys/kernel/random/entropy_avail is 143, which is pretty low. ...
4
votes
1answer
136 views

Is pressing random keys a secure way to seed a key generator?

There's a couple of programs that I've been using recently that ask you to type random keys as a source of randomness to seed an RNG for key generation. Is this considered a good practice still, or ...
15
votes
2answers
559 views

What research suggests that user's mouse movements are (not) sufficiently unpredictable for secret key generation?

I have not been able to find any credible source which tried to prove or disprove the randomness of mouse movements. A Google Scholar search for "mouse movement entropy" gives surprisingly few ...
7
votes
3answers
596 views

Is PuttyGen secure?

I'm using PuttyGen to generate ssh keys for various windows computers. It requires a lot of manual user input, specifically in the form of swirling the mouse around in the window pane. I understand ...
0
votes
2answers
100 views

How to solve the problem of secure randomly generated GUIDs when the size of the data outgrows the GUIDs

I've been struggling with this problem for a little while... How to hide the order that records were created in, basically. You typically do this by generating a "GUID". But this GUID is arbitrarily ...
1
vote
1answer
79 views

Size of a secure random number taking into account quantum computing and size of universe

Most random secure numbers are 256 to 512 bits. But given the size of the universe and eventually quantum computing, I am wondering what is a better sized randomly generated number, taking into ...
1
vote
0answers
124 views

Does using both a counter and a random nonce make sense for the purpose of reducing the likelihood of replay attacks?

I am aware that using a counter or a random value are both acceptable ways of generating nonces, depending on the circumstances. The tradeoff with using a counter is the necessity to keep state and ...
10
votes
2answers
1k views

Is there a loss of entropy by hashing an N-bit random key to produce an N-bit hash?

I read the following piece of code: dd if=/dev/urandom bs=16 count=1 2>/dev/null | md5sum Apparently, this code was used as a trick to produce a hex string key from a 128-bit binary pseudo-random ...
0
votes
1answer
124 views

What is the entropy of a call to java.lang.Math.random()?

Math.random() produces a double value (IEEE 754 binary64) in the range [0.0, 1.0). How many digits (or bits) of entropy does the return value of random() contain? If it simplifies things, I'm okay ...

1
2 3 4 5
8